-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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 mmol support to nightscout #126602
Add mmol support to nightscout #126602
Conversation
Signed-off-by: Daniel Wind <[email protected]>
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.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hey there @marciogranzotto, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
Please add the unit constants to const.py
Version is required for local testing as s custom component |
Ok, I removed it again. The hassfest test was complaining about it. Sorry for all the commits, this is the first time I contribute. |
Co-authored-by: epenet <[email protected]>
Co-authored-by: epenet <[email protected]>
Co-authored-by: epenet <[email protected]>
Co-authored-by: epenet <[email protected]>
Co-authored-by: epenet <[email protected]>
Co-authored-by: epenet <[email protected]>
@danielwindit thanks for your contribution thus far. Maybe it should simply be handled outside of the integration, using a Template instead. |
Co-authored-by: Joost Lekkerkerker <[email protected]>
@epenet that's what I have been using before but I couldn't get the arrow working showing which shows the delta direction. mmol/L is the most common measurement used in the UK with mg/dL predominantly used in the USA and continental Europe, that given I figured more would benefit this addition. |
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.
This is a duplicate of #58921, #54898, and #41382 (all closed)
We concluded this should not be part of an option flow, as that would break statistics, config flow seemed to be the better option at the time (which is in this PR).
However; nowadays we added reconfiguration for config flows as well (which will be part of the next quality scale iteration requirements). Therefore, IMHO, both are bad options.
I think at this point there are 2 possible solutions:
- Expose 2 sensors (also not really nice)
- HA support unit conversations nowadays, in which the user can decide the unit to show. We could explore the ability to add a unit of measurement for this with both units.
I have opened an arch discussion for this: home-assistant/architecture#1146 |
Replaced by #129340 With that, a user can now just select the unit they prefer on the sensor level. ../Frenck |
Breaking change
Proposed change
This PR adds mmol/l support to the existing Nightscout integration. Mmol/l is mostly used in Europe for glucose readings.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: