Automatic creation of helpers for automation

Hi all,

I was wondering if it is possible to automate the creation of helpers in home assistant.
I have created a blueprint that i use to automate all my lights.
Each light can be turned off/on with a hardware button, webhook, or motion.
If the light is turned on with a hardware button, it doesn’t automatically turn off. If it is turned on with motion it does. It also doesn’t turn off when the vacuum is vacuuming (because it needs a minimum of light to plot it’s path properly).

I accomplish all this with some “memory” helpers.
The issue is, i need ± 6 helpers to do this. It is kind of cumbersome to create helpers manually for each light i want to automate. Is there a way i can do this with a script that i need to provide minimal input? Preferably in a way i can change things via the UI, like add entities to ex: a motion group?

I marked the helpers in red.

1 Like

Not exactly like creating helpers via code, but there’s something I think you can try (from what I’ve read, since I haven’t tried it…):