3 #include "automation.h" 5 static const char *
const TAG =
"tuya.automation";
11 if (dp.
type != expected) {
12 ESP_LOGW(TAG,
"Tuya sensor %u expected datapoint type %#02hhX but got %#02hhX", dp.
id,
13 static_cast<uint8_t>(expected), static_cast<uint8_t>(dp.
type));
void check_expected_datapoint(const TuyaDatapoint &dp, TuyaDatapointType expected)
void register_listener(uint8_t datapoint_id, const std::function< void(TuyaDatapoint)> &func)
TuyaBoolDatapointUpdateTrigger(Tuya *parent, uint8_t sensor_id)
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
TuyaBitmaskDatapointUpdateTrigger(Tuya *parent, uint8_t sensor_id)
TuyaStringDatapointUpdateTrigger(Tuya *parent, uint8_t sensor_id)
TuyaUIntDatapointUpdateTrigger(Tuya *parent, uint8_t sensor_id)
Implementation of SPI Controller mode.
TuyaIntDatapointUpdateTrigger(Tuya *parent, uint8_t sensor_id)
std::vector< uint8_t > value_raw
TuyaEnumDatapointUpdateTrigger(Tuya *parent, uint8_t sensor_id)
TuyaRawDatapointUpdateTrigger(Tuya *parent, uint8_t sensor_id)