finity69x2/light-brightness-preset-row

Feature request: multiple bulbs

Closed this issue · 3 comments

I have a lamp with three IKEA smart lights inside.

  • Setting them all to 1 yields a lot of light!
  • Setting only 1 of the 3 lamps to value of 1 is the absolute minimum for this thing
  • Setting 3 of 3 lamps to a value of 100 gives the maximum

So, what would be really cool would be a way to dim this group of lights, so that the actual light emitted from the three lamps is dimmed from 0 to 100.

The absolute best way to accomplish this, and this would be really awesome:

  1. put a lux meter (embedded in most motion sensors!) beneath the lamp with multiple lights inside

  2. wrap the lux meter and the lamp inside something to make it light-proof from the outside

  3. run a script that enumerates all the possible light settings for the three lights inside, e.g.

light1=0, light2=0,light3=0
light1=1,light2=0,light3=0
...
light1=100,light2=1,light3=0

and so on, and after each change of the light intensity *read the lux sensor to obtain the actual light emitted for this particular setting.

  1. sort the list of returned lux values and the corresponding light intensity setting for each light, based on actual emitted light

  2. use this list to create a dimmer from 1 to 100 that controls n number of lights.

  3. ???

  4. PROFIT

@haakonstorm

I'm not seeing how this is related to this plugin?

as long as you can create a dimmable light entity in your HA config then this plugin should work to control it.

The relationale is that you've already written a lot of logic and UI around brightness and color for light-entities. Expanding on that to include controlling a group (say, three) light bulbs, and treat them as one as described above, would increase the usefulness of the plugin. If i'm dropping your plugin in my UI, it occupies UI space - say, three buttons for my kitchen lamp. This lamp consists of three actual bulbs. One way of implementing my suggestion, in addition to the aggregated light-level described above, would be for the three buttons to respond both to a single tap/click or a tap/hold. A tap activates. Holding, it works as a dimmer. If dimming an aggregated light source, it does so in a smarter fashion, as described above. Other uses for differentiating on click/hold for users without aggregated bulbs inside one lamp, would be if they added multiple lamps to a single place that has a low/med/high button, that can either be set directly, or the three buttons when held, dims according to an arbitrary user defined fashion. Perhaps in a group of four lights, two of them increase and two of them decrease light intensity. Like a "scene". Get it? Would be awesome!

@haakonstorm

I'm not sure if you understand the huge amount of code that would entail.

It would be kind of like implementing a miniature version of HA with short press/long press discernment, programming how many bulbs are in the light, which bulbs to control when, dimming functionality, etc.

I definitely wouldn't be doing anything like that.

However, I think you might be able to do at least a part of that using a template light and in the template controlling which bulbs do what when you push the low medium and high buttons.

For example if you create a template light that when set to low activates a scene or script that sets the desired bulbs to the desired brightness. then calls a different scene when you set the template light to medium, etc.