Hi,
Situation:
I have a hue light bulb connected via zigbee2mqtt to my OH3.2 instance.
There are two separate channels for state (ON/OFF) & brightness and I have linked items with these channels separatly.
Turning ON & OFF or dimming the light is working as expected and the light bulb will manage to update the ON/OFF state in case I change the brightness:
E.g. if I change brightness from 40% to 0%, then ON/OFF state will also change from ON to OFF automatically.
However if light is ON, brightness is e.g. at 40% and instead of changing the brightness I change the state from ON to OFF, the light bulb will turn off, but the brightness will stay at 40%.
This feature in general good, as changing the state again from OFF to ON will recover the brightness correctly at 40% (Would the state item be linked to the brightness channel, then a change from OFF to ON would set brightness to 100%).
Question & Issue:
On some pages (e.g. a floorplan) I only want to show the brightness item and do not want to show brightness & ON/OFF state.
While the brightness is still set to 40% in above example, but the light is turned off, I have currently no chance to identify if the light is actually ON or OFF. Also if I add a lightbulb icon and have “iconUseState: true” the lightbulb icon on the birghtness item will still indicate ON due to the state of 40%.
Anyone facing similar issue and has a recommendation on how to best deal with this situation?
E.g. Is there a way to set an expression for the icon & the state used for the icon, e.g. if(state=OFF) { icon = lightbulb with 0% } else { icon = lightbulb according to brightness} ?
Thanks in advance