ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
mk2pvrouter_binary_sensor.cpp
Go to the documentation of this file.
2#include "esphome/core/log.h"
3#include <cstring>
4
6
7ESPHOME_LOG_TAG(TAG, "mk2pvrouter_binary_sensor");
8
10
12 bool state = (strcmp(val, "0") != 0);
13 this->publish_state(state);
14}
15
17 LOG_BINARY_SENSOR(" ", "Mk2PVRouter Binary Sensor", this);
18 ESP_LOGCONFIG(TAG, " Tag: %s", this->get_tag());
19}
20
21} // namespace esphome::mk2pvrouter
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.
mopeka_std_values val[3]
ESPHOME_LOG_TAG(TAG, "mk2pvrouter_binary_sensor")