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

exception setting value with many decimals #1667

Open
marcusb opened this issue Oct 11, 2021 · 0 comments
Open

exception setting value with many decimals #1667

marcusb opened this issue Oct 11, 2021 · 0 comments

Comments

@marcusb
Copy link

marcusb commented Oct 11, 2021

Stepping the temperature setpoint on a thermostat with the BasicUI controls, with the thermostat configured for Celsius, frequently results in a floating-point value with a lot of decimals being sent to the channel, even if the starting value was an integer. This causes an exception in the binding, which seems to error out on high-precision numbers.

There is of course no value in keeping all these decimals, they are just a rounding artefact. I think the binding should discard them.

Observed behavior: The change does not take effect.

Expected behavior: Lowering the temperature works. Rounding happens where needed (presumably in the binding).

Debug log:

2021-10-10 22:05:32.077 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 25: Command received zwave:device:512:node25:thermostat_setpoint_cooling --> 23.38888888888889 °C [QuantityType]
2021-10-10 22:05:32.078 [DEBUG] [ter.ZWaveThermostatSetpointConverter] - NODE 25: Thermostat command received for 23.38888888888889 °C
2021-10-10 22:05:32.079 [DEBUG] [.ZWaveThermostatSetpointCommandClass] - NODE 25: Creating new message for command THERMOSTAT_SETPOINT_SET
2021-10-10 22:05:32.079 [ERROR] [.ZWaveThermostatSetpointCommandClass] - NODE 25: Got an arithmetic exception converting value 23.38888888888889 to a valid Z-Wave value. Ignoring THERMOSTAT_SETPOINT_SET message.
2021-10-10 22:05:32.080 [WARN ] [ter.ZWaveThermostatSetpointConverter] - NODE 25: Generating message failed for command class = COMMAND_CLASS_THERMOSTAT_SETPOINT, endpoint = 0
2021-10-10 22:05:32.081 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 25: No messages returned from converter

This appears to be the same bug as openhab/openhab1-addons#3794.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant