Automation that triggers via google voice?

Hi All!

I seem to have my HA install up and running. I even managed to configure SSL and get google assistant working. For example I can tell google “hey google, harry potter light on” and it’ll turn it on. Fantastic.

If I want to be able to say “ok google, cooking mode on” that would set an array of lights a certain way, how do I do that? Do I create a scene with said lights and just call the scene cooking mode?

I believe the proper Google term is “Hey Google, active …”

perhaps the stuff below from my setup will give you some ideas.

Good hunting!

say "Hey Google, activate Sunbeam Preheat"

# configuration.yaml
# google assistant
# https://www.nabucasa.com/config/google_assistant/
cloud:
  google_actions:
    filter:
      include_entities:
        - script.bed_sunbeam
    entity_config:
      script.bed_sunbeam:
        name: Sunbeam Preheat
        room: Small Bedroom

# scripts.yaml
bed_sunbeam:
  alias: bed_sunbeam
  sequence:
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: tts.cloud_say
    data:
      entity_id: media_player.living_room
      message: Starting up Sunbeam Mattress Pad Preheat
  - service: switch.turn_on
    target:
      entity_id: switch.sunbeam_mattress_power
  - wait_template: '{{ is_state(''sensor.small_bedroom_sunbeam_bedding_state'', ''True'')
      }}'
    timeout: '15'
  - service: tts.cloud_say
    data:
      entity_id: media_player.living_room
      message: Mattress pad has turned on.
  - service: switch.turn_on
    target:
      entity_id: switch.sunbeam_mattress_preheat
  - wait_template: '{{ is_state(''sensor.small_bedroom_sunbeam_bedding_preheat'',
      ''True'') }}'
    timeout: '15'
  - service: tts.cloud_say
    data:
      entity_id: media_player.living_room
      message: Mattress pad preheat is on.
  mode: restart
  icon: mdi:bed-outline