-
-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add several more health connect sensors #4785
Conversation
app/src/full/java/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/sensors/HealthConnectSensorManager.kt
Outdated
Show resolved
Hide resolved
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 |
…rs to properly reset at midnight, convert some sensors to aggregate
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 |
Due to popularity felt the need to add blood glucose here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code and sensors look good. Nice clean up of the internals so some code can be reused.
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
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.