Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.05 KB | None | 0 0
  1. #################################################################
  2. ## Washer/Dryer Automations
  3. #################################################################
  4.  
  5. ######################################################################################################################################
  6. #description: Turn on washing machine running bool so we are sure its running
  7. #trigger(s): washing machine vibration sensor going for 2 minutes streight
  8. #condition(s):
  9. #action: tun on washing machine running bool
  10. ######################################################################################################################################
  11. - alias: "Washer/Dryer - Set washing machine running bool to on"
  12. trigger:
  13. - platform: state
  14. entity_id: binary_sensor.vibration_washing_machine
  15. to: 'on'
  16. for:
  17. minutes: 2
  18. action:
  19. - service: input_boolean.turn_on
  20. entity_id: input_boolean.washing_machine_running_switch
  21.  
  22. ######################################################################################################################################
  23. #description: Turn on the washing machine needs to move switch
  24. #trigger(s): washing machine vibration sensor from on to off for 2 minutes
  25. #condition(s): washing machine running bool on, time after 10 and before 9
  26. #action: turn on washing machine needs to move switch
  27. ######################################################################################################################################
  28. - alias: "Washer/Dryer - Turn On Washing Machine Done Switch"
  29. trigger:
  30. - platform: state
  31. entity_id: binary_sensor.vibration_washing_machine
  32. from: 'on'
  33. to: 'off'
  34. for:
  35. minutes: 2
  36. condition:
  37. - condition: and
  38. conditions:
  39. - condition: state
  40. entity_id: input_boolean.washing_machine_running_switch
  41. state: 'on'
  42. action:
  43. - service: input_boolean.turn_on
  44. entity_id: input_boolean.washing_machine_needs_to_move_switch
  45. - service: input_boolean.turn_off
  46. entity_id: input_boolean.washing_machine_running_switch
  47. - service: input_number.set_value
  48. data_template:
  49. entity_id: input_number.washer_done_announce_counter
  50. value: "{{0}}"
  51.  
  52. #####################################################################################################################################
  53. #description: Announce the wash is complete when the washer is done
  54. #trigger(s): Washing machine needs to move switch turned on
  55. #condition(s): someone is home, dryer is not running, before 11 pm
  56. #action: Announce that the wash is ready to move to the dryer
  57. ######################################################################################################################################
  58. - alias: "Washer/Dryer - Announce Washing Machine Done"
  59. trigger:
  60. - platform: state
  61. entity_id: input_boolean.washing_machine_needs_to_move_switch
  62. from: 'off'
  63. to: 'on'
  64. condition:
  65. - condition: and
  66. conditions:
  67. - condition: state
  68. entity_id: sensor.anyone_home
  69. state: 'True'
  70. - condition: state
  71. entity_id: sensor.dryer
  72. state: 'Idle'
  73. - condition: time
  74. after: '09:00:00'
  75. before: '23:00:00'
  76. action:
  77. - service: notify.alexa_media
  78. data_template:
  79. target: >
  80. {% set hr = now().hour %}
  81. {% if hr < 10 %} group.all_echos_but_the_bedroom
  82. {% elif hr < 21 %} group.all_echos
  83. {% else %} group.downstairs_echos
  84. {% endif %}
  85. data:
  86. type: announce
  87. message: "The washing machine is complete and ready to move to the dryer"
  88. - service: input_number.set_value
  89. data_template:
  90. entity_id: input_number.washer_done_announce_counter
  91. value: "{{ states('input_number.washer_done_announce_counter')|int + 1}}"
  92.  
  93. #####################################################################################################################################
  94. #description: Announce the wash is complete when the dryer is done
  95. #trigger(s): Dryer cheanged from Drying to Idle
  96. #condition(s): someone is home, Washing machine needs to move switch turned on, before 11 pm
  97. #action: Announce that the wash is ready to move to the dryer
  98. ######################################################################################################################################
  99. - alias: "Washer/Dryer - Announce Dryer Is Done So You Can Move The Wash"
  100. trigger:
  101. - platform: state
  102. entity_id: sensor.dryer
  103. from: 'Drying'
  104. to: 'Idle'
  105. condition:
  106. - condition: and
  107. conditions:
  108. - condition: state
  109. entity_id: sensor.anyone_home
  110. state: 'True'
  111. - condition: state
  112. entity_id: input_boolean.washing_machine_needs_to_move_switch
  113. state: 'on'
  114. - condition: time
  115. after: '09:00:00'
  116. before: '23:00:00'
  117. action:
  118. - service: input_number.set_value
  119. data_template:
  120. entity_id: input_number.washer_done_announce_counter
  121. value: "{{ states('input_number.washer_done_announce_counter')|int + 1}}"
  122. - service: notify.alexa_media
  123. data_template:
  124. target: >
  125. {% set hr = now().hour %}
  126. {% if hr < 10 %} group.all_echos_but_the_bedroom
  127. {% elif hr < 21 %} group.all_echos
  128. {% else %} group.downstairs_echos
  129. {% endif %}
  130. data:
  131. type: announce
  132. message: "The dryer is complete and there are clothes in the washing machine waiting to be moved over."
  133.  
  134.  
  135. #####################################################################################################################################
  136. #description: Reminder the wash is complete on the hour
  137. #trigger(s): on the hour
  138. #condition(s): someone is home, Washing machine needs to move switch turned on, before 11 pm, count is less then 5
  139. #action: Announce that the wash is ready to move to the dryer
  140. ######################################################################################################################################
  141. - alias: "Washer/Dryer - Announce Reminder That The Wash Is Done"
  142. trigger:
  143. platform: time_pattern
  144. minutes: 07
  145. condition:
  146. - condition: and
  147. conditions:
  148. - condition: state
  149. entity_id: sensor.anyone_home
  150. state: 'True'
  151. - condition: state
  152. entity_id: input_boolean.washing_machine_needs_to_move_switch
  153. state: 'on'
  154. - condition: state
  155. entity_id: sensor.dryer
  156. state: 'Idle'
  157. - condition: time
  158. after: '09:00:00'
  159. before: '23:00:00'
  160. - condition: template
  161. value_template: "{{states('input_number.washer_done_announce_counter')|int > 0}}"
  162. action:
  163. - service: notify.alexa_media
  164. data_template:
  165. target: >
  166. {% set hr = now().hour %}
  167. {% if hr < 10 %} group.all_echos_but_the_bedroom
  168. {% elif hr < 21 %} group.all_echos
  169. {% else %} group.downstairs_echos
  170. {% endif %}
  171. data:
  172. type: announce
  173. message: "The washing machine has clothes waiting to be put in the dryer."
  174. - service: input_number.set_value
  175. data_template:
  176. entity_id: input_number.washer_done_announce_counter
  177. value: "{{ states('input_number.washer_done_announce_counter')|int + 1}}"
  178.  
  179. #####################################################################################################################################
  180. #description: Trigger Boolean To Let First Person Know That Gets Home That The Washer Has Completed
  181. #trigger(s): somone comes home
  182. #condition(s): Washing machine needs to move switch turned on, dryer is not running
  183. #action: Set the Announce Washing Machine Boolean
  184. ######################################################################################################################################
  185. - alias: "Washer/Dryer - Set Arrival Boolean"
  186. trigger:
  187. - platform: state
  188. entity_id: sensor.anyone_home
  189. from: 'False'
  190. to: 'True'
  191. condition:
  192. - condition: and
  193. conditions:
  194. - condition: state
  195. entity_id: input_boolean.washing_machine_needs_to_move_switch
  196. state: 'on'
  197. - condition: state
  198. entity_id: sensor.dryer
  199. state: 'Idle'
  200. - condition: time
  201. after: '09:00:00'
  202. before: '23:00:00'
  203. - condition: state
  204. entity_id: sensor.dryer
  205. state: 'Idle'
  206. action:
  207. - service: input_boolean.turn_on
  208. entity_id: input_boolean.washing_machine_arrival_announcement_switch
  209.  
  210. #####################################################################################################################################
  211. #description: Reminder the wash is complete on the hour
  212. #trigger(s): on the hour
  213. #condition(s): someone is home, Washing machine needs to move switch turned on, before 11 pm, count is less then 5
  214. #action: Announce that the wash is ready to move to the dryer
  215. ######################################################################################################################################
  216. - alias: "Washer/Dryer - Announce When Someone Gets Home That The Wash Is Done"
  217. trigger:
  218. - platform: state
  219. entity_id: binary_sensor.front_door_sensor
  220. from: 'on'
  221. to: 'off'
  222. condition:
  223. - condition: and
  224. conditions:
  225. - condition: state
  226. entity_id: input_boolean.washing_machine_arrival_announcement_switch
  227. state: 'on'
  228. - condition: state
  229. entity_id: input_boolean.washing_machine_needs_to_move_switch
  230. state: 'on'
  231. - condition: state
  232. entity_id: sensor.dryer
  233. state: 'Idle'
  234. - condition: time
  235. after: '09:00:00'
  236. before: '23:00:00'
  237. action:
  238. - delay: 00:00:20
  239. - service: notify.alexa_media
  240. data_template:
  241. target: >
  242. {% set hr = now().hour %}
  243. {% if hr < 10 %} group.all_echos_but_the_bedroom
  244. {% elif hr < 21 %} group.all_echos
  245. {% else %} group.downstairs_echos
  246. {% endif %}
  247. data:
  248. type: announce
  249. message: "Welcome home. While you where away the washing machine completed it's cycle and is ready to be put in the dryer."
  250. - service: input_number.set_value
  251. data_template:
  252. entity_id: input_number.washer_done_announce_counter
  253. value: "{{ states('input_number.washer_done_announce_counter')|int + 1}}"
  254. - service: input_boolean.turn_off
  255. entity_id: input_boolean.washing_machine_arrival_announcement_switch
  256.  
  257. #####################################################################################################################################
  258. #description: Announce the dryer is complete
  259. #trigger(s): dryer set from drying to idle
  260. #condition(s): someone is home, washing machine needs to move switch is off, before 11 pm
  261. #action: Announce that the dryer is complete
  262. ######################################################################################################################################
  263. - alias: "Washer/Dryer - Announce Dryer Done"
  264. trigger:
  265. - platform: state
  266. entity_id: sensor.dryer
  267. from: 'Drying'
  268. to: 'Idle'
  269. condition:
  270. - condition: and
  271. conditions:
  272. - condition: state
  273. entity_id: sensor.anyone_home
  274. state: 'True'
  275. - condition: state
  276. entity_id: input_boolean.washing_machine_needs_to_move_switch
  277. state: 'off'
  278. - condition: time
  279. after: '09:00:00'
  280. before: '23:00:00'
  281. action:
  282. - service: notify.alexa_media
  283. data_template:
  284. target: >
  285. {% set hr = now().hour %}
  286. {% if hr < 10 %} group.all_echos_but_the_bedroom
  287. {% elif hr < 21 %} group.all_echos
  288. {% else %} group.downstairs_echos
  289. {% endif %}
  290. data:
  291. type: announce
  292. message: "The dryer is complete and ready to be emptied"
  293.  
  294. ######################################################################################################################################
  295. #description: Set the washing machine ready to move switch to off when the dryer is turned on.
  296. #trigger(s): dryer is turned on
  297. #condition(s): none
  298. #action: set whe washing machine ready to false.
  299. ######################################################################################################################################
  300. - alias: "Washer/Dryer - Reset Washing Machine Ready Switch With Dryer"
  301. trigger:
  302. - platform: state
  303. entity_id: sensor.dryer
  304. from: 'Idle'
  305. to: 'Drying'
  306. action:
  307. - service: input_boolean.turn_off
  308. entity_id: input_boolean.washing_machine_needs_to_move_switch
  309.  
  310. ######################################################################################################################################
  311. #description: Reset Washing Machine Ready Switch With Counter
  312. #trigger(s): counter is set to 5
  313. #condition(s): none
  314. #action: set the washing machine ready to false
  315. ######################################################################################################################################
  316. - alias: "Washer/Dryer - Reset Washing Machine Ready Switch With Counter"
  317. trigger:
  318. - platform: template
  319. value_template: "{{states('input_number.washer_done_announce_counter')|int == 5}}"
  320. action:
  321. - service: input_boolean.turn_off
  322. entity_id: input_boolean.washing_machine_needs_to_move_switch
  323. - service: input_number.set_value
  324. data_template:
  325. entity_id: input_number.washer_done_announce_counter
  326. value: "{{0}}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement