12 bool state = (strcmp(
val,
"0") != 0);
17 LOG_BINARY_SENSOR(
" ",
"Mk2PVRouter Binary Sensor",
this);
18 ESP_LOGCONFIG(TAG,
" Tag: %s", this->
get_tag());
void publish_state(bool new_state)
Publish a new state to the front-end.
bool state
The current state of this binary sensor. Also used as the backing storage for StatefulEntityBase.
void dump_config() override
Mk2PVRouterBinarySensor(const char *tag)
void publish_val(const char *val) override
const char * get_tag() const
ESPHOME_LOG_TAG(TAG, "mk2pvrouter_binary_sensor")