ext_lights.yaml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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: and
  30. conditions:
  31. - condition: state
  32. entity_id: input_boolean.ext_light_on_done
  33. state: 'off'
  34. - condition: state
  35. entity_id: light.exterior_lights
  36. state: 'off'
  37. action:
  38. - service: light.turn_on
  39. data: {}
  40. entity_id: light.exterior_lights_repeater
  41. - service: light.turn_on
  42. data: {}
  43. entity_id: light.exterior_lights
  44. - service: input_boolean.turn_on
  45. data: {}
  46. entity_id: input_boolean.ext_light_on_done
  47. mode: single
  48. - alias: Exterior lights OFF in morning
  49. description: ''
  50. trigger:
  51. - platform: numeric_state
  52. entity_id: sensor.lux_outside_the_garage
  53. above: 50
  54. condition:
  55. condition: and
  56. conditions:
  57. - condition: state
  58. entity_id: input_boolean.ext_light_off_done
  59. state: 'off'
  60. - condition: state
  61. entity_id: light.exterior_lights
  62. state: 'on'
  63. action:
  64. - service: light.turn_off
  65. data: {}
  66. entity_id: light.exterior_lights_repeater
  67. - service: light.turn_off
  68. data: {}
  69. entity_id: light.exterior_lights
  70. - service: input_boolean.turn_on
  71. data: {}
  72. entity_id: input_boolean.ext_light_off_done
  73. mode: single
  74. - alias: Turn boolean switches off at midnight
  75. description: ''
  76. trigger:
  77. - platform: time
  78. at: 00:05:00
  79. condition: []
  80. action:
  81. - service: input_boolean.turn_off
  82. data: {}
  83. entity_id: input_boolean.ext_light_off_done
  84. - service: input_boolean.turn_off
  85. data: {}
  86. entity_id: input_boolean.ext_light_on_done
  87. mode: single