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

Dropdown controls using Divisor default to the non-divided value #351

Open
sjhill01 opened this issue Jul 26, 2023 · 1 comment
Open

Dropdown controls using Divisor default to the non-divided value #351

sjhill01 opened this issue Jul 26, 2023 · 1 comment
Labels
HS Core This issue involves changes to core HS systems. NOT FOR PLUGINS To Do This issue is in need of attention UI Visual Problem This problem is causing the UI to display something incorrectly

Comments

@sjhill01
Copy link
Contributor

sjhill01 commented Jul 26, 2023

Environment

HomeSeer

OS

Windows

HS Version

v4.2.19.0

Development

PSDK Version

v1.4.4

Language

VB

IDE

VS2022

Dev OS

Windows

Page

Devices

Problem

Description

I implemented the new Divisor property for my thermostat setpoint control, which is a dropdown that now can display 0.5-degree increments (yay!). Normally, when a dropdown control is used, the selected item is set to the current value (I'm sure by matching up the device value to the option key). The problem seems to be that the Divisor property only changes the display value, not the actual underlying value that the dropdown sends, but the logic that sets which item should be selected by default doesn't take the divisor into account by either multiplying the device value or comparing to the display value instead.

Also, the Status Controls show min/max without accounting for the divisor and showing the raw values (20 to 60, for example), not the adjusted values (10 to 30 if divisor is 2).

Screenshots

Attach screenshots showing what you are seeing.

Expected Behavior

  1. When the devices value is 23.5, the dropdown by default should also be 23.5.
  2. When the min and max are set, they should be in relation to the divided value.

Basically, the assumption is that raw CAPI values are used when talking between HS and the plugin, but divided values should be used in the UI for CAPI controls and settings.

Steps to Reproduce

Provide steps so the HomeSeer team can reproduce the reported problem and see the same thing:

  1. Create a feature with a Status Control rendered as a dropdown with a range of values from 10-30, a divisor of 2, and 1 decimal point.
  2. Set the value of the device to 23.5
  3. View the device in the list of devices
  4. Note the dropdown has a selected item of 11.5 instead of 23.5.
@sjhill01 sjhill01 added HS Core This issue involves changes to core HS systems. NOT FOR PLUGINS To Do This issue is in need of attention UI Visual Problem This problem is causing the UI to display something incorrectly labels Jul 26, 2023
@sjhill01
Copy link
Contributor Author

Add related problem details about Status Control values (min/ax).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HS Core This issue involves changes to core HS systems. NOT FOR PLUGINS To Do This issue is in need of attention UI Visual Problem This problem is causing the UI to display something incorrectly
Projects
None yet
Development

No branches or pull requests

1 participant