openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.58k forks source link

[wled] Brightness not synced across channel and power not turned on #16906

Closed t2000 closed 1 month ago

t2000 commented 3 months ago

I have just installed my first WLEDs and therefore played around with the binding.

What I noticed is that there is a dedicated "brightness" channel per segment along with the "master control" channel of the segment. However, the "master control" is a color channel and accepts brightness values too. However, they are not in sync with the dedicated "brightness channel". I am even not sure if the dedicated "brightness" channel is needed at all, because with the fix in my MR one can easily link a Dimmer item to the "master channel" and change the brightness that way. Just like any other light binding does it.

Moreover the "global power" was not switched to "on" when doing the following:

I have created an MR to align all these things and I am open to suggestions, i.e. if I forgot anything. It works nicely to have everything in sync now, sending all the possible commands to these channel and seeing that the state is consistent.

We could even think of removing the dedicated brightness channel, as there is IMHO no real need for it. However, I left it in for now, to not create a breaking change for existing users.

t2000 commented 3 months ago

org.openhab.binding.wled-4.2.0-SNAPSHOT.zip

The attachment contains the bundle for testing, just rename it to ".jar" instead of ".zip" and place it into your "addons" directory. (Of course remove the "wled" entry from your addons.cfg so the official wled binding gets uninstalled first)

t2000 commented 3 months ago

org.openhab.binding.wled-4.2.0-SNAPSHOT.zip

new version with latest commit