Helper with attributes?

I’m not sure of terminology (which is hampering my search), so please bear with me - and correct as neccesary :.)

I’m running a HA instance with various sensors/lights using both default automations and node red routines.

I am trying to make it more “intelligent”, and to this end, I have designed a system where various sensors trigger “events” - which are upon the lines of “input_select.event.kitchen”.
When these events change value - say from “bedtime” to “asleep”, it will change the value of another “input select” - let’s say “input_select.state.bedroom” - this “state” will then be used to determine which lights are activated by motion sensors, or how bright they are
The idea being that I can trigger a specific “event” in various ways, which can activate various “states”.
eg, the “wake up” or “visitor” event might trigger the “cuppa” state, but only “wake up” will trigger the “shower” state (which turns on the bathroom speakers, and the bathroom heater )

anyway: my question.

It would be very convenient for me to be able to have a “helper” that has various attributes - such as the “lux value” where a specific scene will activate, or how long a light is to be held on after being activated, or if the lights are to be controlled via a PIR, or a “time” attribute when the scene will activate.
The values of each attribute could then be read by a generic “function” in node red - rather than having separate functions for each “state” as I have now.

How do I (can I ?) make an entity with multiple attributes?
It would be useful if I could change the values attributes “on the fly” - for example so I could “dial in” the exact lux level I want for light activation.

I’m using scenes at the moment to set a variety of input helpers - “input_number.kitchen.lux”, “input_number.kitchen.delay” for instance. But I’d like to read one entity and have all information I need.

Sorry for the long post - hope I’ve made sense. :./

1 Like

Try with very useful python script:

Thanks for that - its pointed me towards “template sensors” which looks like it might do whaI I need.

1 Like

Any success in using templates?