Advertisement
Ruddog

Front Lights - evening routine

Jan 20th, 2021 (edited)
1,027
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.29 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.doug
  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.outside_lights_front
  34. - conditions:
  35. - condition: or
  36. conditions:
  37. - condition: state
  38. entity_id: person.doug
  39. state: Neighborhood
  40. - condition: state
  41. entity_id: person.janet
  42. state: Neighborhood
  43. - condition: time
  44. after: '23:00'
  45. before: '04:00'
  46. sequence:
  47. - service: switch.turn_on
  48. data: {}
  49. entity_id: switch.outside_lights_front
  50. - delay: '00:15:00'
  51. - service: switch.turn_off
  52. data: {}
  53. entity_id: switch.outside_lights_front
  54. - conditions:
  55. - condition: time
  56. after: '04:00'
  57. - condition: sun
  58. before: sunrise
  59. before_offset: '-00:10:00'
  60. sequence:
  61. - service: switch.turn_on
  62. data: {}
  63. entity_id: switch.outside_lights_front
  64. default:
  65. - service: switch.turn_off
  66. data: {}
  67. entity_id: switch.outside_lights_front
  68. mode: single
  69. max: 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement