marciogranzotto / addon-nightscout

Home Assistant Add-On for Nightscout
GNU General Public License v3.0
13 stars 18 forks source link

Help comparing sensor date from Nightscout to use as an automation (stale data/reading detection) #23

Open andypituch opened 4 months ago

andypituch commented 4 months ago

Hi!

I have created several automations to control a smart bulb to show a different color based on the BGL value... I have low, high and in-range with no issues (once I got the hang of some triggers in Home Assistant... I'm a noob)

I would like to make a automation to change the smart bulb to a different color (yellow) if the date/data reading from NS is over 60 minutes/1 hour old. I see the DATE attribute has the last reading timestamp... how can I create a trigger that compares that date (NS date versus current timestamp)?