From bdcffc7ba91c32e33b77df1e22f8868a9421eb29 Mon Sep 17 00:00:00 2001 From: irtimaled Date: Sun, 26 Sep 2021 01:27:43 -0700 Subject: [PATCH] fix: Setting Tuya string DP value (#2394) --- esphome/components/tuya/tuya.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/tuya/tuya.cpp b/esphome/components/tuya/tuya.cpp index d73ba50462..4f65fa7118 100644 --- a/esphome/components/tuya/tuya.cpp +++ b/esphome/components/tuya/tuya.cpp @@ -479,7 +479,7 @@ void Tuya::set_string_datapoint_value(uint8_t datapoint_id, const std::string &v for (char const &c : value) { data.push_back(c); } - this->send_datapoint_command_(datapoint->id, datapoint->type, data); + this->send_datapoint_command_(datapoint_id, TuyaDatapointType::STRING, data); } void Tuya::set_enum_datapoint_value(uint8_t datapoint_id, uint8_t value) {