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

Sonoff TRVZB: Fix rounding of externalTemperatureInput #9072

Merged

Conversation

marazmarci
Copy link
Contributor

@marazmarci marazmarci commented Mar 26, 2025

As described in Koenkk/zigbee2mqtt#26846, the converter for the Sonoff TRVZB's externalTemperatureInput attribute is prone to
floating-point precision errors. A simple Math.round call is enough to solve this, and specifying precision: 1 will do just that under the hood.

After the fix, it's now possible to set the value to 19.4 and it won't change to 19.3.

@Koenkk Koenkk merged commit e7f477e into Koenkk:master Mar 26, 2025
3 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Mar 26, 2025

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants