CGM is primarily used by Type 1 Diabetics to monitor their blood sugar levels in real-time. There are a couple of threads dedicated to getting CGM data into HA (And there are some discussions in those threads around automation).
But, I wanted to start a new thread dedicated to using that data. I plan to update this thread as I discover new ways to utilize my data in HA. My first project is to begin graphing data in a useful way to keep an eye on my blood sugar level.
I came across the mini-graph-card custom Lovelace card and thought this would be a good place to start. It allows you to generate some pretty nifty graphs for displaying CGM data. I’ve been playing with it for 30 min or so and this is what I’ve come up with so far:
Here’s the code for some for the two different types of cards I’ve used above
Avg per day:
type: 'custom:mini-graph-card' entities: - entity: sensor.bryan_cgm_sgv name: Avg CGM Value Per Day aggregate_func: avg group_by: date hours_to_show: 168 show: graph: bar labels: true color_thresholds: - color: '#039BE5' value: 60 - color: '#0da035' value: 100 - color: '#e0b400' value: 150 - color: '#e45e65' value: 200
type: 'custom:mini-graph-card' entities: - sensor.bryan_cgm_sgv name: CGM Graph - 36 Hours hours_to_show: 36 points_per_hour: 60 show: labels: true color_thresholds: - value: 60 color: '#c0392b' - value: 75 color: '#08ff2d' - value: 150 color: '#f7ff08' - value: 200 color: '#ff3508'
Any other diabetics doing cool stuff with your CGM data in HA?