ESPHome 2026.8.0b4
Loading...
Searching...
No Matches
hoermann_hcp_binary_sensor.cpp
Go to the documentation of this file.
2
3#include "esphome/core/log.h"
4
6
7static const char *const TAG = "hoermann_hcp.binary_sensor";
8
10 // Publishing unconditionally is deliberate: the base class dedupes, and filters need every input to drive
11 // their timers.
12 this->parent_->add_on_state_callback([this]() { this->publish_state(this->parent_->is_valid()); });
14}
15
16void HoermannHcpConnectedBinarySensor::dump_config() { LOG_BINARY_SENSOR("", "Hoermann HCP Connected", this); }
17
18} // namespace esphome::hoermann_hcp
void publish_state(bool new_state)
Publish a new state to the front-end.
void publish_initial_state(bool new_state)
Publish the initial state, this will not make the callback manager send callbacks and is meant only f...
void add_on_state_callback(F &&callback)