mirror of https://github.com/arendst/Tasmota.git
1a462c986c
The driver tried to avoid loops when state updates from the MCU (eg from physical button press) could be reflected back by Tasmota and trigger another MCU command, followed by a state update. It did this by tracking the source of the command in the last_source and last_command_source variables, suppressing the command if either of those was SRC_SWITCH. However this logic is faulty: Since there are two last_source variables to check, a command might reset one of them, but the other would still suppress the update. As it turns out, MQTT commands would only set last_source but not last_command_source. As a result, any dimmer changes via MQTT would be dropped by the driver and not applied to the MCU. Switch functionality (on/off) was still working because those do not rely on last_command_source, only last_source. This change removes the loop detection logic altogether for dimmer updates. This should be safe, because the driver already has the latest dimmer value in its shadow state, and will not try to re-apply a current value, thus breaking the loop. This patch has been tested with several CE-WF500D dimmers which had this problem. |
||
---|---|---|
.. | ||
settings.ino | ||
support.ino | ||
support_a_i2c.ino | ||
support_button_v4.ino | ||
support_command.ino | ||
support_crash_recorder.ino | ||
support_device_groups.ino | ||
support_eeprom.ino | ||
support_esp32.ino | ||
support_esp8266.ino | ||
support_esptool.ino | ||
support_features.ino | ||
support_flash_log.ino | ||
support_float.ino | ||
support_jpeg.ino | ||
support_network.ino | ||
support_profiling.ino | ||
support_pwm.ino | ||
support_rotary.ino | ||
support_rtc.ino | ||
support_statistics.ino | ||
support_switch_v4.ino | ||
support_tasmota.ino | ||
support_udp.ino | ||
support_wifi.ino | ||
tasmota_ca.ino |