nitobuendia / oura-custom-component

Oura Custom Component for Home-Assistant. Adds Oura Ring sleep information.
106 stars 25 forks source link

[Feature Request] Add datetime sensors: heart rate #20

Closed nitobuendia closed 1 year ago

nitobuendia commented 1 year ago

In the quest of adding all Oura API data as sensors, we want to add Heart Rate sensor. This is different to other sensors in that the data is not fetched by day/date, but by datetime (ISO 8601).

nitobuendia commented 1 year ago

This is now available on oura-v2 branch. I will close this when oura-v2 gets merged into the main branch.

Heart rate belongs to a new type of sensor where instead of being timed, data is being timed. A lot of the logic from this sensor could be extracted as a base OuraDatetimedSeriesSensor derived from OuraDatedSeriesSensor. However, since there's currently only one sensor of this kind, the logic remains on the heart rate sensor instead.