I have the following automation. Basically, I’m looking to ONLY send an alert at 8am if the latest data available on my oura sensor doesn’t match yesterdays date. I’m using this to remind myself to run the required sync.
The template returns True or False as expected when checked in Template editor (if the strings are the same it’s False, if they’re different it’s True) however the automation always executes.
What am I doing wrong? I’ve spent ages trying to get this logic to work, seems like a simple thing but I just can’t get it to do what I want it to do.
alias: Notify - Oura Download Delay - Tom (Test)
description: ''
trigger:
- platform: time
at: '08:00'
condition:
- condition: template
value_template: >-
{{ states('sensor.tom_s_oura_latest_data') != states('sensor.date_yesterday') }}
action:
- service: notify.mobile_app_tom_s_phone
data:
message: Looks like ring data hasn't been downloaded for today. Time for a sync!
title: 💍 Oura alert!
data:
actions:
- action: URI
title: Open Oura
uri: app://com.ouraring.oura
mode: single