Google SDK Automation

Hello All

I’m having an issue using the Google SDK to send a command to turn off a night light that used to work.

This device is a Tuya smart oil diffuser with a night light. If I use my voice I can turn off the night light. If I even use the Google SDK send TXT command in my automation and hit run it works.

But having this setup as an automation based off time or sun rise as a trigger will not turn the night light off.

I’ve even tried to setup a script with same results. I’m at a loss why this won’t work.

Any ideas?

Sounds to me like you may have an issue with your trigger then, however with no automation and/or trace details I am just guessing.

May be a good idea to post up your automation’s yaml as it’s difficult to people to help otherwise.

Appologies, I have attached the yaml

id: ‘1688352528721’
alias: Test
description: ‘’
trigger:

  • platform: sun
    event: sunrise
    offset: 0
    condition: []
    action:
  • service: google_assistant_sdk.send_text_command
    data:
    command: Turn Off Reese’s Night Light
    mode: single

Bump

Anyone have an idea?

Can you paste the code between code blocks

Are you creating this automation in the UI ?

Does it trigger at sunrise, what do the traces show if it does?

Any errors logged at sunrise?

alias: Reese's Night Light Off
description: ''
trigger:
  - platform: sun
    event: sunrise
    offset: 0
condition: []
action:
  - service: google_assistant_sdk.send_text_command
    data:
      command: Turn Off Reese's Night Light
mode: single

I am creating this automation in Home Assistant UI. The odd part is I have a two of these night lights for both my kids and I have another automation setup that runs a script to turn one off and change the other to a lower brightness at night before they go to bed. This one works.

Only this automation to turn it off in the morning wont work. I’ve tried a set time or sunrise and none work but used to at one point. Also power cycled the device just to be sure it wasn’t a glitch. Sorry fairly new to HA and still learning.

Thanks for helping

I don’t see anything wrong with the yaml and as you say you can run the SDK command successfully I would have to assume it’s not triggering.

Are there any traces for the automation to confirm if it is actually triggering or not ?

Well good news is it’s all working. I was previously using Smart Life app and remember the devices would also work on Tuya app.

So I deleted everything, re-added to the Tuya app and then I deleted the previous Tuya IOT project and set that up from scratch again.

Not sure exactly what caused the issue but redoing it certainly fixed it. Thank you for your help

has anyone seen this error when trying to setup google sdk? I can’t seem to get around it - this is after clicking add google account.

thank you

image

Have tried for a few hours to get around this. I am trying to work out how to clear my initial login entry which is clearly wrong to stop this error.

Does anyone know if I’m running home assistant Docker where this would be saved so I can clear the login? And try again. Thanks

Frustrating. May have to just clear out home assistant and reset it up from backup
edit; this solved my problem How do I reset the credentials for google assistant SDK integration?