home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.35k stars 656 forks source link

Add several more health connect sensors #4785

Closed dshokouhi closed 2 weeks ago

dshokouhi commented 2 weeks ago

Summary

This also fixes the attribute for total calories burned to display the current timestamp as it is an accumulated value, currently for me the timestamp on the attribute there is off by the UTC offset. UTC offset is meant for sensors with the timestamp device class.

Screenshots

image

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#1134

Any other notes

With the exception of exercise this is all the data I have for myself in Health Connect.

jpelgrom commented 2 weeks ago

I see there are docs now. Why are those descriptions different from the sensor description?

dshokouhi commented 2 weeks ago

I see there are docs now. Why are those descriptions different from the sensor description?

I'll update the strings here to match the docs, originally they were matching the descriptions in teh app

dshokouhi commented 2 weeks ago

latest update converts a few sensor to be aggregate so teh value can reset to 0, for example if you climb no floors for the day the value should be 0 until you do.

sleep duration updated to get data from teh record directly instead of aggregate, using some basic math to subtract end time from start time for the state.

corrected data in total calories sensor to reset properly to 0 and to correct the attribute

dshokouhi commented 2 weeks ago

Due to popularity felt the need to add blood glucose here

https://github.com/home-assistant/android/issues/1523 https://github.com/home-assistant/android/issues/2098 https://github.com/home-assistant/android/issues/2537#issuecomment-2455274795 https://github.com/home-assistant/android/issues/2537#issuecomment-2461327329