I want to create a “washing machine finished” automation. When finished, I want to send notifications if:
nobody is at home: to all persons
otherwise only to persons logged into the home wifi
As long as the washing machine has not been opened (this could be a binary sensor detecting 0 W power), I want to repeat the notifications every X minutes.
Question: should I use nodered for those cases (I have no experience in nodered)? Or is that possible directly in HA? If yes, how could I automate this rather complex cenario??
Now I want to add conditional notification:
-notify mobile_app_membersound and mobile_app_wife if both are at home
-notify mobile_app_membersound if only I’m at home
-notify mobile_app_wife if only my wife at home
-notify also both of nobody is at home
Preferably, I would not want to repeat this logic in each automation. Because I want to send “finished” notifications also for other devices like washing machine, dryer, etc. Same presence logic.
The best way to do that would be a script that you pass the message to. It runs the logic of where to send it. That way you can use the script in many automations.
However, initially you said you wanted to repeat these notifications until something occurs. Is this still the case?
I’m trying step by step. First goal is to achieve the the presence-based notifications.
Could you give an example of a “script where I can pass the message to”?
But yes, lateron I’d want to repeat the notifications let’s say every 5 minutes as long as the power did not drop to 0W (means still idle).
Still I don’t understand how I could add routes for notifications based on presence?
script:
notify_family:
fields:
title
message
sequence:
- condition: state
entity_id: device_tracker.membersound
state: 'home'
- service: notify.mobile_app_membersound
data_template:
title: "{{ title }}"
message: "{{ message }}"
Even if I’d create multiple binary sensors telling me if everyone, nobody, or only some people are at home. How can I then switch to different notify.* calls? Eg notify.all or notify.mobile_app_membersound?
Ok, you’ve got the script to send a message now we just need to add a service template to decide who to deliver it to. I don’t know your exact tracker or notify entity ids but you should be able to edit this: