I would like to make an automation that repeatedly announces that clothes dryer is full if door has not been opened after dryer cycle has finished but to only make the announcements if cycle finished between 06:00 and 21:00 otherwise it needs to wait until 06:00 but only if the door hasn’t been opened between 21:00 and 06:00.
The part I am stuck on is how to tell the automation that door has been opened between 21:00 and 06:00 and no longer has to make the announcement after 06:00. How would I put this into the automation?
There are four states. Idle, running, nearly finished and finished. There are als automations which control these states. So when the dryer is finished, the state will change to finished. Another automation will run every hour as long as the state is finished. This automation will fire a notification, but only between 6am and 9pm.
When someone opens the dryer, the state changes to idle. So the notification automation will not run.
I might not understand something but I think that with your notification I would still have a problem getting the automation to announce after 06:00 that overnight a cycle finished but door hasn’t opened. What I decided to do was make a helper like you mentioned but use that as a condition within an action within a repeat loop that is within an option that is within an action.
alias: Dryer Finished Notification
description: 'Announce dryer is finished during the day even if cycle finished overnight '
trigger:
- platform: state
entity_id: sensor.lg_dryer_run_state
to: Finished
condition: []
action:
- choose:
- conditions:
- condition: time
after: '6:00'
before: '21:00'
sequence:
- repeat:
until:
- condition: state
entity_id: input_select.dryer_load
state: Empty
sequence:
- data:
message: Dryer finished and is full
service: notify.pushbullet_alert
- service: media_player.volume_set
target:
entity_id:
- media_player.kitchen_speaker
- media_player.googlehome9359
data:
volume_level: 1
- service: tts.google_cloud_say
data:
entity_id:
- media_player.kitchen_speaker
- media_player.googlehome9359
message: Dryer cycle finished and is full
- delay:
hours: 0
minutes: 15
seconds: 0
milliseconds: 0
- conditions:
- condition: time
after: '21:00'
before: '6:00'
sequence:
- wait_for_trigger:
- platform: time
at: '6:00'
- repeat:
until:
- condition: state
entity_id: input_select.dryer_load
state: Empty
sequence:
- condition: state
entity_id: input_select.dryer_load
state: Full
- data:
message: Dryer cycle finished and is full
service: notify.pushbullet_alert
- service: media_player.volume_set
target:
entity_id:
- media_player.kitchen_speaker
- media_player.googlehome9359
data:
volume_level: 1
- service: tts.google_cloud_say
data:
entity_id:
- media_player.kitchen_speaker
- media_player.googlehome9359
message: Dryer cycle finished and is full
- delay:
hours: 0
minutes: 15
seconds: 0
milliseconds: 0
default: []
mode: single
My notification automation is running every x minutes, till the state isn’t “finished”.
This will run at every time of the day. Inide the action part, there is a condition which checks the time. After that, there is the voice notification.
- condition: time
after: "07:00:00"
before: "23:00:00"
- service: notify.alexa_media_esszimmer_alexa
data:
message: Der Trockner ist fertig
data:
type: announce
- service: notify.alexa_media_bad_alexa
data:
message: Der Trockner ist fertig
data:
type: announce
As far as I see, your automation should also work. The only case which could be a problem is that when the dryer finished before 21 and you don’t empty it, it will continue to notify you after 21.
Forgive me for not understanding, but how does your notification automation know to run every x minutes? I just want to understand because it might help me with my automations.
That is true that it will continue to notify after 21:00 but shouldn’t be a problem since it normally isn’t too late. The biggest problem with these notification automations is that they don’t know when whoever is within audio range of the TTS notification has already gone to sleep or is napping. I have a Fitbit but it only records sleep start time once a day and even then it is only after I have woken up so it is of no use.
You can use maybe a motion sensor to set a room with TTS to on. And play the notification only when the room is “on”. Then you also dont need a time in your automation.