6static const char *
const TAG =
"tuya.switch";
22 LOG_SWITCH(
"",
"Tuya Switch",
this);
23 ESP_LOGCONFIG(TAG,
" Switch has datapoint ID %u", this->
switch_id_);
bool state
The current reported state of the binary sensor.
void publish_state(bool state)
Publish a state to the front-end from the back-end.
void set_boolean_datapoint_value(uint8_t datapoint_id, bool value)
void register_listener(uint8_t datapoint_id, const std::function< void(TuyaDatapoint)> &func)
void dump_config() override
void write_state(bool state) override