I have a Dexcom G6 sensor setup in Home Assistant. Everything work fine, but I can’t get an automation to trigger. Is there something I am doing wrong?
I have a lot of other automations working.
Automation is this:
- id: '1663771038673'
alias: Ny automasjon 22
description: RedAlert when BS is under 190
trigger:
- platform: numeric_state
below: '190'
entity_id: sensor.dexcom_myname_glucose_value
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.boda_redalert
metadata: {}
- service: media_player.play_media
target:
entity_id: media_player.garasje
data:
media_content_id: media-source://media_source/local/TNG - Red Alert.mp3
media_content_type: audio/mpeg
metadata:
title: TNG - Red Alert.mp3
thumbnail:
media_class: music
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
- service: notify.pushover
data:
title: RedAlert
message: Wii Wii Wii
mode: single
That will only trigger when the sensor value changes from above 190 to below 190. If you start up and it’s already below 190, nothing will happen. We can add code to work around that if needed.
Does the action work as expected if you execute the automation manually from Settings / Automations?
Can you post a screenshot of the state page for that sensor? Like this, but for your BS sensor (redacting the myname bit if necessary):
Make sure you have the right sensor in the trigger for the value, then. Like I said, the automation will only trigger when the state changes from above to below the threshold. You could do this, to also check when HA is started or automations are reloaded — note the added condition:
Did you find a solution to this?
My daughter of 20 months was diagnosed with Type 1, and we want to get her on a Dexcom (like my wife has)
I want to be able to setup a trigger than when her sugar drops below 4, it want it to alert the Google hub in our bedroom. To wake us up.
I’ve been doing some early stage testing with my wife’s sensor. But I can only get it to send a TTS when I first run the automation.
If you happened to get yours working. I’d love to see it.