15 if (std::isnan(value)) {
20 double lr = log(
double(value));
21 double v = this->
a_ + this->
b_ * lr + this->
c_ * lr * lr * lr;
22 auto temp = float(1.0 / v - 273.15);
24 ESP_LOGV(TAG,
"'%s' - Temperature: %.1f°C", LOG_STR_ARG(this->
get_log_name()), temp);
const LogString * get_log_name() const
Get the name for a "%s" log argument (LOG_STR_ARG).
void dump_config() override
void process_(float value)
void add_on_state_callback(F &&callback)
Add a callback that will be called every time a filtered value arrives.
void publish_state(float state)
Publish a new state to the front-end.
float state
This member variable stores the last state that has passed through all filters.
ESPHOME_LOG_TAG(TAG, "ntc")