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