Additional custom parameters for each light entity

Hi all,

Currently I am building automations and scripts, which can calculate a desired brightness and apply it to my bulbs. This calculation is being done by a min and a max lux value on an X-axis, and a min and a max brightness value on an Y-axis. This script with the mathmetical formula is working perfectly,

Now, I am looking for a way to store those min and max values, per light entity, so I have the possibility to set each light setting in the frondend.

I could do this by creating an input_number for each min / max value per entity, but I’m looking for a more dynamic / scalable solution. Same applies for a sensor template with multiple values: a sensor template with default values cannot be created by a script or service, when adding a new light entity for instance.

I’ve also looked at custom attributes on all light entities. Those seem to be static, and cannot be altered by a script or template. Also, those attributes will default upon a reboot.

Also looked at a .csv file. Can be done with a notify update service to store the parameters into the .csv file, and data can be requested from it. The downside of this method is, every setting change is stored. Over time, the .csv will be filled, without ever being cleaned up, since removing a “record” from the .csv does not seem to be possible from Home Assistant itself.

Does not seem to have support to create, update and remove custom records from home assistant - or am I wrong here?

Recorder / MariaDB:
Service doesn’t seem to exist to controll what is recorded, so no custom attributes possible as it seems

This leaves me with one possible solution, by “abusing” the list integration:
Item: light_entity_<light_ID>_<paramter_name>
Description: <numeric_value>

With scripts, variables and templating, this might work. Or is there another solution to accomplish this perhaps?