home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.14k stars 29.81k forks source link

Light switch keeps turning off when I turn it on. #121529

Open sushantjaipuria opened 2 months ago

sushantjaipuria commented 2 months ago

The problem

I have have 1 smart light and 2 smart sockets set up on my Tuya Smart Life account which gets routed into Home Assistant through the integration. On the Smart Life app and on Google Home everything works perfectly. Both the sockets work perfectly on HA as well. However I have issues with the Light.

Issue 1: On boot up of HA, the smart light shows disabled on HA. I have to switch it on/off on Smart Life or Google Home for HA to enable the Light.

Issue 2: When enabled the Light is always in a switched off state even if the light is switched on through any platform. On HA, whenever I turn the switch on it will immediately turn back to an off state.

My Setup: HA Core - 2024.7.1 HA Operating System - 12.3 Setup on Raspberry Pi 5 B 8GB with 65GB A2 SD card.

I'm failing to understand the issue as 2 devices work fine however its only the light which is causing trouble and I have no idea how to fix this.

Please help!

What version of Home Assistant Core has the issue?

2024.7.1

What was the last working version of Home Assistant Core?

No response

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-07-08T13-42-28.113Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 months ago

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)

amithkk commented 2 months ago

Likely the same issue as #114100 , could you please post logs associated with the device?

sushantjaipuria commented 2 months ago

Likely the same issue as #114100 , could you please post logs associated with the device?

Hi - I'm not sure what you mean. Can you help me understand how to get the logs?

By any chance do you mean this "https://github.com/user-attachments/files/16129209/home-assistant_tuya_2024-07-08T13-42-28.113Z.log" ? I got this from the Debug Logging in devices for the Tuya integration.

amithkk commented 2 months ago

Ah, missed the link in the main post. The error seems to be the same typecast error present in #114100, since it is an upstream bug, tuya will need to fix this. There are some workarounds documented in the linked issue