ext_lights.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ############################ Battery Automations, Scripts & Sensors ##################################
  2. # All entities to have the prefix: "battery_" or name: Battery:
  3. ######################################################################################################
  4. light:
  5. - platform: rflink
  6. automatic_add: true
  7. devices:
  8. newkaku_013242b6_1:
  9. name: Exterior lights
  10. type: switchable
  11. newkaku_013242b5_1:
  12. name: Exterior lights REPEATER
  13. type: switchable
  14. input_boolean:
  15. ext_light_on_done:
  16. name: Bool switch, Ext light turned ON
  17. icon: mdi:car
  18. ext_light_off_done:
  19. name: Bool switch, Ext light turned OFF
  20. icon: mdi:car
  21. automation:
  22. - alias: Exterior lights ON in evening
  23. description: In the evening, turn the lights ON
  24. trigger:
  25. - platform: numeric_state
  26. entity_id: sensor.lux_outside_the_garage
  27. below: '100'
  28. condition:
  29. - condition: state
  30. entity_id: input_boolean.ext_light_on_done
  31. state: 'off'
  32. action:
  33. - service: light.turn_on
  34. data: {}
  35. entity_id: light.exterior_lights_repeater
  36. - service: light.turn_on
  37. data: {}
  38. entity_id: light.exterior_lights
  39. - service: input_boolean.turn_on
  40. data: {}
  41. entity_id: input_boolean.ext_light_on_done
  42. mode: single
  43. - alias: Exterior lights OFF in morning
  44. description: ''
  45. trigger:
  46. - platform: numeric_state
  47. entity_id: sensor.lux_outside_the_garage
  48. above: '50'
  49. condition:
  50. - condition: state
  51. entity_id: input_boolean.ext_light_off_done
  52. state: 'off'
  53. action:
  54. - service: light.turn_off
  55. data: {}
  56. entity_id: light.exterior_lights_repeater
  57. - service: light.turn_off
  58. data: {}
  59. entity_id: light.exterior_lights
  60. - service: input_boolean.turn_on
  61. data: {}
  62. entity_id: input_boolean.ext_light_off_done
  63. mode: single
  64. - alias: Turn boolean switches off at midnight
  65. description: ''
  66. trigger:
  67. - platform: time
  68. at: 00:05:00
  69. condition: []
  70. action:
  71. - service: input_boolean.turn_off
  72. data: {}
  73. entity_id: input_boolean.ext_light_off_done
  74. - service: input_boolean.turn_off
  75. data: {}
  76. entity_id: input_boolean.ext_light_on_done
  77. mode: single