Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.32 KB | None | 0 0
  1. start_flashing_color_light:
  2. alias: "Start color light flashing"
  3. sequence:
  4. - condition: state
  5. entity_id: input_boolean.block_flashing_color_light
  6. state: 'off'
  7. - service: light.turn_on
  8. entity_id: light.gateway_light_f0b429cc30b1
  9. data_template:
  10. color_name: >
  11. {% if color_name %}
  12. {{color_name}}
  13. {% else %}
  14. red
  15. {% endif %}
  16. - delay:
  17. milliseconds: 250
  18. - service: light.turn_off
  19. entity_id: light.gateway_light_f0b429cc30b1
  20. - condition: state
  21. entity_id: input_boolean.block_flashing_color_light
  22. state: 'off'
  23. - service: light.turn_on
  24. entity_id: light.gateway_light_f0b429cc30b1
  25. data_template:
  26. color_name: >
  27. {% if color_name %}
  28. {{color_name}}
  29. {% else %}
  30. red
  31. {% endif %}
  32. - delay:
  33. milliseconds: 250
  34. - service: light.turn_off
  35. entity_id: light.gateway_light_f0b429cc30b1
  36. - condition: state
  37. entity_id: input_boolean.block_flashing_color_light
  38. state: 'off'
  39. - service: light.turn_on
  40. entity_id: light.gateway_light_f0b429cc30b1
  41. data_template:
  42. color_name: >
  43. {% if color_name %}
  44. {{color_name}}
  45. {% else %}
  46. red
  47. {% endif %}
  48. - delay:
  49. milliseconds: 250
  50. - service: light.turn_off
  51. entity_id: light.gateway_light_f0b429cc30b1
  52. - condition: state
  53. entity_id: input_boolean.block_flashing_color_light
  54. state: 'off'
  55. - service: light.turn_on
  56. entity_id: light.gateway_light_f0b429cc30b1
  57. data_template:
  58. color_name: >
  59. {% if color_name %}
  60. {{color_name}}
  61. {% else %}
  62. red
  63. {% endif %}
  64. - delay:
  65. milliseconds: 250
  66. - service: light.turn_off
  67. entity_id: light.gateway_light_f0b429cc30b1
  68. - condition: state
  69. entity_id: input_boolean.block_flashing_color_light
  70. state: 'off'
  71. - service: light.turn_on
  72. entity_id: light.gateway_light_f0b429cc30b1
  73. data_template:
  74. color_name: >
  75. {% if color_name %}
  76. {{color_name}}
  77. {% else %}
  78. red
  79. {% endif %}
  80. - delay:
  81. milliseconds: 250
  82. - service: light.turn_off
  83. entity_id: light.gateway_light_f0b429cc30b1
  84. - condition: state
  85. entity_id: input_boolean.block_flashing_color_light
  86. state: 'off'
  87. - service: light.turn_on
  88. entity_id: light.gateway_light_f0b429cc30b1
  89. data_template:
  90. color_name: >
  91. {% if color_name %}
  92. {{color_name}}
  93. {% else %}
  94. red
  95. {% endif %}
  96. - delay:
  97. milliseconds: 250
  98. - service: light.turn_off
  99. entity_id: light.gateway_light_f0b429cc30b1
  100. - condition: state
  101. entity_id: input_boolean.block_flashing_color_light
  102. state: 'off'
  103. - service: light.turn_on
  104. entity_id: light.gateway_light_f0b429cc30b1
  105. data_template:
  106. color_name: >
  107. {% if color_name %}
  108. {{color_name}}
  109. {% else %}
  110. red
  111. {% endif %}
  112. - delay:
  113. milliseconds: 250
  114. - service: light.turn_off
  115. entity_id: light.gateway_light_f0b429cc30b1
  116. - condition: state
  117. entity_id: input_boolean.block_flashing_color_light
  118. state: 'off'
  119. - service: light.turn_on
  120. entity_id: light.gateway_light_f0b429cc30b1
  121. data_template:
  122. color_name: >
  123. {% if color_name %}
  124. {{color_name}}
  125. {% else %}
  126. red
  127. {% endif %}
  128. - delay:
  129. milliseconds: 250
  130. - service: light.turn_off
  131. entity_id: light.gateway_light_f0b429cc30b1
  132. - service: script.repeat_flashing_color_light
  133. data_template:
  134. color_name: >
  135. {% if color_name %}
  136. {{color_name}}
  137. {% else %}
  138. red
  139. {% endif %}
  140. repeat_flashing_color_light:
  141. alias: "Repeat color light flashing"
  142. sequence:
  143. - delay:
  144. # supports seconds, milliseconds, minutes, hours
  145. milliseconds: 250
  146. - service: script.start_flashing_color_light
  147. data_template:
  148. color_name: >
  149. {% if color_name %}
  150. {{color_name}}
  151. {% else %}
  152. red
  153. {% endif %}
  154. stop_flashing_color_light:
  155. alias: "Stop color light flashing"
  156. sequence:
  157. - service: input_boolean.turn_on
  158. entity_id: input_boolean.block_flashing_color_light
  159. - service: script.turn_off
  160. entity_id: script.start_flashing_color_light
  161. - service: script.turn_off
  162. entity_id: script.repeat_flashing_color_light
  163. - service: light.turn_off
  164. entity_id: light.gateway_light_f0b429cc30b1
  165. - delay:
  166. # supports seconds, milliseconds, minutes, hours
  167. seconds: 5
  168. - service: input_boolean.turn_off
  169. entity_id: input_boolean.block_flashing_color_light
  170. start_alarm_siren:
  171. alias: "Start alarm siren"
  172. sequence:
  173. - condition: state
  174. entity_id: input_boolean.block_alarm_siren
  175. state: 'off'
  176. - service: xiaomi.play_ringtone
  177. data:
  178. ringtone_id: 2
  179. ringtone_vol: 1
  180. gw_sid: !secret xiaomi_sid
  181. - delay:
  182. seconds: 5
  183. - service: script.turn_on
  184. data:
  185. entity_id: script.repeat_alarm_siren
  186. repeat_alarm_siren:
  187. alias: "Repeat alarm siren"
  188. sequence:
  189. - delay:
  190. # supports seconds, milliseconds, minutes, hours
  191. milliseconds: 250
  192. - service: script.turn_on
  193. data:
  194. entity_id: script.start_alarm_siren
  195. stop_alarm_siren:
  196. alias: "Stop alarm siren"
  197. sequence:
  198. - service: input_boolean.turn_on
  199. entity_id: input_boolean.block_alarm_siren
  200. - service: script.turn_off
  201. data:
  202. entity_id: script.start_alarm_siren
  203. - service: script.turn_off
  204. data:
  205. entity_id: script.repeat_alarm_siren
  206. - delay:
  207. # supports seconds, milliseconds, minutes, hours
  208. seconds: 60
  209. - service: input_boolean.turn_off
  210. entity_id: script.block_alarm_siren
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement