I have a
Dimmer item who has additional state types (see here at the bottom https://docs.openhab.org/v2.2/concepts/items.html).
Main state is
PercentType but it has also the state type
If I add this item with
default to the sitemap I get of course a dimmer item.
If I change the type to
switch I get the switch item.
But I want to show instead of the switch 2 buttons with “ON” and “OFF”.
With a standard switch item I use a mapping with “ON=” and “OFF=”.
This is not possible with the dimmer item because it checks always the state of the current dimmer value.
For example state=1 or state=50.
How can I access inside the mapping the alternative state “ON” and “OFF”?