Pyhass / Pyhiveapi

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

[FEATURE] Add thermostat temperature history #34

Open martintoreilly opened 2 years ago

martintoreilly commented 2 years ago

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

I would like to access my thermostat's temperature history. This is available from the following Hive beekeeper API endpoint :https://beekeeper-uk.hivehome.com/1.0/history/heating/<thermostat_id> with the following parameters.

I'm happy to make this change and submit a PR. @KJonline Do you have any thoughts about where this best fits in the pyhiveapi API structure?

Additional context

martintoreilly commented 2 years ago

I'm also happy to extend the Hive Home Assistant Integration to expose this new functionality, though I'll need some time to get my head into the codebase.

KJonline commented 2 years ago

@martintoreilly as a starter for 10 I would build the api and then we can see how to can be utilised elsewhere. The key with this library is to make sure it’s compatible with 4 use cases

1) through home assistant 2) using a pyhiveapi as home assistant does but without home assistant 3) async raw api 4) sync raw api

with regards to unasync this only works on the main code not the api code so you do have to code twice as unasync doesn’t work well with sync and async http libraries