7static const char *
const TAG =
"ntc";
16 if (std::isnan(value)) {
21 double lr = log(
double(value));
22 double v = this->
a_ + this->
b_ * lr + this->
c_ * lr * lr * lr;
23 auto temp = float(1.0 / v - 273.15);
25 ESP_LOGV(TAG,
"'%s' - Temperature: %.1f°C", this->
name_.
c_str(), temp);
constexpr const char * c_str() const
void dump_config() override
void process_(float value)
void publish_state(float state)
Publish a new state to the front-end.
void add_on_state_callback(std::function< void(float)> &&callback)
Add a callback that will be called every time a filtered value arrives.
float state
This member variable stores the last state that has passed through all filters.
Providing packet encoding functions for exchanging data with a remote host.