At home, we have our washing machine and tumble dryier in the laundry room in the attic. When the attic door is closed it’s really difficult for us realizing when the washing machine and/or the tumble dryer have finished the corresponding washing/drying cycles.
Because of this, taking advantage of the home automation system based on Home Assistant, I’ve built a set of automations that, using the Google smart speakers we have, announces when the washing machine and the tumble dryer finish, and remind us, insistently, that we must put the just-washed clothes into the tumble dryer.
My washing machine is made by LG, and has a WiFi connection to the LG Cloud, so I use the status this provides to find out if it has finished or not. However, sometimes this cloud integration fails, so it’s also monitored using a smart plug which allows me to know when a washing cycle completes, using the instant power consumption.
My tumble dryer is a dumb condensation tumble-dryer made by Indesit, that I also monitor via another smart plug with power consumption sensor. It’s equipped with two filters that we must clean periodically. One after every drying cycle, and the other one every five cycles. So I’ve also implemented a system that controls the number of drying cycles, using a door opening sensor in the filter door.
Let’s go with it.
Needed helpers
To implement these algorithms I’ve created a set of helpers:
Current Tumble-Dryer Status
The input_select.dryer_status
keeps the current tumble-dryer status, with these possible states:
Off
(if its power consumption is 0)Stand-by
(Low power consumption, and its previous status is Off)On
(High power consumption)Finished
(Low power consumption or no consumption, coming from status On)
Start and end times
The following helpers, with datetime type, will allow us keeping control about when the last washing and drying cycles started and ended:
input_datetime.last_washing_cycle_start
input_datetime.last_washing_cycle_end
input_datetime.last_drying_cycle_start
input_datetime.last_drying_cycle_end
Are there wet clothes inside the washing machine?
The boolean helper input_boolean.pending_drying_cycle_notice
will allow us being aware of the existence of wet clothes inside the washing machine pending to be dried.
Counters
Then we have several counters:
counter.wet_clothes_announce_number
will keep the number of times we have already announced that there’s a set of wet clothes inside the washing machine waiting to be dried, so we can increase the aggresiveness of the announcements.counter.drying_cycles_since_last_filter_cleaning
will keep the number of drying cycles since the last cleaning of the tumble-dryer filter (the one that must be cleaned every 5 cycles).counter.drying_cycles
, will keep the total number of drying cyclescounter.washing_cycles
, will keep the total number of washing cycles
I don’t use the two latter ones, but they could be interesting statistics for the future.
Defining the current status of the tumble dryer
A little automation that sets the current status of the tumble dryer using its instant power consumption and its previous status.
alias: Laundry Room - Set Tumble Dryer Status
description: ""
trigger:
- platform: state
entity_id: sensor.tumble_dryer_power
condition: []
action:
- service: input_select.select_option
target:
entity_id: input_select.dryer_status
data_template:
option: >
{% set idx = states('sensor.tumble_dryer_power')|int %}
{% set prevstate = states('input_select.dryer_status') %}
{% if idx <= 1 %}
Off
{% elif ((idx > 1) and (idx < 50 ) and ( prevstate == 'Off' or
prevstate == 'Stand-by')) %}
Stand-by
{% elif ((idx >= 50) and (prevstate == 'Stand-by')) %}
On
{% elif ((idx <= 50) and (prevstate == 'On')) %}
Finished
{% elif ((idx <= 180) and (prevstate == 'Finished')) %}
Finished
{% else %}
On
{% endif %}
mode: single
Code language: YAML (yaml)
Setting the current status of the washing machine
As I already said, my washing machine is connected to the LG Cloud and, supposedly, its status comes directly in the sensor.washing_machine
entity.
If your washing machine doesn’t have this feature, you’ll have to create an algorithm similar to the one for the tumble dryer.
However, in my case, the LG Cloud eventually fails, so I have a few emergency automations for these cases.
The first one checks if there’s power consumption in the washing machine smart plug greater than 10W, and if the washing machine status according LG Cloud is consistent with this. If not, it set the washing machine status to “On” and tries to restart LG ThinQ integration:
alias: Laundry Room - Force Washing Machine On Status if LG Cloud is down
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
for:
hours: 0
minutes: 1
seconds: 0
above: 10
- platform: device
type: turned_on
device_id: 5ee65acb8e035c9a55ad6be13c479512
entity_id: binary_sensor.washing_machine_wash_completed
domain: binary_sensor
- platform: state
entity_id:
- sensor.washing_machine_run_state
from: Washing
to: "-"
- platform: state
entity_id:
- sensor.washing_machine_run_state
from: Rinsing
to: "-"
- platform: state
entity_id:
- sensor.washing_machine_run_state
from: Spin-Drying
to: "-"
- platform: state
entity_id:
- sensor.washing_machine_run_state
from: Finished
to: "-"
condition:
- condition: state
entity_id: sensor.washing_machine
state: "off"
- condition: numeric_state
entity_id: sensor.washing_machine_power
above: 10
action:
- service: python_script.set_state
data_template:
entity_id: sensor.washing_machine
state: "on"
- service: smartthinq_sensors.wake_up
data: {}
target:
entity_id: sensor.washing_machine
enabled: true
mode: single
Code language: YAML (yaml)
The second one checks if there’s a high power consumption (between 300W and 1000W), and if, according LG cloud, the washing machine status is not consistent with this, forcing the washing machine status in that case.
alias: Laundry Room - Force Washing Machine Spin-Drying Status if LG Cloud is down
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
for:
hours: 0
minutes: 1
seconds: 0
above: 300
below: 1000
condition:
- condition: state
entity_id: sensor.washing_machine_current_course
state: "-"
- condition: not
conditions:
- condition: state
entity_id: sensor.washing_machine_run_state
state: Spin-Drying
action:
- service: python_script.set_state
data_template:
entity_id: sensor.washing_machine_run_state
state: Spin-Drying
- service: smartthinq_sensors.wake_up
data: {}
target:
entity_id: sensor.washing_machine
enabled: true
mode: single
Code language: YAML (yaml)
The third one checks if there’s no longer power consuption in the Washing Machine smart plug in the last 90 seconds, and if the washing machine status, according the LG cloud, keeps saying that it’s spin-drying. This is clearly an error, so I’ll set the washing cycle as finished in this case.
alias: Laundry Room - Force Washing Machine Finished Status if LG Cloud is down
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
for:
hours: 0
minutes: 1
seconds: 30
above: 0
below: 10
condition:
- condition: state
entity_id: sensor.washing_machine_current_course
state: "-"
- condition: state
entity_id: sensor.washing_machine_run_state
state: Spin-Drying
action:
- service: python_script.set_state
data_template:
entity_id: binary_sensor.washing_machine_wash_completed
state: "on"
- service: python_script.set_state
data_template:
entity_id: sensor.washing_machine_run_state
state: "-"
- service: python_script.set_state
data_template:
entity_id: sensor.washing_machine
state: "off"
- service: smartthinq_sensors.wake_up
data: {}
target:
entity_id: sensor.washing_machine
enabled: true
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- service: python_script.set_state
data_template:
entity_id: binary_sensor.washing_machine_wash_completed
state: "off"
- service: smartthinq_sensors.wake_up
data: {}
target:
entity_id: sensor.washing_machine
enabled: true
mode: single
Code language: YAML (yaml)
Some times, the LG Cloud problem gets fixed automatically by restarting the integration, so I also created this automation:
alias: Laundry Room - Restart ThinQ on washing machine power consumption but still shows as turned off
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
above: 200
condition:
- condition: state
entity_id: sensor.washing_machine
state: "off"
action:
- service: homeassistant.reload_config_entry
data: {}
target:
entity_id: sensor.washing_machine
mode: single
Code language: CSS (css)
And then we have the automation that increases the number of washing cycles:
alias: Laundry Room - Increase Washing Cycles Counter
description: ""
trigger:
- type: turned_on
platform: device
device_id: 5ee65acb8e035c9a55ad6be13c479512
entity_id: binary_sensor.washing_machine_wash_completed
domain: binary_sensor
condition: []
action:
- service: counter.increment
target:
entity_id: counter.washing_cycles
data: {}
mode: single
Code language: YAML (yaml)
Keeping start and end times of washing and drying cycles
Being a big family, it’s not unusual that, on weekends, the laundry room is full of clothes, overlapping washing and drying cycles. To have announcements working correctly, I need to control when the last cycles have started and completed.
I’ve created these automations that set the start and end times of the washing and drying cycles.
First, the one that sets the starting time of the washing cycle:
alias: Laundry Room - Set washing cycle start time
description: ""
trigger:
- platform: state
entity_id: sensor.washing_machine
from: "off"
to: "on"
condition: []
action:
- service: input_datetime.set_datetime
entity_id: input_datetime.last_washing_cycle_start
data_template:
datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"
mode: single
Code language: YAML (yaml)
Second, the automation that sets the washing cycle end:
alias: Laundry Room - Set washing cycle end time
description: ""
trigger:
- type: turned_on
platform: device
device_id: 5ee65acb8e035c9a55ad6be13c479512
entity_id: binary_sensor.washing_machine_wash_completed
domain: binary_sensor
condition: []
action:
- service: input_datetime.set_datetime
entity_id: input_datetime.last_washing_cycle_end
data_template:
datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"
mode: single
Code language: YAML (yaml)
The automation that sets the drying cycle start time:
alias: Laundry Room - Set drying cycle start time
description: ""
trigger:
- platform: state
entity_id:
- input_select.dryer_status
to: On
condition: []
action:
- service: input_datetime.set_datetime
entity_id: input_datetime.last_drying_cycle_start
data_template:
datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"
- service: persistent_notification.dismiss
data:
notification_id: wet_clothes_inside_washing_machine
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.pending_drying_cycle_notice
mode: single
Code language: YAML (yaml)
And finally, the automation that sets the end time of the drying cycle. This automation also increases the drying-cycles counters (total number of drying cycles, and number of drying cycles since the last filter clean), and calculates the length of the last drying cycle.
alias: Laundry Room - Set drying cycle end time
description: ""
trigger:
- platform: state
entity_id:
- input_select.dryer_status
from: On
to: Finished
condition: []
action:
- service: input_datetime.set_datetime
entity_id: input_datetime.last_drying_cycle_end
data_template:
datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"
- service: counter.increment
target:
entity_id: counter.drying_cycles
data: {}
- service: input_text.set_value
data:
value: >-
{{ (as_timestamp(states("input_datetime.last_drying_cycle_end"), 0)
- as_timestamp(states("input_datetime.last_drying_cycle_start"),
0))|timestamp_custom("%H:%M:%S", false) }}
target:
entity_id: input_text.last_drying_cycle_length
- service: counter.increment
data: {}
target:
entity_id: counter.drying_cycles_since_last_filter_cleaning
mode: single
Code language: YAML (yaml)
Acoustic announcements
OK. We already know the status of both the washing machine and the tumble dryer. Now we need to announce they have completed their cycles.
The washing machine has completed a washing cycle
Let’s start with the washing machine. This automation activates when binary_sensor.washing_machine_wash_completed
is activated (the normal situation), or if the washing machine moves to a weird or unknown status. After checking that there’s no power consumption by the washing machine, we start the automation.
If the last washing program was not the Tub-Cleaning program, we’ll activate the binary helper that will announce about the existence of wet clothes in the washing machine.
After this, if it is a reasonable time, we’ll announce that the washing machine has finished a washing cycle through the different smart speakers, and we’ll create a persistent notification about this.
alias: Laundry Room - Announce end of washing cycle
description: ""
trigger:
- type: turned_on
platform: device
device_id: 5ee65acb8e035c9a55ad6be13c479512
entity_id: binary_sensor.washing_machine_wash_completed
domain: binary_sensor
- platform: state
entity_id:
- sensor.washing_machine_run_state
from: Washing
to: "-"
- platform: state
entity_id:
- sensor.washing_machine_run_state
from: Rinsing
to: "-"
- platform: state
entity_id:
- sensor.washing_machine_run_state
from: Spin-drying
to: "-"
- platform: state
entity_id:
- sensor.washing_machine_run_state
from: Finished
to: "-"
condition:
- condition: numeric_state
entity_id: sensor.washing_machine_power
below: 10
- condition: state
entity_id: input_boolean.pending_drying_cycle_notice
state: "off"
action:
- condition: not
conditions:
- condition: state
entity_id: sensor.washing_machine_current_course
state: Tub cleaning
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.pending_drying_cycle_notice
- if:
- condition: time
after: "08:00:00"
before: "22:00:00"
then:
- service: media_player.volume_mute
data:
is_volume_muted: true
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
- service: chime_tts.say_url
data:
chime_path: /media/Washing_Machine_Song__LG.mp3
delay: 450
final_delay: 0
tts_playback_speed: 100
volume_level: 0.73
message: >-
The washing machine has completed a washing cycle. Please, remember to put the wet clothes into the tumble dryer.
tts_platform: cloud
gender: female
response_variable: chimetts
- service: media_player.play_media
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
data:
media_content_id: "{{ chimetts.url }}"
media_content_type: audio/mp3
- service: media_player.volume_mute
data:
is_volume_muted: false
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
- service: persistent_notification.create
data:
message: There are wet clothes inside the washing machine.
title: Recuerde poner la secadora
notification_id: wet_clothes_inside_washing_machine
mode: single
Code language: YAML (yaml)
The tumble dryer has completed its cycle
When the tumble dryer completes a drying cycle, we also announce it (if it’s not an ungodly hour). If there were wet clothes in the washing machine waiting for the dryer to finish, we remember that.
alias: Laundry Room - Announce end of drying cycle
description: ""
trigger:
- platform: state
entity_id:
- input_select.dryer_status
from: On
to: Finished
action:
- if:
- condition: time
after: "08:00:00"
before: "22:00:00"
then:
- service: media_player.volume_set
data:
volume_level: 0.8
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
- service: media_player.play_media
data:
media_content_id: https://MY_IP:8123/local/IceBellsAscending.mp3
media_content_type: music
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 500
- if:
- condition: template
value_template: >-
{{ (states('input_datetime.last_washing_cycle_end') >
states('input_datetime.last_drying_cycle_start') ) }}
then:
- service: tts.cloud_say
data:
message: >-
The tumble dryer has completed a drying cycle. Don't forget putting
the wet clothes currently in the washing machine into the tumble dryer.
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
else:
- service: tts.cloud_say
data:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
message: The tumble dryer has completed a drying cycle.
cache: true
- if:
- condition: template
value_template: >-
{{ (states('input_datetime.last_washing_cycle_end') >
states('input_datetime.last_drying_cycle_start') ) }}
then:
- service: persistent_notification.create
data:
message: The tumble dryer has finished its cycle, and there are still wet clothes inside the washing machine pending to be dried.
notification_id: wet_clothes_inside_washing_machine
- service: notify.television
data:
message: The tumble dryer has finished its cycle. There are still wet clodes inside the washing machine pending to be dried.
else:
- service: notify.television
data:
message: The tumble dryer has completed a drying cycle.
Code language: YAML (yaml)
Reminding that there are wet clothes inside the washing machine
As the laundry room is far up in the house, many times lazyness beats us and we behave as expert procrastinators, so the wet end up staying for too long in the washing machine, taking on a bad musty smell.
So, for these cases, we have this home automation reminds us, insistently and tirelessly, that we must put the wet clothes in the tumble dryer. Every 5 minutes. First in a kind way. Then, a bit less kindly. And starting on the fourth notice, choosing a random message from a collection of humorous and passive-aggresive messages.
alias: Laundry Room - Announce wet clothes are waiting to be dried
description: ""
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: template
value_template: >-
{{ (states('input_datetime.last_washing_cycle_end') >
states('input_datetime.last_drying_cycle_start') )
and (states('input_datetime.last_washing_cycle_start') < states('input_datetime.last_washing_cycle_end') )
and ( as_timestamp(states('input_datetime.last_washing_cycle_end'),0) + 600 < as_timestamp(now(),0) )
and (states('input_select.dryer_status') != 'On')
}}
- condition: or
conditions:
- condition: time
after: "07:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: time
after: "08:00:00"
weekday:
- sat
- sun
- condition: state
entity_id: input_boolean.pending_drying_cycle_notice
state: "on"
action:
- service: media_player.volume_mute
data:
is_volume_muted: true
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
- service: media_player.play_media
data:
media_content_id: https://MY_IP:8123/local/AngelicNotification.mp3
media_content_type: music
announce: true
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
- service: media_player.volume_set
data:
volume_level: 0.65
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
- service: media_player.volume_mute
data:
is_volume_muted: false
target:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
- delay:
hours: 0
minutes: 0
seconds: 7
milliseconds: 0
- service: tts.cloud_say
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
data_template:
cache: true
message: |-
{% macro pending_wet_clothes_notice() -%}
{% set announce_number = states('counter.wet_clothes_announce_number') | int %}
{% if announce_number < 2 %}
Please remember that there are wet clothes pending to be dried.
{% else %}
{% if announce_number == 2 %}
Third notice: Please remember that there are wet clothes pending to be dried.
{% else %}
{% set announcements = (
"wet, clothes, pending, to, be, dried",
"Hello? Anyone? Wet clothes pending to be dried!",
"You'll complain that your clothes smell bad. They've been in the washing machine for a long time now waiting for someone to put them in the tumble dryer.",
"I'm not going to shut up until someone puts the wet clothes into the tumble dryer.",
"Put wet clothes into the tumble dryer. Put wet clothes into the tumble dryer. Put wet clothes into the tumble dryer",
"The clothes in the washing machine, all damp and wet, are cold and very lonely and need some heat, heat that the tumble dryer can provide.",
"Let me insist: there are wet clothes inside the washing machine waiting to be dried.",
"Would your graces have the infinite kindness to go up a few floors and place the wet items of clothing, currently located in the washing machine, inside the dryer and, without further ado, turn it on?"
"Wet clothes in the washing machine look for a charitable soul to put them to dry. Reason: laundry room.",
"The day you were born, all the flowers then blossomed, and what a joy you gave, put the bloody wet clothes inside the dryer once and for all,"
"Sad and alone, the wet clothes remain, sad and tearful, without drying they remain.",
"I don't think you realize there's a washing machine full of wet clothes waiting to dry. Seriously. I'm not kidding.",
"Hahahaha. How funny. No, seriously. There is a washing machine full of wet clothes waiting to be dried.",
"Enough is enough, right? There's a washing machine full of wet clothes waiting to be dried.",
"Don't you find it annoying that I keep insisting that you have to dry the wet clothes over and over, over and over again?",
"At this rate, mushrooms are going to grow on the clothes inside the washing machine",
"Let's see. This notice is addressed to someone to put the wet clothes in the tumble dryer. Seriously",
"This is very hard. Nobody puts the wet clothes in the dryer yet.",
"I'm starting to get tired of repeating over and over again that you have to put the wet clothes in the tumble dryer.",
"Put the wet drothes into the tumble clother. No. Put the wire clothes into the wetble dryer. No. Tongue twisted!",
"Guess what I'm about to remind you. Guess it! So...",
"Once upon a time, a distressed and wet piece of cloth stayed in the washing machine. It patiently waited for a hero that rescued it and move it into the tumble drier, where it would get warm and become ready to be dressed.",
"How much wet cloth would a woodchuck move into the tumble drier, if a woodchuck could move wet cloth into tumble dryers?",
"Listen! I'm the voice of your conscience. Maybe you should go up and put the wet clothes into the tumble dryer...",
"You keep ignoring me. I tell about the wet clothes in the washing machine over and over, over and over again. But nothing, since I can't give electric shocks, no one pays attention to me. Wait, are you sure I can't give electric shocks?",
"The wet clothes won't put themselves inside the tumble dryer. No, they won't. Yes, I know it would be great. But no, it's not possible.",
"Wet clothes. Tumble dryer. Wet clothes. Tumble dryer. Wet clothes. Tumble dryer. Wet clothes. Tumble dryer.",
"Do you know if it's possible to move the wet clothes from the washing machine into the tumble dryer? It's for a friend...",
"A piece of cloth, all wet and cold, is patiently waiting inside the washing machine tub for a charitative soul that goes up and put it to dry. Will our protagonist be able to get someone to rescue her from a moist destiny full of mold and bad odor?",
"We interrupt our programming to preview the latest news. According to the CNN, a pile of wet clothes are waiting to be placed in the dryer. We'll keep you informed about new developments.",
"I won't shut up. It's my duty to insist and insist until finally someone starts a drying cycle.",
"Oh, it's such a beautiful thing to ignore me as if I didn't exist. The washing machine keeps on full of wet clothes.",
"Let's see if someone notices me if I use the magic word. Please: laundry must be dried.",
"I'll try in Spanish now, just to see if there's more luck: ponn er, row pah, N, seck adore-ah",
"Code mushroom. Repeat: we have a code mushroom. Mold is beginning an attack over the wet clothes in the washing machine. Do something!",
"I'm afraid clothes won't get little legs and will move by themselves from the washing machine into the tumble dryer. Well, maybe at the end there will be legs growing on the wet clothes if they remain at the washing machine.",
"Little Tim ignored the notices to put the wet clothes into the tumble dryer, and now he is a sad and acomplished being. Do not be like little Tim. Dry the laundry.",
"Let's see if you understand this way: hashtag wet-clothes, hashtag washing-machine, hashtag tumble-dryer.",
"Last notice to the bunch of procrastinators: I know where you live. Dry the laundry.",
"It seems you forgot to put the wet clothes into the tumble dryer. You know the consequences. Don't you?",
"Eeny meeny miny moe, Dry wet clothes don't be foe, If they're dry now let them go, eeny meeny miny moe."
"If you don't dry the laundry, we'll be forced to publish in Instagram that embarrasing photo of yours, and share it with all your friends. Please, dry the laundry. Thank you SO much.",
"Every time you ignore a notice about drying the laundry, a pigeon crashes into a roller coaster. At least, do it for the environment",
"The tumble dryer has just finished a drying cycle. Well, it would have already finished if you had stopped ignoring these messages and had started it. Thank you.",
"We know the tumble dryer is up in the attic, and it's difficult to reach. But look on the bright side: those pounds aren't going to burn off on their own.",
"The first person that arrives to the tumble dryer and starts it will win a prize: the satisfaction of accomplished duty.",
"You have a new message. Message number one. Sent by wet sock: please, send help. It's cold. It's getting dark and I'm alone. I've lost my pair. Let me out.",
"We have your clothes. They're totally wet. If you want to see them again, without mold and smelling well, send a rescue operation to the laundry room.",
"The washing machine needs your help. Every day, a tee-shirt gets full of mold and becomes a nasty and dirty rag. Help us avoiding this disgraceful event. Send your help to the laundry room and dry the laundry once for Heaven's sake.",
"Last notice. If you don't dry the laundry now, we cannot warrant the safety of your wet clothes.",
"I know how much you like the smell of clean and fresh soap, and how little you are doing to keep it. Wet clothes into tumble dryer. Now.",
"Can you imagine? Wars are over. Hunger is over. Everybody is happy. And the clothes are warm and drying in the tumble dryer."
) %}
{{ announcements | random }}
{% endif %}
{% endif %}
{% endmacro %}
{{ pending_wet_clothes_notice() }}
- service: counter.increment
data: {}
target:
entity_id: counter.wet_clothes_announce_number
mode: single
Code language: YAML (yaml)
Reset number of announcements
Every time we activate the announce of wet clothes in the washing machine, we reset the number of announcements helper.
alias: Laundry Room - Reset wet clothes announce number
description: ""
trigger:
- platform: state
entity_id:
- input_boolean.pending_drying_cycle_notice
from: "off"
to: "on"
condition: []
action:
- service: counter.reset
data: {}
target:
entity_id: counter.wet_clothes_announce_number
mode: single
Code language: YAML (yaml)
Error in Washing Machine
If LG clouds reports an error in the last washing cycle (door open, that fat comforter cannot be spun down…), then we make that whine to be heard in all the house
alias: Laundry Room - Washing Machine error
description: ""
trigger:
- type: problem
platform: device
device_id: 5ee65acb8e035c9a55ad6be13c479512
entity_id: binary_sensor.washing_machine_error_state
domain: binary_sensor
condition:
- condition: time
after: "08:00"
before: "22:00"
action:
- service: tts.cloud_say
data:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
message: >-
Washing machine has stopped due to an error: {{
states('sensor.washing_machine_error_message') }}
cache: true
mode: single
Code language: YAML (yaml)
Cleaning Management of the tumble-dryer filter
We already implemented the automation that increases the counter. We need to reset it when the filter door is open.
alias: Laundry Room - Reset tumble dryer filter counter
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.sensor_dryer_filter_opening
for:
hours: 0
minutes: 0
seconds: 10
from: "on"
to: "off"
- platform: state
entity_id:
- binary_sensor.sensor_dryer_filter_opening
for:
hours: 0
minutes: 0
seconds: 10
from: "off"
to: "on"
condition: []
action:
- service: counter.reset
data: {}
target:
entity_id: counter.drying_cycles_since_last_filter_cleaning
mode: single
Code language: CSS (css)
We also keep an e-paper tag sticked on the tumble dryer with the number of drying cycles since the last filter cleaning:
alias: Laundry Room - Write dryer epaper tag
description: ""
trigger:
- platform: state
entity_id:
- counter.drying_cycles_since_last_filter_cleaning
condition: []
action:
- if:
- condition: time
before: "05:00:00"
after: "23:00:00"
then:
- wait_for_trigger:
- platform: time
at: "05:00:00"
continue_on_timeout: false
- service: open_epaper_link.drawcustom
data:
background: white
rotate: 0
payload:
- type: multiline
value: Drying cycles|since last clean
delimiter: "|"
font: ppb.ttf
offset_y: 20
x: 3
size: 16
color: black
y_padding: 1
- type: text
value: "{{states('counter.drying_cycles_since_last_filter_cleaning')}}"
size: 120
font: ppb.ttf
x: 60
"y": 50
color: red
- type: icon
value: tumble-dryer
x: -3
"y": 50
size: 40
color: black
target:
entity_id: open_epaper_link.0000029ff157341e
- service: shell_command.epaper_copy
data: {}
mode: single
Code language: YAML (yaml)
And, finally, if we turn on the light of the laundry room (as it doesn’t have windows), and the filter must be cleaned, we announce it every 30 seconds (as long it’s not an ungodly hour):
alias: Laundry Room - Announce pending clean of dryer filter
description: ""
trigger:
- platform: state
entity_id:
- light.laundry_room
from: "off"
to: "on"
- platform: time_pattern
seconds: /30
condition:
- condition: numeric_state
entity_id: counter.drying_cycles_since_last_filter_cleaning
above: "4"
- condition: state
entity_id: light.laundry_room
state: "on"
- condition: time
after: "09:00:00"
before: "22:00:00"
- condition: not
conditions:
- condition: state
entity_id: input_select.dryer_status
state: On
action:
- service: tts.cloud_say
data:
entity_id:
- media_player.kitchen
- media_player.master_bedroom
- media_player.kids_bedroom
- media_player.living_room
cache: false
message: The tumble dryer filter must be cleaned.
mode: single
Code language: PHP (php)
Conclusion
These automations have been live for a year now, and they typically work really well. I hope they are useful and may inspire your own versions.