Tuya Not Refreshing Status entities

Hi,

I have been using Home Assistant for a couple of weeks now, over the last couple of days I have been having reel problems with my Tuya devices. If a click a switch, it actions the event and graphically toggles, after a second, the switch toggles back to where it started. Sometimes after several seconds it will update again after a few seconds, this morning it stopped completely, I removed Tuya and added it again which sort of helped but stopped again shortly after. Reloading the integration corrects the display until the next time it is used.

Other integrations such as Hue lights react correct almost immediately.

My API code does have the ‘Device Status Notification’ authorised.

Hardware is RPi 4 (also tried on RPi 3 all software up to date core-2021.11.4

Thanks

2 Likes

Thanks, somewhat loathed to go onto an old system only to have it die in six months time. I have made a small amount of progress, my api key was valid for all regions and my account is central Europe (not sure why that is because I am not). Removing the other options seems to have helped a bit. Now if a switch or light is changed in the dashboard it sorts itself out after 15 - 30 seconds. If the status is changed by an automation it still needs a reload of Tuya to get it updated. For now it looks like I need to see if I can automatically reload the integration at regular intervals.

@EspadaMK
The same phenomena occurs on my installation, do you have any new insights into this?

Most of the time stuff keeps on working with automations and stuff but every now and again it does give problems (not wanting to switch on or off).
What I did find is that both ewelink smart life (the android app) and Google home do report the correct status right after switching on of off.

I guess going back to the “old” tuya stuff does not sound like a “future proof” strategy


@francisp Thanks for the heads-up, should have said smart life


Ewelink is not for Tuya devices.

As a workaorund, I have set the following automation, which forces Tuya integration to reload every hour. So far, it works for the purpose. Just include in the entities service call all your Tuya devices:

alias: Reload Tuya
description: ''
trigger:
  - platform: time_pattern
    hours: /1
condition: []
action:
  - service: homeassistant.reload_config_entry
    target:
      entity_id:
        - switch.tuya_01
        - switch.tuya_02
        - switch.tuya_03
    data: {}
mode: single
5 Likes

Going to try this. I read this guy who says this works with just one entity. I have 52 from Tuya so let’s see if I can avoid putting them all.

This only happens “ocasionally” with me. It’s not like it doesn’t work at all. But sometimes, some devices stop showing their real state or actually toggling
 It’s weird and it also happens with Hue.

2 Likes

It also happens to me. It used to happen with one random HUE light. But, since last update, it happens with Tuya only. I am not a big fun of Tuya smart plugs. I’d rather to have Broadlink ones, as I have a few ones, an RM4 Pro to control my rolling shutters and a couple of RM3 Mini to control some IR devices, and they work like a charm since day one. No issues at all in almost one year. However, for me is quite ease to get Tuya devices locally, as they are sold in a Leroy Merlin near my place.

I am not sure whether you must put all Tuya devices or just one. I have four Tuya devices only, so not a big deal for me to put them all. I understand your point though. Just try with one single entry to see whether it’s enough for the purpose and let us know! :slight_smile:

It wouldn’t make sense that you need to add all devices to an integration, you reload the integration not the devices.
Just like when you open the integrations page and reload the integration you aren’t presented with an option what entities to reload, it takes them all since they are bound by the integration.

My guess is that you choose an entity because otherwise another “picker” would be needed in the UI and it’s possibly easier to pick a device/entity you know there is an issue with than knowing the integration behind the device/entity.

1 Like

Just wanted to report that I’m also having this problem. Seems to have started for me after the December update which was shortly after setting up the integration for the first time. I did confirm device status is authorized. I have an automation turning one device on/off at certain times. Doesn’t seem to have a problem turning the device on but HA still shows the device as off even though on. If I reload the integration it will show as on but like mentioned it was just show as off again after some time. If this happens before the automation runs to turn off the device it doesn’t actually turn off since HA thinks it’s already off. I will try sesardelaisla automation to workaround the issue.

2 Likes

Just a sign for developers: I have a same issue what is mentioned above. As I have over 10 switches and HUEs, used within many automations, it is a real problem for me. Desperately waiting the resolution.

1 Like

Same issue here. Is the problem identified so there will be a fix?

1 Like

Same problem here as well


1 Like

Got the same issue here. Workaround with reloading the integration helps for now.

1 Like

Same issue here! I’ve two “SMART socket (gyqisermskjxzycc) by Tuya”, one is working fine that other that was connected to a motion sensor stopped responding/toggling


1 Like

Same issue, PIR very slow or never update

1 Like

Hello. I have the same issue: temperature, humidity, PIR and door sensor
 they all stop updating their state to HA after a while. I have to reload the integration every now and then in order to get them back to work.

Does this issue hav anything to do with AWS issue worlwide? or is it just a thing with the new TUYA- HA integration? It would be nice to have a response from the developers? :cry:

1 Like

just adding a “mine too”.

I have 25 entities. Trying to add the reload every 15 minutes.

1 Like

I’ve been having the same issue for a little over a month. If I flip a Tuya switch, this goes back to the previous state. However, switching it twice does actually trigger the switch
 but it just shows an invalid state until I reload the server manager. None of my other non-tuya devices have this issue. However, all of my automations still work as expected.

I too am having this issue. I have 20 Tuya devices, wishing I invested in Zigbee devices early on.
Automations that don’t rely on current entity state work fine. I made modifications to my automations to not rely on any Tuya entity states. I hope this will be fixed soon :crossed_fingers: