mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
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);
|
AddLog(LOG_LEVEL_DEBUG);
|
||||||
|
|
||||||
tuya_new_dim = round(serial_in_buffer[13] * (100. / 255.));
|
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 );
|
snprintf_P(log_data, sizeof(log_data), PSTR("TYA: Send CMND_DIMMER=%d"), tuya_new_dim );
|
||||||
AddLog(LOG_LEVEL_DEBUG);
|
AddLog(LOG_LEVEL_DEBUG);
|
||||||
@ -279,4 +279,4 @@ boolean Xdrv16(byte function)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // USE_TUYA_DIMMER
|
#endif // USE_TUYA_DIMMER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user