Dexcom how often it updates

wondering if we can get this to 30seconds or every minute? the data in this does not change for 2 minutes after the dexcom updates. I use this data in node-red for an alert system I made using the alexas and ever since sugarmate doesn’t allow us to pull json data anymore, i have had to try other things. this is bar far the best option that i know of right now to get data from

I do know that dexcom only updates every 5 mins but when dexcom and HA updates are 2 or 3 minutes off from each other that is a huge deal.

Yeah, I’ve been meaning to look into this. I’d recommend altering the SCAN_INTERVAL constant if you’d like to decrease the latency. Be warned though, the SCAN_INTERVAL was set to 180 seconds originally as to not run the risk of hitting any of the Dexcom Share API rate limits. The optimal scan interval lies somewhere between 1 and 300 seconds, I’m just not sure exactly where yet – further investigation over the holiday break.

where do i find this file?

i extracted those components into \config\custom_components\dexcom and edited the file to do every 30 seconds. i see that dexcom allows 60,000 over an hour and that is 16.666667 every second… so i set to 30 seconds. not sure if it is working on the 30 seonds or the 180 still. right now she is not reading so now is not a time to work on it… lol

Ok, i found out i had an error and i got the tag added to the manifest. so far it is better now. I really need to figure out this API stuff so i can pull directly from dexcom on my nod-red. i made my node-red separate from home assistant so i didn’t have to rely on HA being running for the alert system to work. if you ever have a moment, i would like to compare notes and see if i can achive that. thank you.

ok this way did work but what was suggested in discord was too run the homeassistant.update_entity service so i actually have node red running this so that way if dexcom integration gets updates, i don’t have an outdated custome component breaking things because it is old. i am going to sit down and look at this api thing more so though. thank you

Hey Dfgas, how’d you utilize the homeassistant.update_entity service?

I wrote this automation:

alias: Update Glucose Values
description: ''
trigger:
  - platform: time_pattern
    seconds: /30
condition: []
action:
  - service: homeassistant.update_entity
    target:
      entity_id:
        - sensor.dexcom_user_glucose_trend
        - sensor.dexcom_user_glucose_value
mode: single

It fires every 30 seconds correctly, but when watching the glucose values the value doesn’t update every 30 seconds, I know that it’ll only update the actual number every 5 minutes or so but I assumed it’d at least say it was last updated x seconds ago, wondering if somehow I did the service call wrong, though I’d assume it’d give me an error

Looks like it’s updating the value every 5 mins now, so looks like it’s working