Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Automation with conditional on minutes since setting SimpliSafe alarm

$
0
0

@brian1917 wrote:

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 :face_with_symbols_over_mouth:)

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

Posts: 8

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles