basnijholt / adaptive-lighting

Adaptive Lighting custom component for Home Assistant
https://basnijholt.github.io/adaptive-lighting/
Apache License 2.0
1.86k stars 135 forks source link

Separate adaptive_lighting.set_manual_control service into brightness and color #290

Open ItsMeAubey opened 2 years ago

ItsMeAubey commented 2 years ago

I've just discovered this project and absolutely love it.

In my use case, I have remotes around the house that let me adjust the brightness of my lights manually - I'd like to be able to do this, and call adaptive_lighting.set_manual_control in nodered, but without disabling the automatic colour temperature management. I think that the best way to do this would be to split adaptive_lighting.set_manual_control into two halves (or for the sake of backwards compatibility, add two more options):

adaptive_lighting.set_manual_control_brightness adaptive_lighting.set_manual_control_color

Right now I do this in a janky way by forcing switch.adaptive_lighting_adapt_color to on every time i turn my lights on, but that means that if I disable the setting in my web ui, every time I turn my lights on, that setting is overwritten. splitting set_manual_control would fix this.

th3w1zard1 commented 1 year ago

I absolutely love this idea, and it doesn't sound like it'll take long at all.

basnijholt commented 1 year ago

This would require a major rewrite of how manual_control is registered. Right now it is global and not on a per switch basis.

Could you accomplish what you want by just switching the adapt_brightness and adapt_color switches on and off (instead of calling set_manual_control)?

basnijholt commented 1 year ago

Another thing that was requested (and is related to this) by @TheAlphaLaw is https://github.com/basnijholt/adaptive-lighting/pull/709#issuecomment-1673488342