I have a very basic configuration - 2 scripts [party_mode_on] and [party_mode_off]. They simply turn on/off a switch, for now.
I have google assistant configured, and working:
google_assistant:
project_id: !secret google_assistant_project_id
api_key: !secret google_assistant_api_key
expose_by_default: false
entity_config:
script.party_mode_on:
name: party mode on
expose: true
When I say “OK Google, turn on party mode”, script.party_mode_on activates, as expected.
I can’t figure out how to deactivate a scene. The correct command is “OK Google, turn off party mode” or “OK Google, deactivate party mode”, but what does this link to in the configuration.yaml above? What ‘name’ is google looking for when turn off / deactivate is used? The response from google is “sorry i don’t know how to help with that”.
This does not work:
entity_config:
script.party_mode_on:
name: party mode on
expose: true
script.party_mode_off:
name: party mode off
expose: true
What happens in this case, is turn on executes BOTH scripts in turn. “sure, activating 2 scenes”, turn off results in “sorry, i don’t know how to help with that”.
You can’t deactivate a scene - they can only be turned on (applied).
That though is a script However, you can only turn off a script if it’s running.
What I’d recommend is that you expose an input_boolean that you turn on and off, and use that in automations to enable and disable party mode - turning entities on/off/whatever as required.
Change the names so they dont include the words ‘on’ and ‘off’. I think it’s soimply confusing Google. I use the same setup except that the names that are exposed to Google are: ‘Get the party started’ and ‘stop the party’. That way I just say: ‘Hey Google, get the party started’, or ‘Hey Google, stop the party’
Yeah, Scripts don’t exist in the Google Home app but your HA Scripts are there as Scenes. You can add them into Google Routines and they will work just like a normal HA Script. Its just a naming difference between the two platforms