Google assistant: deactive a scene?

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 :wink: 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.

1 Like

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’ :slight_smile:

Cheers guys, i’ll give this a try later.

I’ve exposed “scripts” to google here. Google seems to see them as “scenes”. Are they the same thing?

Dave, why not just call your stop mode : -
Party Grinch is in da house
Or
Dad’s Home

:rofl:

Haha. I actually had it wrong, it’s “Hey Google, shut down the party”. I should really include a condition so it only works after 2am :laughing:

1 Like

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

That would be okay as when I go to bed at 19:00 that would work as 19:00 is after 02:00 :rofl:
You probably should have : -

  - condition: moon
    state: bluemoon

:rofl: