Tuya Not Refreshing Status entities

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:

I add to delete/pair the plug with the tuya app and now it’s working again :+1: Also today, my Ikea zigbee plug stoped responding. After plugged/unplugged it, itstarted working again… I think that’s this requires a lot of maintenance :confused:

I have also noted there is more restarts needed now as posted here: Integrations stop responding in december version - Configuration - Home Assistant Community (home-assistant.io)

I stumbled across a pretty simple and elegant solution yesterday that can be found here: Tuya light switches don't remember state after toggle (Only reloading the integration helps) · Issue #61854 · home-assistant/core · GitHub

Pretty much the automation looks for the failed message in the system logs then reloads the Tuya config. I enabled it yesterday and it works well.

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:
        - YOUR_TUYA_ENTITY_HERE

Be sure to add this to your configuration.yaml file:

system_log:
  fire_event: true
2 Likes

Same here :point_up: 4 entities, started some weeks ago

1 Like

I have noticed this since the last update. My devices function but the status is not updated in HA until the integration is reloaded.

1 Like

Update: Confirmed this fixed the issue.

Testing this fix out: Tuya Integration apparently fails to renew cloud access token - githubmate

I tried the homeassistant.reload_config_entry approach but it caused my devices to become unavailable after a couple of reloads.

This automation has been treating me better so far:

- id: '1641360148445'
  alias: Update Tuya Entities
  description: ''
  trigger:
  - platform: time_pattern
    minutes: /30
  condition: []
  action:
  - service: homeassistant.update_entity
    target:
      entity_id:
      - sensor.4kw_geyser_power
      - sensor.2kw_geyser_power
      - sensor.washing_machines_power
  mode: single

Just dropping this here in case it helps someone else.

4 Likes

@justanothernaude thank you for this automation. This helped me a lot. because my door sensors did not update their status to HA and restarting the whole Tuya V2 Integration seemed to be a bit like using a sledgehammer to crack a nut :slight_smile:

1 Like

Are there any plans to fix this? Do we need to file a bug somewhere?

2 Likes

This solved it for me…

1 Like