libpurecool icon indicating copy to clipboard operation
libpurecool copied to clipboard

Granular temperature control

Open ptrwtts opened this issue 4 years ago • 5 comments

I noticed that the formula for converting temperature rounds the result, such that every second degree in Fahrenheit is the same. For example:

print(HeatTarget.fahrenheit(68))
print(HeatTarget.fahrenheit(69))
print(HeatTarget.fahrenheit(70))
print(HeatTarget.fahrenheit(71))
print(HeatTarget.fahrenheit(72))
print(HeatTarget.fahrenheit(73))

gives

2930
2930
2940
2940
2950
2950

Is this a limitation of the device? I tried manually setting heat_target=2945 but it didn't work. Is there any known workaround? Would really like to be able to set a more granular target. Thanks!

ptrwtts avatar May 04 '20 08:05 ptrwtts

Hi,

I don't have a model with heating myself, so I would need your help to figure out if its a limitation of the device or not,. If it isn't, I'll update the formula to convert to kelvins more precisely. I doubt that it is, but let's test it first.

Which fan model are you using? Asking because the code differs a bit between the new and the old model. If it is an HP04 are you setting the temperature with the set_heat_target method, or are you calling set_configuration directly?

Can you try to to set the the heat_target to 2931 please, that should correspond to 68 Fahrenheit. If this doesn't work I'll push a test branch that logs the messages coming from the fan when you set the temperature from the app, so that we can see whats going on.

etheralm avatar May 05 '20 23:05 etheralm

@etheralm I've had the same problem with my HP04. I'd like to help test, but I'm not sure how to call what you asked. Calling climate.set_temperature from home assistant gets this same behavior. Anything I can do to help?

iceman23e avatar May 08 '20 13:05 iceman23e

@iceman23e the home assistant integration already uses the helper function that converts Fahrenheit Kelvin. You'll have to run this library directly. Can you start the python console from where hass is running? If you can I tell you which commands to run there to connect to your fan and test the set_temperature method directly.

etheralm avatar May 08 '20 17:05 etheralm

@etheralm I'm running HA on a pi4 and am not sure how to do that. I'd like to help, but I'm not sure how.

iceman23e avatar May 08 '20 18:05 iceman23e

@etheralm I have a Dyson Pure Hot+Cool Link™ HP02 got some python for me to run?

homekitter avatar Jun 12 '20 18:06 homekitter