tuya: fix SetOption20 for Oittm/Moes

This commit is contained in:
Joel Stein 2018-11-06 05:29:30 +01:00
parent c9cf375c6c
commit aa148f67a3
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ void TuyaPacketProcess()
}
tuya_new_dim = round(tuya_buffer[13] * (100. / 255.));
if((power) && (tuya_new_dim > 0) && (abs(tuya_new_dim - Settings.light_dimmer) > 2)) {
if((power || bitRead(Settings.flag.data, 20)) && (tuya_new_dim > 0) && (abs(tuya_new_dim - Settings.light_dimmer) > 1)) {
snprintf_P(scmnd, sizeof(scmnd), PSTR(D_CMND_DIMMER " %d"), tuya_new_dim );