homebridge-tuya-web
homebridge-tuya-web copied to clipboard
Device state broken when activated by shortcut
Describe the bug
If a device is already turned on and is then activated by a shortcut/automation, the device state in Homebridge and HomeKit is turned off and doesn't return to 'on'. The device remains on. The button becomes unusable (pressing it shows on, then it goes off) until Homebridge is restarted.
Example:
I have a dehumidifier that runs on an automation, turning on for 4 hours, off for 2 and on again for 4, on repeat.
I have a shortcut to turn on various devices at once (when I'm cycling indoors, it turns on the TV, smart trainer, and fans). It also turns on the dehumidifier, which is often already turned on when the shortcut runs.
As soon as this shortcut runs, the dehumidifier shows as off in Homebridge and the Home app, despite being on. The button doesn't work.
Steps To Reproduce
As above. When a device is already on, and is then turned on by a shortcut, the device shows as off and the button doesn't reset until Homebridge is restarted. The Tuya app/website continues to show the correct state and work as expected.
Plugin Version
Latest version. 1.1.2.
Homebridge Config
{ "name": "TuyaWebPlatform", "options": { "username": "", "password": "", "countryCode": "44", "platform": "tuya" }, "defaults": [ { "id": "bf1a655bd270069106efeo", "device_type": "fan" }, { "id": "bf53dcc657966dc41alj5l", "device_type": "fan" }, { "id": "bf25a2737ce0dd5bfaeuil", "device_type": "fan" }, { "id": "bf0cdfc23f95d959dfhclw", "device_type": "outlet" }, { "id": "bf4e38e3552b2335a1ke9m", "device_type": "outlet" }, { "id": "bf0ec5c25e198aca95ro1s", "device_type": "outlet" }, { "id": "bf50ed8741987e6397piky", "device_type": "outlet" }, { "id": "bfd4efd01513d33f27ge75", "device_type": "light" }, { "id": "bfae9bcdbe57e83038rez4", "device_type": "light" }, { "id": "bfaf5b3182c07cf3dauuex", "device_type": "light" }, { "id": "bf2c3cb6e70282eed7u8yb", "device_type": "light" }, { "id": "bf60e5be21f2202dd0nd6r", "device_type": "light" } ], "scenes": false, "platform": "TuyaWebPlatform" },
Device Config
Additional Context