Merge pull request #11513 from jaymemaurice/development

TuyaMCU driver use TempRes to adjust precision of humidity
This commit is contained in:
Theo Arends 2021-03-30 08:16:34 +02:00 committed by GitHub
commit f7dd04a42f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1363,11 +1363,11 @@ void TuyaSensorsShow(bool json)
dtostrfd(TuyaAdjustedTemperature(Tuya.Sensors[1], Settings.flag2.temperature_resolution), Settings.flag2.temperature_resolution, tempval), TempUnit());
break;
case 73:
WSContentSend_PD(HTTP_SNS_HUM, "", dtostrfd(Tuya.Sensors[2], Settings.flag2.temperature_resolution, tempval));
WSContentSend_PD(HTTP_SNS_HUM, "", dtostrfd(TuyaAdjustedTemperature(Tuya.Sensors[2], Settings.flag2.temperature_resolution), Settings.flag2.temperature_resolution, tempval));
break;
case 74:
WSContentSend_PD(PSTR("{s}" D_HUMIDITY " Set{m}%s " D_UNIT_PERCENT "{e}"),
dtostrfd(Tuya.Sensors[3], Settings.flag2.temperature_resolution, tempval));
dtostrfd(TuyaAdjustedTemperature(Tuya.Sensors[3], Settings.flag2.temperature_resolution), Settings.flag2.temperature_resolution, tempval));
break;
case 75:
WSContentSend_PD(HTTP_SNS_ILLUMINANCE, "", Tuya.Sensors[4]);