I have a MQTT based switch running (Shelly), which allows me to switch on/off lights via Openhab’s web interface, the original wall swich and furhtermore via my Logitech Harmony using Hue Emulation. In principle everthing is working, but one problem remains: I can’t sync the status of the Hue Emulation switch with the status of the MQTT switch. E.g. if I turn on the light via the Harmony remote (Hue emulation) and later on off via the wall switch, the Hue emulation would not know about the off status.
I tried to resolve that via rules, but that brought me into an endless loop (off via MQTT triggers off for HUE, triggers off for MQTT …). Is there a preferred/best practice way to sync the state of two switches in such a scenario?
Thank you for your support.