ioBroker / ioBroker.type-detector

Helper module (not adapter) to detect types of devices
MIT License
8 stars 9 forks source link

Device type dimmer misses the power states #43

Closed Apollon77 closed 3 months ago

Apollon77 commented 3 months ago

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

Garfonso commented 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 ;-) ).

Apollon77 commented 3 months ago

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

Apollon77 commented 3 months ago

should be fixed in 4.0 (needs then to be used but one step after the other)