My wife is type 1 diabetic, over the last 4-5 years we have been self funding the use of the Dexcom G6 then ultimately the Dexcom G7.
The NHS has now finally said they will fund the Dexcom, however they only provide the Dexcom One and after a few days of use it is clear that it is lacking on a number of features that were helpful in managing this condition.
Blood Trends
Double Down Warnings
Double Up Warnings
Share with family
This Dexcom one literally is only a case of setting the high and low threshold and then it beeping when its met. Anyone that has this condition knows it would be better to action a double down warning than be told about when it is too late.
Anyway on reflection i have ressurected an old Nightscout instance on my Synology NAS (using docker) which i can integrate with Home Assistant but it only appears to provide the blood meter reading.
That is fine as long as i can use the power of HA to replicate the features that are now missing.
Ultimately there must be others out there with Diabetes that have used Home Assistant to do these tasks and i am reaching out to those people for any advice or comments on how i could achieve what im looking for.
I have done some investigation and the below table shows how the blood direction and trends are calculated, this surely canb be replicated using automations or scripts ?
As always, thank you for your assitance in advance
Based on the table above made some binary sensors, i am sure there is a more compact and combined method of code that would do the same but as i am more of a hobbyist this is my attempt thus far;
As @nickrout mentioned the nightscout APi is the way to go for this.
The blood sugar reading in home assistant can show the trend via the MDI icon.
As I have to take different insulin to carb ratios depending on time of day and the fact maths is not my strong point, I recently created a page that I can input carb intake and it works out how much insulin I need based on carbs, time of day (ratio required) with or without correction and then allows me to post this and notes back to nightscout:
@nickrout@rossk thatk you both for your comments … was thinking about best to do this but was sure that someone out there would have done this before. let me play about with your suggestions and i will update this thread on any outcomes.