Google Assistant: Turning off the lights but not on?

Hi there!

I’ve successfully configured Home-assistant and the Google Actions projects. It is listed and linked in my Google App and I’ve added the lights / switches to the corresponding rooms. I have just this weird problem, every time I say “OK Google turn on the lights in the living room” it’ll respond with “Allright turning on the lights in the living room” but nothing happens. No log messages in home-assistant either.

But now comes the strange part, if I turn on the lights in home-assistant and say “OK Google turn off the lights in the living room” it’ll respond with “Allright turning off the lights” and it turns off the lights successfully!

I have no idea why it doesn’t turn my lights on, but I think because it turns them off there is nothing wrong with the Google Assistant configuration right?

Do you guys have any idea where to look? I’ve 2 types of lights, Philips Hue (configured in home-assistant, I have not added the philips hue bridge to the Google App to prevent duplicate lights in the app) and a custom sonoff switch with Tasmota with MQTT configured correctly (I think because I can turn it on and off through Home Assistant).



=== UPDATE ===

I monitored the MQTT topic but it shows only the OFF commands. The ON commands only work from Home Assistant…

I tried to reinstall Homeassistant hoping that it would fix the problem. I had an old version of hassbian which I updated regularly. Now I’ve installed but with the same result…

So I am stil stuck, does anybody know what kind of request is made from Google to the Raspberry to perform the Google Home automation request? I think it is some firewall thing or port forwarding. It would be strange because turning the lights off works but turning it on doesn’t…

=== UPDATE ===

I’ve enabled debug logging for the google_assistant component, if I say “Turn off the lights” it turns them off and shows a log message like this:
2018-02-10 22:03:27 DEBUG (MainThread) [homeassistant.components.google_assistant.smart_home] Handling command action.devices.commands.OnOff with data {'on': False}

But it does not show any log when I ask to turn the lights on…

Hi, I have the same issue. I have two Sonoff switches in my living room. one using the Home Assistant and the other using the original Sonoff software. The original Sonoff works fine and I can turn it off and on, but, the HA Sonoff will only do one and the for the other it will say something like ‘this light isn’t set up yet’. However, if I say “turn off living room lights or turn on living room lights” then it works. So turning off the Sonoff HA individually on its own doesn’t work but works as a group command.

And the plot thickens…

In my case she doesn’t say “this light isn’t set up yet” she just says “Ok turning on the lights” and nothing happens.

I’ve created a video of the behaviour:

Allright, I’ve talked to somebody in the discord chat. Turns out if you use the phrase “Turn on the living room” it works, if you phrase “Turn on the lights in the living room” it doesn’t work. Why it doesn’t work he didn’t know and me neither but it is safe to say that it is not a configuration issue / hassbian / hassio issue because with the phrase “Turn on the lights in the living room” no request from google is made to Homeassistant. It is made when you use the phrase “Turn on the living room”.

All is working :slight_smile:

@zainuluk could you try using the phrase “Turn on %roomname%” ex: “Turn on the living room” so don’t use the word lights.

No it doesn’t work if I say… ‘turn on living room’. Google says 'I don’t know which living room to turn on.

It is strange. I set up the configuration for a light switch which isn’t connected to an actual light and saying’ turn on light 6’ it comes back with it saying that it has been turned on. But doing it to an actual light doesn’t work.

Update: I managed to get all switches working by changing the nick names for each device. It seems to be very sensation. For example if I call a switch ‘lamp 1’ then it won’t work but if I call the ‘lamp 11’ then it works fine. No idea why may be it is a bug. I will continue testing.