Skip to content
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

Get additional information from Blood Glucose and record as Sensor Attribute #84

Open
3 tasks done
lunarok opened this issue Jul 25, 2023 · 0 comments
Open
3 tasks done
Labels
enhancement New feature or request python Pull requests that update Python code
Milestone

Comments

@lunarok
Copy link
Contributor

lunarok commented Jul 25, 2023

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

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

Take Blood Glucose value, it's very important to know if the measurement is before or after meal.
Google Fit has this type of information.

Describe the solution you'd like

Will be nice for some sensors to be able to pull additional informations and record it as "attributes" in HA.
Seems self._attr_extra_state_attributes['meal '] = 2 in sensors.py could be a way. With some method to get second value like blood pressure systolic.

Blood Glucose have few ones, Blood Pressure could be nice also to add Systolic and position as attribute.

Describe alternatives you've considered

Another way could be to add sensors to fetch those values, but attributes allow to keep "context".
If exporting values (to external DB like InfluxDB) or reading by API, attributes allow to see all informations related to each other in a single way.

Additional context

Seems on https://github.com/YorkshireIoT/ha-google-fit/blob/main/custom_components/google_fit/api.py it will be a major impact as parsing of API is mainly done per sensor.

No idea if this will be easly/moderate/complex to achieve. And don't think I could do it alone this one :)

@YorkshireIoT YorkshireIoT added enhancement New feature or request python Pull requests that update Python code labels Aug 13, 2023
@YorkshireIoT YorkshireIoT changed the title Get additional informations from sensors as attributes (exemple : Blood Glucose if reading was before or after meal) Get additional information from Blood Glucose and record as Sensor Attribute Aug 13, 2023
@YorkshireIoT YorkshireIoT added this to the v2.NEXT milestone Aug 13, 2023
@YorkshireIoT YorkshireIoT modified the milestones: v2.NEXT, v3 Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants