core icon indicating copy to clipboard operation
core copied to clipboard

All Tuya switches are shown as ON after homeassistant core restart

Open amitanilkulkarni opened this issue 1 year ago • 28 comments
trafficstars

The problem

Seeing this issue after Tuya integration update in 2024.2.1 (which uses SmartLife app instead of Tuya IoT).

After every home assistant restart, all the Tuya switch entities show their state as ON, even though they are in OFF state. Flicking the switch to OFF fixes it, but it's annoying to do that every time home assistant updates or restarts.

Expected: Tuya switches remember the state after restart Seen: Tuya switches show up in home assistant as ON despite of being OFF.

What version of Home Assistant Core has the issue?

core-2024.4.2

What was the last working version of Home Assistant Core?

core-2024.1.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tuya

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tuya

Diagnostics information

home-assistant_tuya_2024-04-09T12-36-45.330Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Can provide more data if required, thanks!

amitanilkulkarni avatar Apr 09 '24 12:04 amitanilkulkarni

Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tuya can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tuya Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)

home-assistant[bot] avatar Apr 09 '24 12:04 home-assistant[bot]

Same problem but switches turns off when home assistant restarts. Tried local tuya and tuya local integrations, same problem

Trilis29 avatar Apr 30 '24 18:04 Trilis29

Hello, this issue is still present. Can someone please check?

image

Please let me know if you need any more logs/info to debug. Thanks!

amitanilkulkarni avatar May 06 '24 04:05 amitanilkulkarni

i have the same issue as well

gautamkrishnar avatar Jun 13 '24 22:06 gautamkrishnar

Issue still persists with Core 2024.5.5

knightofbl00d avatar Jun 17 '24 05:06 knightofbl00d

Upgraded to 2024.6.3, and can confirm that it still persists. I can provide more debug info if required.

amitanilkulkarni avatar Jun 17 '24 13:06 amitanilkulkarni

2024.6.3 Issue is seen here. Please fix it. It is very inconvenience as I need to switch off all and switch on some!!!

vamseekp avatar Jun 18 '24 05:06 vamseekp

this issue has been there since #109155 this basically broke the entire tuya ecosystem.

I was surprised that only some people are reporting bugs about this. Aren't Tuya devices incredibly popular, or am I mistaken?

gautamkrishnar avatar Jun 18 '24 06:06 gautamkrishnar

Seeing this issue after Tuya integration update in 2024.2.1 (which uses SmartLife app instead of Tuya IoT).

After every home assistant restart, all the Tuya switch entities show their state as ON, even though they are in OFF state. Flicking the switch to OFF fixes it, but it's annoying to do that every time home assistant updates or restarts.

Expected: Tuya switches remember the state after restart Seen: Tuya switches show up in home assistant as ON despite of being OFF.

Hi there @amitanilkulkarni 👋

Can you please attach an download diagnostic dump of your device, taken at the moment you think the status is not correct? Thanks!

../Frenck

frenck avatar Jun 19 '24 21:06 frenck

Issue Persists in Core 2024.6.4. Please help to resolve the issue.

vamseekp avatar Jun 28 '24 07:06 vamseekp

Hi @frenck, hope I have provided the right dumps. Please let me know if I missed anything. Thanks!

amitanilkulkarni avatar Jun 28 '24 09:06 amitanilkulkarni

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

This issue absolutely still exists, and affects me every time home assistant is restarted. I have provided all the information requested, and left multiple comments asking if I need to provide more details.

@frenck - Please let me know if you need any more details to remove 'needs-more-information' label.

amitanilkulkarni avatar Jul 12 '24 10:07 amitanilkulkarni

@amitanilkulkarni for now migrating to local tuya solves the problem. I think most of these issues are just tuya APIs returning values that are not up to their published spec.

gautamkrishnar avatar Jul 12 '24 13:07 gautamkrishnar

As @gautamkrishnar mentioned, LocalTuya does not suffer from this bug. I ended up migrating to it for now.

Hoping this gets sorted out in the near future.

amitanilkulkarni avatar Jul 23 '24 14:07 amitanilkulkarni

I am still facing this issue. I will try local Tuya integration and revert.

deCodeIt avatar Jul 30 '24 09:07 deCodeIt

Issue still persists in 2024.8.0 Core

chiraagsuvarna avatar Aug 10 '24 06:08 chiraagsuvarna

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

The issue is still present in the latest home assistant. It should not be marked inactive.

amitanilkulkarni avatar Aug 24 '24 07:08 amitanilkulkarni

Been facing this issue since some time now. This is frustrating to set everything to its appropriate state in the middle of the day when multiple devices are on. Does anyone have any clue for a workaround? Any ETA for fixes? @frenck

KunalAggarwal avatar Sep 02 '24 21:09 KunalAggarwal

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@frenck Did you get a chance to check? This seems to affect a lot of Tuya devices.

amitanilkulkarni avatar Sep 17 '24 08:09 amitanilkulkarni

@amitanilkulkarni I have submitted a PR for this to home-assistant/core. Let's wait for @frenck to approve it. Should fix this issue.

KunalAggarwal avatar Sep 20 '24 11:09 KunalAggarwal

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Not stale. The issue exists and is pending review of a PR which fixes it.

KunalAggarwal avatar Oct 04 '24 13:10 KunalAggarwal

I faced the same issue, All switches turns in Power ON state

monupurohit avatar Oct 05 '24 19:10 monupurohit

As @gautamkrishnar mentioned, LocalTuya does not suffer from this bug. I ended up migrating to it for now.

Hoping this gets sorted out in the near future.

How did you migrated to local tuya.

monupurohit avatar Oct 05 '24 19:10 monupurohit