mirror of https://github.com/arendst/Tasmota.git
Merge pull request #4109 from chaosmaster/tuya-dimmer-ignore-dim
tuya-dimmer: ignore dim-values when powered off
This commit is contained in:
commit
a5c5ddaee6
|
@ -120,7 +120,7 @@ void TuyaPacketProcess()
|
|||
AddLog(LOG_LEVEL_DEBUG);
|
||||
|
||||
tuya_new_dim = round(serial_in_buffer[13] * (100. / 255.));
|
||||
if((power || !Settings.light_dimmer ) && (tuya_new_dim > 0) && (abs(tuya_new_dim - Settings.light_dimmer) > 2)) {
|
||||
if((power) && (tuya_new_dim > 0) && (abs(tuya_new_dim - Settings.light_dimmer) > 2)) {
|
||||
|
||||
snprintf_P(log_data, sizeof(log_data), PSTR("TYA: Send CMND_DIMMER=%d"), tuya_new_dim );
|
||||
AddLog(LOG_LEVEL_DEBUG);
|
||||
|
@ -279,4 +279,4 @@ boolean Xdrv16(byte function)
|
|||
return result;
|
||||
}
|
||||
|
||||
#endif // USE_TUYA_DIMMER
|
||||
#endif // USE_TUYA_DIMMER
|
||||
|
|
Loading…
Reference in New Issue