I am trying to set up automation so opening a garage door shuts off my alarm and makes an API call (to change heat/AC on Nest - custom API since Google is awful and doesn’t work natively with Home Assistant )
The flow I think I have right now (below) is … if my garage door or my wife’s door opens and the alarm is set to home or away it takes the appropriate action.
The missing piece is I only want this to happen if the alarm has been set for longer than 10 mins
or else I’ll set the alarm on my way out and opening my door to leave will disarm it.
I’ve been poking around but can’t find how to do it. Is there a way to get the time since the state change on the alarm and use that as a conditional?
- id: '1580851534466'
alias: Shut off alarm if garage door opens
description: ''
trigger:
- entity_id: cover.brians_garage_door
from: closed
platform: state
to: open
- entity_id: cover.courtneys_garage_door
from: closed
platform: state
to: open
condition:
- condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.123_fake_road_alarm_control_panel
state: away
- condition: state
entity_id: alarm_control_panel.123_fake_road_alarm_control_panel
state: home
action:
- condition: state
entity_id: alarm_control_panel.123_fake_road_alarm_control_panel
state: 'off'
- data:
parameters: cool=70&heat=72
service: rest_command.l48l_state
I didn’t see the option to do for in the GUI automation editor for condition. I just saw them in triggers.
I’ll give it a try in the YAML and see if it works and if not will give the template a try.
Thanks!
@popboxgun - i noticed your state is armed in your example. I’ve been struggling on where to find documentation on supported states for different devices. So for SimpliSafe alarm control panels am I wrong in assuming the state can be home, off, and away ? Is the state only armed and something else? This would be for setting the alarm and also querying it’s state in a conditional.
(Tagging @bachya too since he would know probably more than anyone )
Ah! Thank you! I’m only a few days in and I hadn’t looked at this page at all. Sometimes the answers are so close by … instead of Googling all this, if I had just stumbled over there I’d be in way better shape.