Guest User

Untitled

a guest
Jan 28th, 2026
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.09 KB | None | 0 0
  1. description: ""
  2. alias: Notify when door not opened in time frames
  3. mode: single
  4. triggers:
  5.   - trigger: state
  6.     entity_id:
  7.      - binary_sensor.door_contact
  8.     to:
  9.      - "on"
  10.     id: Door opened
  11.   - trigger: time
  12.     at: "09:00:00"
  13.     id: Time's up
  14.   - trigger: time
  15.     at: "12:00:00"
  16.     id: Time's up
  17.   - trigger: time
  18.     at: "15:00:00"
  19.     id: Time's up
  20.   - trigger: time
  21.     at: "18:00:00"
  22.     id: Time's up
  23. conditions: []
  24. actions:
  25.   - choose:
  26.       - conditions:
  27.           - condition: trigger
  28.             id:
  29.              - Door opened
  30.           - condition: or
  31.             conditions:
  32.               - condition: time
  33.                 after: "08:00:00"
  34.                 before: "09:00:00"
  35.               - condition: time
  36.                 after: "11:00:00"
  37.                 before: "12:00:00"
  38.               - condition: time
  39.                 after: "14:00:00"
  40.                 before: "15:00:00"
  41.               - condition: time
  42.                 after: "17:00:00"
  43.                 before: "18:00:00"
  44.             alias: In one of the time frames
  45.         sequence:
  46.           - action: input_boolean.turn_on
  47.             metadata: {}
  48.             target:
  49.               entity_id: input_boolean.door_opened_in_timeframe
  50.             data: {}
  51.       - conditions:
  52.           - condition: trigger
  53.             id:
  54.              - Time's up
  55.           - condition: state
  56.             entity_id: input_boolean.door_opened_in_timeframe
  57.             state:
  58.              - "off"
  59.         sequence:
  60.           - action: notify.mobile_app
  61.             metadata: {}
  62.             data:
  63.               message: Door not opened!
  64.           - action: input_boolean.turn_off
  65.             metadata: {}
  66.             target:
  67.               entity_id: input_boolean.door_opened_in_timeframe
  68.             data: {}
  69.       - conditions:
  70.           - condition: trigger
  71.             id:
  72.              - Time's up
  73.         sequence:
  74.           - action: input_boolean.turn_off
  75.             metadata: {}
  76.             target:
  77.               entity_id: input_boolean.door_opened_in_timeframe
  78.             data: {}
  79.  
Advertisement
Add Comment
Please, Sign In to add comment