I have exactly the same problem here.
Me as well. Re-loading the integration synchs it up properly. not a fix but a way to adjust it.
Yup also have this issue seems I have to reload two to 3 times a day I’m
About to chuck everything Tuya outside in the snow
Thanks for this! Should I completely wipe my original Tuya integration prior?
I’ve been having the same issue of Tuya switches turning off after a second. A server restart always fixes things, but just temporarily. It was working great until one of the 2021.12.* updates. I don’t mind going back to Local Tuya for my plugs and switches. I also have a Tuya climate device where the automations seem to be running correctly, but the device info isn’t synced with HA dashboard correctly unless I restart. I hope our developers can get this sorted out.
There are multiple reports on GitHub from users facing the same issues. It seems the problems are entirely on the Tuya cloud side.
If you look on the GitHub reports, some have suggested how to use an automation to periodically re-load the integration to keep devices in sync. This is probably preferable to restarting the whole of HA to get the same result.
Thanks! I added this automation. Hopefully it helps.
alias: Fix - Reload Tuya Integration
description: ''
trigger:
- platform: time_pattern
minutes: '01'
seconds: '01'
condition: []
action:
- service: homeassistant.reload_config_entry
target:
device_id: **ADD YOUR OWN TUYA DEVICE HERE**
mode: single
Clunky way to do it, but this may be the fix. Or, put an outlet on whatever the device is, and leave the switch on. Alternatively, I have a switch that works with VeSync, and that one / integration is working right.
same issue here. I hope this get fixed soon… my wife is going crazy because my automations are failing because of this problem
Reload the integration seems to work. Possible to automate?
Made it, working like a charm. Thanks!
This solution seems to work. Thanks!
I’ve found that while it works most of the time, it’s not perfect. The automation fires once per hour, but I think the Tuya communication loss sometimes happens just after the automation fires which results in errors until the automation fires again.
Someone mentioned an automation that fires when a Tuya error is logged, but I have not been successful at getting that to work.
I was having trouble with my WiFi sockets, they would work but the toggle button in HA always flipped back to on even if they were actually off. I just updated core to 2021.12.5 and it’s fixed my issues.
2021.12.5 has not fixed mine. Same problem of toggling off along with all the other Tuya probems.
Same thing here. Hacks and work-arounds don’t work, either.
Do we have any update on this? Reloading the integration even so often does not seem like a great fix as it still can become an issue between relaods. I have a simple automation for a aqara button to toggle the lights in the office and it constantly does not work because of this issue. Has anyone from the Tuya “Offical” Integration said anything?
You guys need to try this which work great for me. Add automation.yaml
and be sure to add into configuration.yaml
because if you don’t this will not work
automation yaml
automation:
- alias: Tuya Auto Reboot
id: unique-id
trigger:
- platform: event
event_type: system_log_event
event_data:
level: ERROR
name: tuya_iot
condition:
- condition: template
value_template: >-
{{ "error while get mqtt config" in trigger.event.data.message[0] }}
action:
- service: homeassistant.reload_config_entry
data:
entity_id:
- switch.tuya_1
- switch.tuya_2
configurations yaml
system_log:
fire_event: true
This solutions is post by someone, I forget where it is… so again you know who you are. Kudos.
Well tuya devs are slow to fix anything.
13 days or so of issues and only in last day or so they show up
Tuya device entities stop updating. · Issue #62595 · home-assistant/core (github.com)
The suggested fix worked for me.