Question about item-type Dimmer

Hello,

I’m asking myself some question about Dimmer item-type.
Is this item-type is always backend by a PercentType, or can it be also backend by a NumberType

I was able to create a dimmer that goes from 0 to 360 settings the maxValue on the StateDescriptionFragmentBuilder.

But my issue is that when I change the value, the acceptedTypes are PercentType, OnOffType, and IncreaseDecreaseType. So the change fail because of PercentType.valuedateValue throwing exception when value > 100.

I can of course use directly a NumberType for this channel.
But if I do so, the Item display a InputBox instead of the Slider.

What are the correct way to achieve this ?
I try to remember, but not sure to ever see in any addon a dimmer with value that are not in percent ?

Laurent.

I tried and yes, dimmer item is percent with max of 100.

With the max value you can go lower than 100, not more.

I think you have to use a number item.

But you can use a slider for this in your mainui or sitemap

Yes, after taking a lot of time this afternoon, and looking to the core code, this is also my conclusion.
So for now, I put back my item to be Number only in this case.

Thanks,

 Laurent.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.