mirror of
https://github.com/esphome/esphome.git
synced 2025-09-03 03:42:20 +01:00
Merge branch 'integration' into memory_api
This commit is contained in:
@@ -11,7 +11,7 @@ void NTC::setup() {
|
|||||||
if (this->sensor_->has_state())
|
if (this->sensor_->has_state())
|
||||||
this->process_(this->sensor_->state);
|
this->process_(this->sensor_->state);
|
||||||
}
|
}
|
||||||
void NTC::dump_config() { LOG_SENSOR("", "NTC Sensor", this) }
|
void NTC::dump_config() { LOG_SENSOR("", "NTC Sensor", this); }
|
||||||
float NTC::get_setup_priority() const { return setup_priority::DATA; }
|
float NTC::get_setup_priority() const { return setup_priority::DATA; }
|
||||||
void NTC::process_(float value) {
|
void NTC::process_(float value) {
|
||||||
if (std::isnan(value)) {
|
if (std::isnan(value)) {
|
||||||
|
@@ -12,10 +12,8 @@
|
|||||||
namespace esphome {
|
namespace esphome {
|
||||||
namespace sensor {
|
namespace sensor {
|
||||||
|
|
||||||
// Forward declaration
|
|
||||||
void log_sensor(const char *tag, const char *prefix, const char *type, Sensor *obj);
|
void log_sensor(const char *tag, const char *prefix, const char *type, Sensor *obj);
|
||||||
|
|
||||||
// Macro that calls the function - kept for backward compatibility
|
|
||||||
#define LOG_SENSOR(prefix, type, obj) log_sensor(TAG, prefix, LOG_STR_LITERAL(type), obj)
|
#define LOG_SENSOR(prefix, type, obj) log_sensor(TAG, prefix, LOG_STR_LITERAL(type), obj)
|
||||||
|
|
||||||
#define SUB_SENSOR(name) \
|
#define SUB_SENSOR(name) \
|
||||||
|
Reference in New Issue
Block a user