8static const char *
const TAG =
"tuya.sensor";
13 ESP_LOGV(TAG,
"MCU reported sensor %u is: %s", datapoint.
id, ONOFF(datapoint.
value_bool));
16 ESP_LOGV(TAG,
"MCU reported sensor %u is: %d", datapoint.
id, datapoint.
value_int);
19 ESP_LOGV(TAG,
"MCU reported sensor %u is: %u", datapoint.
id, datapoint.
value_enum);
22 ESP_LOGV(TAG,
"MCU reported sensor %u is: %" PRIx32, datapoint.
id, datapoint.
value_bitmask);
29 LOG_SENSOR(
"",
"Tuya Sensor",
this);
30 ESP_LOGCONFIG(TAG,
" Sensor has datapoint ID %u", this->
sensor_id_);
void publish_state(float state)
Publish a new state to the front-end.
void register_listener(uint8_t datapoint_id, const std::function< void(TuyaDatapoint)> &func)
void dump_config() override
Providing packet encoding functions for exchanging data with a remote host.