Why do we have a name for Automations? Or how to improve an overwhelming amount of them?

I’m rather noob in HA, so I believe I might be just doing something wrong.

Basically what I have is bunch of smart light bulbs and bunch of smart buttons. And what I need is to “connect” button clicks with light toggle actions.

HA UI is kind of straightforward → go the the device, to Automations section, click +, “Do something when…” → “button is pressed”, then add action “Toggle the light”. Kind of easy. But then it asks you to “name” this “automation”. Okay, “toggle lights bedroom”. And here it goes… Now I have “toggle lights bedroom button 2”, “toggle lights bedroom double click button 3”, “toggle lights bathroom motion sensor” and who knows what, like around 20 “automations” with names like “<device> + <trigger> + <1…N>”. For the smart plag which I need to be turned on only at night I have two automations: “Turning plug on with sunset” and “Turning plug off with sunrise”.

This feels already too much and pure spaghetti-“code”. How am I supposed to do this in a “proper” way? What am I doing wrong?
Initially I was expecting a “simple” connection, trigger+device action, I don’t really need to have a special name for it. But it’s not like this apparently.

P.S. While I’m a software developer and perfectly fine with writing code/yaml, I still like simplicity of UI while it can solve my problems.

Hi,
I think you’ve hit an issue many people do and it’s more about how you structure/plan it before making changes. I’m also a dev but yes also avoiding YAML as I think GUI is better for this type of system!

I think you are probably creating these automations from the wrong place, I create them in SETTINGS > AUTOMATIONS as that way I can then create them with multiple triggers which is the bit I think you’ve probably missed since you’re creating from the button/device itself.

Go into automations and pick your “toggle lights bedroom” automation. At the top press Add trigger and create the second trigger for it (your second button), and so on.
You can then change the action to be a toggle rather than a fixed ON or OFF which should also help avoid having 2 automations (an ON and OFF)

Hope that makes sense?

1 Like

Thanks, this might help indeed, but what about the cases where I somehow want to be sure that it’s on/off (like with the timed example, when my plug is on at night and off in the morning, or, even better - setting the TRVs to the particular temperature in the morning and to another one at night)?