You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Dimmer item linked to a channel with unusual min and max value will send a wrong value to the openHAB API.
When linking and item to a channel with unusual low or high values (here, a number channel from a mqtt.homeassistant thing, with a script profile to transform between), the min and max will be shown like this :
The issue is that the main UI will send this value between 200 and 254.
But the value accepted by the openHAB API for a dimmer item is between 0 and 100.
Expected behavior
The UI should send a value between 0 and 100, calculated from the gui_dimmer_value and the min max boundaries.
percent_value_sent_to_api = 100 * (gui_dimmer_value - min) / (max - min)
Steps to reproduce
A thing with a number channel with boundaries other than 0 and 100.
Linking the number channel to a dimmer item (with the help of a transform script, because the default profile not available for this kind of configuration)
Trying to set the dimmer value from the GUI
error message and browser dev console show http bad request.
Tried in firefox and chrome
Browser console
Browser network traffic
Additional information
retrying to send the same message, with a POST value between 0 and 100 is OK.
The text was updated successfully, but these errors were encountered:
The problem
A Dimmer item linked to a channel with unusual min and max value will send a wrong value to the openHAB API.
When linking and item to a channel with unusual low or high values (here, a number channel from a mqtt.homeassistant thing, with a script profile to transform between), the min and max will be shown like this :

The issue is that the main UI will send this value between 200 and 254.
But the value accepted by the openHAB API for a dimmer item is between 0 and 100.
Expected behavior
The UI should send a value between 0 and 100, calculated from the gui_dimmer_value and the min max boundaries.
percent_value_sent_to_api = 100 * (gui_dimmer_value - min) / (max - min)
Steps to reproduce
Tried in firefox and chrome
Browser console
Browser network traffic
Additional information
The text was updated successfully, but these errors were encountered: