WTH can't I easily duplicate the jist of an automation into a second one?

I want to apply identical rules across all my rooms. Once I configure everything for one room, I want to deploy the exact same setup in the next. Right now, doing this requires copying the automation, manually swapping out every light entity or Shelly input for the new room’s equivalents, and then re-assigning the actions.

I also need to create new helpers per room if I want to store extra information for actions.

WTH…

/Robban

I’ve had really good success with pasting the yaml into Claude and giving it the replacement entities. Just tell it what to do.

Thanks! That’s one way of doing it. This is a situation I think many are in and would benefit from internal improvements of Home Assistant to solve this long term as well. But short term definitely AI can solve it.

This sounds like a ‘i want to be able to dynamically apply the logic to different components/environments:l’, am I assuming that correctly?

I have a similar situation where I create an automation to automatically switch off the heating if a window is opened in that room, I need to copy and adapt that to every other room.
I know theoretically I can do that with scripts, but it is complex.

don’t forget to vote for your own WTH

Duplicating an automation is like a blueprint more or less, where you can define helpers and things like that. There are probably many ways to solve this, but I do like blueprints a lot

Have you taken a look at the current Beta? The new target exclusion and replace options in the automation editor should help make it easier to take an area-based approach.

It is an improvement indeed but it is still not enough as I have to do explicit replacements as well as the need of creating new helpers.