Advertisement
Ruddog

Created from My front lights

Jan 20th, 2021
1,149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.64 KB | None | 0 0
  1. alias: Front Lights - evening routine
  2. description: ''
  3. mode: single
  4. trigger:
  5.   - platform: sun
  6.     event: sunset
  7.     offset: '-00:20:00'
  8.   - platform: state
  9.     entity_id: person.ruddog
  10.     to: Neighborhood
  11.     from: not_home
  12.   - platform: time
  13.     at: '23:00'
  14.   - platform: homeassistant
  15.     event: start
  16.   - platform: sun
  17.     event: sunrise
  18.     offset: '-00:10:00'
  19.   - platform: time
  20.     at: '04:00'
  21. condition: []
  22. action:
  23.   - choose:
  24.       - conditions:
  25.           - condition: sun
  26.             after: sunset
  27.             after_offset: '-00:20:00'
  28.           - condition: time
  29.             before: '23:00'
  30.         sequence:
  31.           - service: switch.turn_on
  32.             data: {}
  33.             entity_id: switch.blue_led
  34.       - conditions:
  35.           - condition: or
  36.             conditions:
  37.               - condition: state
  38.                 entity_id: person.ruddog
  39.                 state: Neighborhood
  40.               - condition: time
  41.                 after: '23:00'
  42.                 before: '04:00'
  43.         sequence:
  44.           - service: switch.turn_on
  45.             data: {}
  46.             entity_id: switch.blue_led
  47.           - delay: '00:15:00'
  48.           - service: switch.turn_off
  49.             data: {}
  50.             entity_id: switch.blue_led
  51.       - conditions:
  52.           - condition: time
  53.             after: '04:00'
  54.           - condition: sun
  55.             before: sunrise
  56.             before_offset: '-00:10:00'
  57.         sequence:
  58.           - service: switch.turn_on
  59.             data: {}
  60.             entity_id: switch.blue_led
  61.     default:
  62.       - service: switch.turn_off
  63.         data: {}
  64.         entity_id: switch.blue_led
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement