fredck / lightener

Magically control the state and brightness of lights in Home Assistant.
MIT License
99 stars 2 forks source link

Configuring via UI is hard. #117

Closed fcassata closed 7 months ago

fcassata commented 7 months ago

First off, thanks so much for this integration, an absolute game-changer for our home!

I have a 16-bulb light, and I use lightener to turn them on one by one before starting to increase brightness after they are all on. I do this because the lowest brightness with all on is too bright most of the time. Each light is configured with 3 - 5 mapping lines.

If I configure this in the UI, I only see one light at a time, out of 16, and have to pay close attention that I'm adding the correct mapping to the correct light, and have to actually lay it out fully in text beforehand, since I have no overview in the UI config. There's also no back button, so if I make a mistake, or have to double check something, I have to start over.

Any chance you can do the light mapping on one screen instead?

fredck commented 7 months ago

The initial design for the configuration flow aimed to enable users to add, remove, and configure lights all within a single view, using a sequence of text fields for all selected lights.

Unfortunately, the Home Assistant config flow system has limitations, specifically the inability to dynamically create fields in flow steps, which restricts us from implementing such a UI configuration at this time.

A feasible workaround is to manually edit the /config/.storage/core.config_entries file. It appears that restarting HA is not necessary after changes; reloading the specific Lightener config on the integration page should suffice.

While this is not ideal, given the current limitations within HA and the existence of a reasonable workaround, I'm going to close this issue. However, I'm open to revisiting and reopening it if a more viable and implementable solution be proposed in the future.

fcassata commented 7 months ago

Thanks for the detailed response! Editing the config_entries file is good solution for now.