Closed Apollon77 closed 3 months ago
Maybe we should think about a mechanism to inherit states. So that all the more complex lights inherit the basic states from the basic light object? (there are at least dimmer, ct, rgb, rgb_single, cie, hsv - all are "lights").
Or perhaps rethink the handling of light and make all of those optional. But makes adapters using them a bit more complex (although I more or less did it this way in lovelace anyway, lovelace handles all types of lights with the same code ;-) ).
The good thing is that "code wise" it would be easy to define the "power states" once and then just add them to all types as needed as it is already done for unreachable and such,so we do not need to "copy code", but still allow us to be generic.
I will try a PR next days
should be fixed in 4.0 (needs then to be used but one step after the other)
The Dimmer device type do not have the Power/Consumption/Frequency and such values added like the light or socket has it. We should add them there too optionally.
maybe also an issue in type detector because there also when used these states are not correctly found