Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- timer:
- garage_open:
- name: Garage is open
- duration: "00:06:00"
- restore: true
- icon: mdi:timer-outline
- automation:
- - alias: "Garage: Door open notification"
- id: garage_601
- description: "Notify when the garage door is open"
- mode: single
- trigger:
- - platform: state
- id: garage_open
- entity_id: cover.garage_door
- to: "open"
- action:
- - service: timer.start
- target:
- entity_id: timer.garage_open
- - variables:
- msg: "The garage door is open"
- - service: notify.family_devices
- data:
- message: "{{ msg }}"
- data:
- tag: "garage-door-open-notification"
- priority: high
- ttl: 0
- persistent: true
- sticky: true
- notification_icon: "mdi:garage-alert"
- color: "#C0392B" #red-ish
- car_ui: true
- actions:
- - action: action_garage_close
- title: Close
- - action: action_garage_leave
- title: Leave
- - alias: "Garage: Door closed confirmation"
- id: garage_604
- description: "Confirmation notification when garage door is closed"
- mode: single
- trigger:
- - platform: state
- entity_id: cover.garage_door
- from: "open"
- to: "closed"
- action:
- - service: timer.cancel
- target:
- entity_id: timer.garage_open
- - service: notify.family_devices
- data:
- message: "clear_notification"
- data:
- tag: "garage-door-open-notification"
- priority: high
- ttl: 0
- - service: notify.family_devices
- data:
- message: The garage door is now closed
- data:
- sticky: true
- timeout: 30
- notification_icon: "mdi:garage"
- color: "#229954" #green-ish
- tag: "garage-door-closed-notification"
- priority: high
- ttl: 0
- - alias: "Garage: Door action handler for Close"
- id: garage_606
- description: "Close garage action"
- mode: single
- trigger:
- - platform: event
- event_type: mobile_app_notification_action
- event_data:
- action: action_garage_close
- condition:
- - condition: state
- entity_id: cover.garage_door
- state: "open"
- action:
- - service: timer.cancel
- target:
- entity_id: timer.garage_open
- - service: notify.family_devices
- data:
- message: "clear_notification"
- data:
- tag: "garage-door-open-notification"
- priority: high
- ttl: 0
- - service: cover.close_cover
- target:
- entity_id: cover.garage_door
- - wait_template: "{{ is_state('cover.garage_door', 'closed') }}"
- timeout: 60
- - if:
- - condition: template
- value_template: "{{ not is_state('cover.garage_door', 'closed') }}"
- then:
- - service: notify.family_devices
- data:
- message: The garage door is still open or in an unknown state ({{ states('cover.garage_door')}})
- data:
- sticky: true
- timeout: 60
- notification_icon: "mdi:garage"
- color: "#C0392B" #red-ish
- car_ui: true
- - alias: "Garage: Door open timeout handler"
- id: garage_607
- description: "Close garage after timeout"
- mode: single
- trigger:
- - platform: event
- event_type: timer.finished
- event_data:
- entity_id: timer.garage_open
- condition:
- - condition: state
- entity_id: cover.garage_door
- state: "open"
- action:
- - service: notify.family_devices
- data:
- message: "clear_notification"
- data:
- tag: "garage-door-open-notification"
- priority: high
- ttl: 0
- - service: cover.close_cover
- enabled: true
- target:
- entity_id: cover.garage_door
- - service: notify.family_devices
- data:
- message: The garage door is closing
- data:
- tag: "garage-door-closing-notification"
- priority: high
- ttl: 0
- sticky: true
- timeout: 60
- notification_icon: "mdi:garage"
- color: "#F39C12" #orange-ish
- car_ui: true
- - wait_template: "{{ is_state('cover.garage_door', 'closed') }}"
- timeout: 60
- - service: notify.family_devices
- data:
- message: "clear_notification"
- data:
- tag: "garage-door-closing-notification"
- priority: high
- ttl: 0
- - alias: "Garage: Door action handler for Leave"
- id: garage_608
- description: "Leave garage in it's current state"
- mode: single
- trigger:
- - platform: event
- event_type: mobile_app_notification_action
- event_data:
- action: action_garage_leave
- condition:
- - condition: state
- entity_id: cover.garage_door
- state: "open"
- action:
- - service: timer.cancel
- target:
- entity_id: timer.garage_open
- - service: notify.family_devices
- data:
- message: "clear_notification"
- data:
- tag: "garage-door-closing-notification"
- priority: high
- ttl: 0
- - service: notify.family_devices
- data:
- message: Leaving garage as is ({{ states('cover.garage_door')}})
- data:
- timeout: 60
- notification_icon: "mdi:garage-open"
- color: "#F39C12" #orange-ish
- car_ui: true
Advertisement
Add Comment
Please, Sign In to add comment