I have config below to detect when my machine is running and when it stops. It should tell me when the washing machine stops. Somehow, with kind reminders constantly from my wife, there some kind of a mixup. The washing machine is calling out it has finished when it’s in the middle of its program. I think there is no Watt drop during 5 minutes to trigger the notification… something wrong in this config ?
I would however not use the wait but use a separate flow. A wash cycle can take quite long, and if you reboot or reload automations in the mean time the finished message will not happen. If you are worried the message flow will start without the start action taking place you can always make sure the end flow is only turned on when the washer starts, and turned off by the message itself.
alias: Was klaar
description: ''
trigger:
- platform: state
entity_id: input_select.wasdroger
to: Klaar
condition: []
action:
- service: notify.mobile_app_in2013
data:
message: Hallo, hier je wasmeisje. Ik ben klaar met mijn zware klus ;-)
- service: notify.mobile_app_zerkoefs_iphone
data:
message: Wasdroger is klaar
mode: single
This works even after a HA restart during the laundry
This is a nice approach too. I was trying to keep as close as possible to the original approach to best illustrate possible improvements.
But maybe you should adjust the filters in your example because of the now required default. For expample the float filter should now be something like float(0). If you do not, the templates will produce errors on startup.
I would also consider adding an availability template to the sensor.
Instead of automations enabling/disabling one another (which the community has long concluded to be an anti-pattern) make the first automation set a flag, like an input_boolean, which is checked by the second automation’s condition and subsequently reset by it as well.
In fact, by employing a flag, the two automations can even be consolidated into one.