-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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 support to a different unit of measurement(mmol/L) on Nightscout #58921
Add support to a different unit of measurement(mmol/L) on Nightscout #58921
Conversation
I don't think this needs to be an option flow. As a matter of fact, an option flow will cause problems as it can change the UoM for an entity, which isn't compatible with the long-term statistics. So the comment of the previous PR still holds. |
@frenck what you propose for people that need this value in |
Provide it as a secondary sensor (but disabled by default?) |
btw, the dexcom integration does this in the same way, on the config flow: |
I see, that will break stuff if the user changes it. So for that matter won't recommend on copying that pattern (nor will I approve such pattern). |
Yeah, I guess that makes sense with the long-term statistics. |
I don't think that makes sense or is needed. There is nothing wrong with a secondary sensor. |
@frenck I think that the use case here is to always just use Either way, my point is that I think the user should just choose which unit it's used where they live, on the setup flow, and never change it again since there's no need to. |
It could be part of the config flow (not option flow), that way it isn't changeable. But honestly, expose both sensors will satisfy any user. It isn't expensive. |
Proposed change to advise on use of an access token rather than API_SECRET, Provide link to nightscout guide.
Proposed change to advise on use of an access token rather than API_SECRET, Provide link to nightscout guide.
advise on use of an access token rather than API_SECRET
We've already made our selection into the unit of measurement to be used when we set up our personal nightscout sites and I agree this is unlikely to ever be changed. @marciogranzotto The unit setting is exposed by the nightscout API (abet on the server_status call rather than individual entries/sgv calls). As a user i'd be happy to enable/disable the appropriate sensor if it was not set automatically |
@markvader thanks, I'll take a look on it! |
Hi @marciogranzotto, did you have any time to look into this? I don't know if I could help, since I've never contributed to HA before... I'm very exciting use the mmol option soon ;) |
Integration setup - advice on use of an access token rather than API_SECRET
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Breaking change
Proposed change
Bulding upon #54898 this PR uses the updated
py-nightscout
lib that has the new unit values conversion done, providing values likesgv_mmol
anddelta_mmol
. If the user selects themmol/L
unit, we just change which property of the response we use on the entityType of change
Additional information
Checklist
black --fast 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
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: