Using google home alarm turnd off to start morning routine

I’m trying to make an automation based on an alarm on my google home hub
I have several hubs in my house, i would make an automation for each, since the actions are different for each hub

To start, i j’m just trying to turn on a light when an alarm that goes off, is set to “off”
I’m using this integration:

So when an alarm is set and goes off, nothing needs to happen
The light has to turned on, when the alarm is STOPPED
When the alarm is snoozed, it should do nothing, since its not the same as stopped.
So only when the alarm is set to off, actions should be taken

I tried with some code, but not sure its good or the right way to go… or perhaps it can be made easier

##########################
## Google Home alarms
##########################

- id: 'Google Home alarm'
  alias: 'GH Alarm trigger'
  trigger:
  - platform: template #Trigger if the current / time date is the same as the current alarm time.
    value_template: "{{ as_timestamp(now()) == as_timestamp(states('sensor.woonkamer_mini_alarms')) }}"
  condition: []
  action:
  - alias: "Wait until the alarm status isn't snoozed"
    wait_template: "{{ not is_state_attr('sensor.woonkamer_mini_alarms', 'alarms[0].status', 'snoozed') }}"
  - entity_id: light.kastlamp
    service: light.turn_on
  #...
  #Do you actions / sripts
  mode: single  

Help would be much appreciated !!!

1 Like

Not much replies here

What you have to do write a script that has all the automation actions (ie. turning on the light), you can even have conditions to an extent. Then expose this to the Google Home app which will make it show up as a scene in Google Home. Lastly, make a Google Home routine using an alarm cancel as the trigger and that scene (which is your actions script) as the action. I few routines/automations setup this way and works like a charm.
The addon is great but not needed for this because you dont need to know when the alarm is set for in HA, the heavy lifting is done in GH.