Tuya improvements (#1491)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Trevor North
2021-06-02 10:31:56 +01:00
committed by GitHub
parent c3938d04f3
commit c5c24c1989
12 changed files with 321 additions and 219 deletions
@@ -8,8 +8,8 @@ static const char *TAG = "tuya.binary_sensor";
void TuyaBinarySensor::setup() {
this->parent_->register_listener(this->sensor_id_, [this](TuyaDatapoint datapoint) {
ESP_LOGV(TAG, "MCU reported binary sensor %u is: %s", datapoint.id, ONOFF(datapoint.value_bool));
this->publish_state(datapoint.value_bool);
ESP_LOGD(TAG, "MCU reported binary sensor is: %s", ONOFF(datapoint.value_bool));
});
}