Switch is always toggling states reglardless of what you say

Hi guys,

First post here. First of all forgive me, english is not my mother language.

I have searched everywhere but I cannot seem to find the answer to my problem.

I have a lot of light switches which are Tuya Wifi and have been integrated through smart life and local tuya in home assistant.

I have all my devices exposed to Alexa.

My problem is, if I tell Alexa to shut off my light switch the switch toogles states. I know this because if I tell Alexa to turn off again the switch when it is already off, it toogles to ON. If I go inside Alexa app it seems that she knows the state of the switches because those are displayed correctly in the app.

This is an issue because if I want to turn off all lights in the house, all the switches will toogle there states and that is not what I want.

Does anyone have the same problem? Where should I look?

This definitely seems like an Alexa problem rather than a Home Assistant problem. Home Assistant will send off commands when asked to, and on commands when asked to. I have no idea why Alexa would even be trying to change the state of a switch to the opposite state. If you tell it turn off a light it should be sending an off command not a toggle command.

Do you know how can I troubleshoot which command does HA send to Alexa?

you’ll want something like:

logger:
  logs:
    homeassistant.components.alexa: debug
1 Like