Skip to content

Commit

Permalink
Merge pull request #4643 from Smanar/tuya_moe
Browse files Browse the repository at this point in the history
FIX tuya Moe TRV
  • Loading branch information
manup authored Mar 27, 2021
2 parents 00755a2 + 2ba83df commit 9efa41f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rest_sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1409,9 +1409,10 @@ int DeRestPluginPrivate::changeSensorConfig(const ApiRequest &req, ApiResponse &
}
else if (R_GetProductId(sensor) == QLatin1String("Tuya_THD BTH-002 Thermostat"))
{
QByteArray data = QByteArray("\x00", 1);
QByteArray data;
QString modeSet = map[pi.key()].toString();
if (modeSet == "heat") { data = QByteArray("\x01", 1); }
else if (modeSet == "off") { data = QByteArray("\x00", 1); }
else
{
rsp.list.append(errorToMap(ERR_INVALID_VALUE, QString("/sensors/%1/config/%2").arg(id).arg(pi.key()),
Expand Down

0 comments on commit 9efa41f

Please sign in to comment.