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 !!!