Add internal_temperature component (#4330)

* Add cpu_temperature component

* Add tests

* Fix formatting

* Possible fix for "sensor not shown in HomeAssistant"

* Rename component to internal_temperature

* Update esphome/components/internal_temperature/internal_temperature.cpp

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Update esphome/components/internal_temperature/internal_temperature.cpp

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Update esphome/components/internal_temperature/internal_temperature.cpp

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Update internal_temperature.h

* Remove unique_id

* Update ESP32 variant detection

---------

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
Mat931
2023-02-20 02:47:37 +00:00
committed by GitHub
parent f68d577986
commit ed801f7a27
8 changed files with 116 additions and 0 deletions
@@ -0,0 +1,17 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/sensor/sensor.h"
namespace esphome {
namespace internal_temperature {
class InternalTemperatureSensor : public sensor::Sensor, public PollingComponent {
public:
void dump_config() override;
void update() override;
};
} // namespace internal_temperature
} // namespace esphome