Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- description: ""
- alias: Notify when door not opened in time frames
- mode: single
- triggers:
- - trigger: state
- entity_id:
- - binary_sensor.door_contact
- to:
- - "on"
- id: Door opened
- - trigger: time
- at: "09:00:00"
- id: Time's up
- - trigger: time
- at: "12:00:00"
- id: Time's up
- - trigger: time
- at: "15:00:00"
- id: Time's up
- - trigger: time
- at: "18:00:00"
- id: Time's up
- conditions: []
- actions:
- - choose:
- - conditions:
- - condition: trigger
- id:
- - Door opened
- - condition: or
- conditions:
- - condition: time
- after: "08:00:00"
- before: "09:00:00"
- - condition: time
- after: "11:00:00"
- before: "12:00:00"
- - condition: time
- after: "14:00:00"
- before: "15:00:00"
- - condition: time
- after: "17:00:00"
- before: "18:00:00"
- alias: In one of the time frames
- sequence:
- - action: input_boolean.turn_on
- metadata: {}
- target:
- entity_id: input_boolean.door_opened_in_timeframe
- data: {}
- - conditions:
- - condition: trigger
- id:
- - Time's up
- - condition: state
- entity_id: input_boolean.door_opened_in_timeframe
- state:
- - "off"
- sequence:
- - action: notify.mobile_app
- metadata: {}
- data:
- message: Door not opened!
- - action: input_boolean.turn_off
- metadata: {}
- target:
- entity_id: input_boolean.door_opened_in_timeframe
- data: {}
- - conditions:
- - condition: trigger
- id:
- - Time's up
- sequence:
- - action: input_boolean.turn_off
- metadata: {}
- target:
- entity_id: input_boolean.door_opened_in_timeframe
- data: {}
Advertisement
Add Comment
Please, Sign In to add comment