Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mqtt.generic] Percentage value not configured as 0..100 if min and max use a different range #10586

Closed
rogierhofboer opened this issue Apr 26, 2021 · 1 comment · Fixed by #10587
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@rogierhofboer
Copy link
Contributor

Expected Behavior

If you create a channel with a percentage value with a min and max of for example 1..254
It converts input values from 0..100 to 1..254 and output values from 1..254 to 0..100
The channel implementation reports 0 as min and 100 as max value to the users of the channel.

Current Behavior

The channel implementation reports 1 as min and 254 as max value to the users of the channel.

Possible Solution

A percentage value should always report 0..100 as range and keep the internal range hidden.

Steps to Reproduce (for Bugs)

  1. Create a channel with a percentage value.
  2. Set 1 as min and 254 as max value.
  3. Create an item for the channel
  4. The item has a slider with a range from 1 to 254 (and values above 100 do not work)

Context

Items created from percentage value mqtt channels do not have the correct range by default.

Your Environment

  • Version used: (e.g., openHAB and add-on versions)
    OpenHAB Milestone 3.1.0
  • Environment name and version (e.g. Chrome 76, Java 8, Node.js 12.9, ...):
    N/A
  • Operating System and version (desktop or mobile, Windows 10, Raspbian Buster, ...):
    N/A
@rogierhofboer rogierhofboer added the bug An unexpected problem or unintended behavior of an add-on label Apr 26, 2021
rogierhofboer added a commit to rogierhofboer/openhab-addons that referenced this issue Apr 26, 2021
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
@CSchlipp
Copy link
Contributor

CSchlipp commented Jun 3, 2021

Could this be the root cause of openhab/openhab-webui#832 ?

kaikreuzer pushed a commit that referenced this issue Jun 21, 2021
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
computergeek1507 pushed a commit to computergeek1507/openhab-addons that referenced this issue Jul 13, 2021
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
lucacalcaterra pushed a commit to lucacalcaterra/openhab-addons that referenced this issue Jul 26, 2021
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com>
lucacalcaterra pushed a commit to lucacalcaterra/openhab-addons that referenced this issue Jul 26, 2021
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com>
lucacalcaterra pushed a commit to lucacalcaterra/openhab-addons that referenced this issue Aug 3, 2021
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com>
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this issue Oct 26, 2021
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this issue Nov 7, 2021
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this issue May 5, 2022
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants