34 LOG_SENSOR(
"",
"Dew Point",
this);
37 " Temperature: '%s'\n"
50 ESP_LOGW(TAG,
"Temperature or humidity value is NaN, skipping calculation");
57 ESP_LOGW(TAG,
"Humidity value out of range (0-100): %.2f", this->
humidity_value_);
63 const float a{17.625f};
64 const float b{243.04f};
73 const float dew_point{(b * alpha) / (a - alpha)};
void enable_loop()
Enable this component's loop.
void disable_loop()
Disable this component's loop.
const StringRef & get_name() const
constexpr const char * c_str() const
float get_setup_priority() const override
sensor::Sensor * humidity_sensor_
void dump_config() override
sensor::Sensor * temperature_sensor_
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 get_state() const
Getter-syntax for .state.
float state
This member variable stores the last state that has passed through all filters.
ESPHOME_LOG_TAG(TAG, "dew_point.sensor")
constexpr float DATA
For components that import data from directly connected sensors like DHT.