What am I doing wrong here?
My automation detects when my dryer starts and stops, using a Shelly EM, and notifies me when it stops. It should continue to notify me every 5 minutes until I go open the laundry room door (and presumably get the clothes out). However, it continues to notify me even after I open the laundry room door. This gets rather annoying.
I am using a helper to track the current status of the dryer, with the values of “Running” while the dryer is going, “Done” when the dyer has stopped, and “Off” once I’ve opened the door. The state of the helper changes to “Running” and “Done” but never changes to “Off”.
As a note, I plan to replicate this automation for my washer too, so getting it working for the dryer first would be great.
alias: Washer/Dryer Automations
description: ""
triggers:
- alias: Dryer Turn On
trigger: numeric_state
entity_id:
- sensor.dryer_power
id: Dryer Turn On
below: -200
for:
hours: 0
minutes: 0
seconds: 5
- alias: Dryer Turn Off
trigger: numeric_state
entity_id:
- sensor.dryer_power
id: Dryer Turn Off
above: -200
for:
hours: 0
minutes: 0
seconds: 5
- trigger: state
entity_id:
- binary_sensor.sensor_laundry_room_door
to: "on"
alias: Laundry Room Door Open
id: Laundry Room Door Open
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Dryer Turn On
sequence:
- action: input_select.select_option
metadata: {}
data:
option: Running
target:
entity_id: input_select.dryer_status
- conditions:
- condition: trigger
id:
- Dryer Turn Off
sequence:
- action: input_select.select_option
metadata: {}
data:
option: Done
target:
entity_id: input_select.dryer_status
- repeat:
sequence:
- action: notify.notify
metadata: {}
data:
message: Come get the clothes!
title: Dryer is Done
- delay:
hours: 0
minutes: 5
seconds: 0
until:
- condition: state
entity_id: input_select.dryer_status
state: "Off"
- conditions:
- condition: trigger
id:
- Laundry Room Door Open
sequence:
- if:
- condition: state
entity_id: input_select.dryer_status
state: Done
then:
- action: input_select.select_option
metadata: {}
data:
option: "Off"
target:
entity_id: input_select.dryer_status
mode: single