With the latest HA 2021.12.3 (issue also with previous versions), sometimes toggling switches in HA do not obey properly. The tuya app works every time. I turn on the lights in HA and then when i turn off it doesn’t obey. If i reload the integration then it gets the correct state and i can turn off.
I am thinking of adding an automation to reload automation after every action…
I added this automation to reload the config on each action. Up to now it works ok. I will let you know how it goes. if you have something better to propose please tell me:
alias: Reload Tuya
description: ''
trigger:
- platform: state
entity_id: light.living_room_led_front
from: 'off'
to: 'on'
- platform: state
entity_id: light.living_room_led_front
from: 'on'
to: 'off'
condition: []
action:
- service: homeassistant.reload_config_entry
target:
entity_id: light.living_room_led_front
mode: single
In the last update 2021.12.6 there seems to be an update on tuya-iot-py-sdk to 0.6.6. test see if that solves this issue. I have the same issue. is was pretty stable (reset once a week) but now it’s often.
I reverted back to local Tuya on some of the plugs. But the TGBcwww bulbs do not work with local Tuya.
This morning it failed on me again. I switched a plug on in HA, it turned on, in HA it slided back to the off position after a second but the plug was on. To turn it off I had to slide it on in HA and back off, then the pug turned off. Reloading Tuya integration did not work. Restarting HA worked. lets see how it holds. I am on 2021.12.6.