mjg59 / python-broadlink

Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs
MIT License
1.35k stars 477 forks source link

Thermostat: get the 1st decimal place #771

Closed irsl closed 8 months ago

irsl commented 8 months ago

Context

The Broadlink Hysen thermostats do support 1 decimal precision, but this library did not extract that information. This PR provides access to the additional bit of information.

Proposed change

I decompiled a relevant Android app to learn how it extracts temperature values with 1 decimal place precision. The relevant part of the code can be found here: https://pastebin.com/EYHBJ5sn I ported the logic to this codebase and the numbers are now showing up fine in HA.

I tested this with Computherm E400RF and Computherm E280 (a product by a Hungarian vendor).

Type of change

Checklist

irsl commented 8 months ago

Sorry, didn't notice the conflict. I'll file a new one soon.