automations.yaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. - id: '1705510128965'
  2. alias: Activate coffee brewer timer
  3. description: Turns on the coffee brewer electrical switch and starts the timer.
  4. trigger:
  5. - platform: state
  6. entity_id:
  7. - input_boolean.activate_coffee_brewer_timer
  8. to: 'on'
  9. condition: []
  10. action:
  11. - service: switch.turn_on
  12. target:
  13. entity_id:
  14. - switch.kaffetimer
  15. device_id: []
  16. area_id: []
  17. data: {}
  18. - service: timer.start
  19. target:
  20. entity_id: timer.coffee_brewer_timer
  21. data: {}
  22. - service: counter.increment
  23. target:
  24. entity_id: counter.coffee_counter
  25. data: {}
  26. mode: restart
  27. - id: '1706284268833'
  28. alias: Deactivate coffee brewer timer
  29. description: Turns off stuff when manually switching off the timer
  30. trigger:
  31. - platform: state
  32. entity_id:
  33. - input_boolean.activate_coffee_brewer_timer
  34. from: 'on'
  35. to: 'off'
  36. - platform: state
  37. entity_id:
  38. - timer.coffee_brewer_timer
  39. from: active
  40. to: idle
  41. condition: []
  42. action:
  43. - service: input_boolean.turn_off
  44. target:
  45. entity_id:
  46. - input_boolean.activate_coffee_brewer_timer
  47. data: {}
  48. - service: timer.cancel
  49. target:
  50. entity_id: timer.coffee_brewer_timer
  51. data: {}
  52. - service: switch.turn_off
  53. target:
  54. entity_id: switch.kaffetimer
  55. data: {}
  56. mode: single
  57. - id: '1706284484894'
  58. alias: Activate Coffee Brewer at scheduled time
  59. description: Starts the coffee brewer timer at the setup time
  60. trigger:
  61. - platform: time
  62. at: input_datetime.coffee_brewer_scheduled_start_time
  63. condition:
  64. - condition: state
  65. entity_id: input_boolean.enable_scheduled_start_of_coffee_brewer
  66. state: 'on'
  67. action:
  68. - service: input_boolean.turn_on
  69. target:
  70. entity_id:
  71. - input_boolean.activate_coffee_brewer_timer
  72. device_id: []
  73. area_id: []
  74. data: {}
  75. - service: input_boolean.turn_off
  76. target:
  77. entity_id: input_boolean.enable_scheduled_start_of_coffee_brewer
  78. data: {}
  79. mode: single
  80. - id: '1736266866394'
  81. alias: Set Has been Night Flag
  82. description: Set that it has been midnight, and that its ok to turn the light on
  83. trigger:
  84. - platform: time
  85. at: 00:30:00
  86. action:
  87. - service: input_boolean.turn_on
  88. target:
  89. entity_id:
  90. - input_boolean.ext_light_has_been_night
  91. - input_boolean.home_auto_lights_off_has_been_night
  92. data: {}
  93. - id: '1736266934946'
  94. alias: Set Has Been Day Flag
  95. description: ''
  96. trigger:
  97. - platform: time
  98. at: '12:30:00'
  99. action:
  100. - service: input_boolean.turn_on
  101. target:
  102. entity_id: input_boolean.ext_light_has_been_day
  103. - id: '1736267995882'
  104. alias: Control Exterior Light
  105. description: Control the external lights
  106. trigger:
  107. - platform: state
  108. entity_id: input_boolean.exterior_lights_wanted_state
  109. action:
  110. - repeat:
  111. until:
  112. - condition: template
  113. value_template: "{{ (states('sensor.exterior_light_status') == states('input_boolean.exterior_lights_wanted_state')
  114. and \n states('light.exterior_lights') == states('input_boolean.exterior_lights_wanted_state')
  115. ) or \n repeat.index >= 5 }}\n"
  116. sequence:
  117. - service: light.turn_{{ 'off' if is_state('input_boolean.exterior_lights_wanted_state',
  118. 'off') else 'on' }}
  119. target:
  120. entity_id:
  121. - light.exterior_lights
  122. - light.exterior_lights_repeater
  123. - delay: 00:01:00
  124. - id: '1736268207142'
  125. alias: Turn on Exterial Lights In The Evening
  126. description: ''
  127. trigger:
  128. - platform: numeric_state
  129. entity_id:
  130. - sensor.lux_hallby
  131. below: 500
  132. for:
  133. seconds: 0
  134. condition:
  135. - condition: state
  136. entity_id: input_boolean.ext_light_has_been_day
  137. state: 'on'
  138. action:
  139. - service: input_boolean.turn_off
  140. target:
  141. entity_id: input_boolean.ext_light_has_been_day
  142. data: {}
  143. - service: input_boolean.turn_on
  144. target:
  145. entity_id: input_boolean.exterior_lights_wanted_state
  146. data: {}
  147. - id: '1736268250686'
  148. alias: Turn Off Exterior Lights In The Morning
  149. description: ''
  150. trigger:
  151. - platform: numeric_state
  152. entity_id:
  153. - sensor.lux_hallby
  154. above: 710
  155. for:
  156. seconds: 0
  157. condition:
  158. - condition: state
  159. entity_id: input_boolean.ext_light_has_been_night
  160. state: 'on'
  161. action:
  162. - service: input_boolean.turn_off
  163. target:
  164. entity_id: input_boolean.ext_light_has_been_night
  165. data: {}
  166. - service: input_boolean.turn_off
  167. target:
  168. entity_id: input_boolean.exterior_lights_wanted_state
  169. data: {}