arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.03k stars 4.78k forks source link

MQTT is not reporting the correct LastChange #21605

Closed stefanbode closed 3 months ago

stefanbode commented 3 months ago

I assume this is just missing. I got some side effects on shutters where on MQTT commands the source is still the LAST one before the MQTT

Description:

Related issue (if applicable): fixes #

Checklist:

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

arendst commented 3 months ago

I see your point.

I'll merge this PR as you seem to be the only user of TasmotaGlobal.last_source.

The issue is that ONLY the shutter code makes extensive use of calling command functions by their normal functions. The command code was never planned to be used that way. Instead you should have called the command's functionality, so not using the XdrvMailbox struct. Your approach also provides tons of MQTT messages, which I think, are needless.