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

[deconz] thermostat valve value shows UNDEF - regression from pr #14622 #14867

Closed
LukasA83 opened this issue Apr 21, 2023 · 1 comment
Closed

Comments

@LukasA83
Copy link
Contributor

Deconz Thermostat things are, starting from 4.0.0.M2, showing the valve value as "UNDEF", when the thermostat is open > 40%.
grafik

This is a regression introduced by PR #14622. The code expects value 0-100, but deconz delivers 0-255, where 255 means 100% open.
grafik

old code:
case CHANNEL_VALVE_POSITION: updateQuantityTypeChannel(channelUID, newState.valve, PERCENT, 100.0 / 255); break;
new code:
case CHANNEL_VALVE_POSITION -> { Integer valve = newState.valve; if (valve == null || valve < 0 || valve > 100) { updateState(channelUID, UnDefType.UNDEF); } else { updateQuantityTypeChannel(channelUID, valve, PERCENT, 1.0); } }

@LukasA83 LukasA83 added the bug An unexpected problem or unintended behavior of an add-on label Apr 21, 2023
@J-N-K
Copy link
Member

J-N-K commented Apr 21, 2023

After a discussion with deconz developers, the correct value is 0-100. This is also what most devices report and the reason why we changed it. A device that reports values above 100 has a broken firmware.

If you are on the latest deconz firmware this should be fixed. If it is not fixed, you need to create a DDF for the device.

@J-N-K J-N-K closed this as completed Apr 21, 2023
@J-N-K J-N-K removed the bug An unexpected problem or unintended behavior of an add-on label Apr 21, 2023
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

2 participants