Pyhass / Pyhiveapi

A python library to interface with the hive home api
MIT License
24 stars 18 forks source link

[BUG] setBoostOn comparison error #56

Open amarnagi opened 2 years ago

amarnagi commented 2 years ago

Describe the bug mins and temp data types cannot be used in comparsion ( i get an error) - mins is a str for example if mins > 0 and temp >= self.getMinTemperature(device):

Expected behavior I had to add this to fix it if int(mins) > 0 and int(temp) >= self.getMinTemperature(device): and if int(temp) <= self.getMaxTemperature(device):

amarnagi commented 2 years ago

same issue on the hotwater.

python3.10/site-packages/pyhiveapi/hotwater.py", line 154, in setBoostOn mins > 0 TypeError: '>' not supported between instances of 'str' and 'int'

KJonline commented 2 years ago

Are you using the library with home assistant or on its own?

amarnagi commented 2 years ago

@KJonline on it's own