this post was submitted on 03 Jan 2024
11 points (100.0% liked)

homeassistant

12211 readers
16 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 2 years ago
MODERATORS
 

Does anyone know if there are examples like this. I want to get a notification system in HA. It needs to be able to send the right notification at the right time on the right device.

For example, when the dishwasher is done, it sends a spoken notification to the nest hub in the kitchen, that is if the TV is on. If the TV is not on, but the computer is, it needs to send that notification to the computer room. At night it needs to hold the notifications and send them to the phone of the person that is the first to wake up. When we are not at home, we all get the notification on our phone. Also, when the dishwasher is emptied and the other person ticks the notification f.e.), and there's still a notification on a phone, it needs to disappear.

This is only one example, there are more things that can have a notification (another one could be a home greeting message), but it needs to be a system.

all 8 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 11 months ago (2 children)

Sounds like some logic you can tease out with node-red. I don’t know of a native way to do it in HA.

[–] [email protected] 5 points 11 months ago

Yeah node red + the notification services on HA would definitely be how I do this. In fact, I kinda do already.

[–] TheOldRepublic 1 points 11 months ago

Sorry to not tell that, the plan is indeed for doing this in node red. I only want an example to put me on the right track and thought maybe someone else had something similar.

[–] [email protected] 4 points 11 months ago* (last edited 11 months ago) (1 children)

Should be able to just do it with automations and include "choose" action. 2024.1 looks like it makes it easier building blocks.

[–] [email protected] 4 points 11 months ago* (last edited 11 months ago) (1 children)

This is the answer. I have a handful of notifications setup this way. My routing logic tends to be much simpler but that's what "choose" is for.

The only tricky one may be to hold the notifications until later. I probably wouldn't bother with that personally. Instead I use the do not disturb functionality on the phone.

https://companion.home-assistant.io/docs/notifications/actionable-notifications/

[–] TheOldRepublic 1 points 11 months ago

Looks nice at first sight. I'll definitely check it out thoroughly. I think it's exactly what I need. Thanks.

[–] [email protected] 2 points 11 months ago

I've actually been trying to implement something like this myself, but I'm trying to do it natively in HA. What I've done so far is make an automation for each appliance that calls a script (with variables passed through for messages and whatnot) which notified each member of the household in parallel, based on whether they're home or not.

My eventual plan is to make each appliance automation flip an input_boolean that sends an initial notification which can be dismissed (either by sensor, NFC tag or notification action). Then every so often or based on a trigger (like door opening, toothbrush doing off, etc.) it triggers the notification script again.