Only notifications in the room with presence

I have speakers in every room of the house.
When particular events occur some notifications are read from the kitchen speaker.
Instead, I would like only the speaker of the room you are in to work. the simplest solution for me is to generate the same automation for each room “and if” the presence sensor detects the presence read the notification on the speaker in that room. Is it possible to run just one automation to accomplish this?

A single automation that reproduces the notification where it finds the presence?

Thank you

It is most certainly possible and there are probably several ways to do it.

I think you need to post some examples of your code so that people have enough to work with to give you suggestiosn about possible approaches.

1 Like

As a maintainer of such setup I could say that it is possible but that doesn’t mean that it is the most handy solution. Multiple automations tailored for each room is much easier to maintain and to debug. There is really no need to have everything in one big automation.

You would need to:

Create something that isolates yojr rooms and denotes occupancy.

Then based on that, dynamically maintain a template sensor that has a list of notify targets.

Then just fire notify to that list when you need to

These are very simple automations… like “if the doorbell rings” then “play audio file” on the kitchen speaker.

All that needs to be added is… “play audio file” on the speaker of the room where there is presence.

I’ve been using Home Assistant for a short time and sometimes I notice that there are simpler shortcuts to manage automations and actions.

If it’s that simple, why are you posting? If you expect people to help you, you should be willing to answer their questions.