Snort Coke Reminder - Repeating Alert until NFC Tag Scanned

This is close… but doesn’t involve NFC tags:

Lets say for example, I have a bag of coke on my coffee table, and I want to set an alert starting at 7:00 am everyday to do the first line of coke, and that reminder goes off every hour. UNLESS I have scanned an NFC tag sitting by the coke that acknowledges that I have in fact done the first line, then the automation/alert is stopped. I see how to do this with states, but not NFC scans.

While time > 7:00am AND NFC tag not scanned
notify.notfy
sleep 60
wend

Restart every day.

I think I’m supposed to use a template, set it to 1 if the NFC tag is scanned. If not, it stays 0, and the alert IF = 0 then send reminders to snort coke.

Is there a way to do it with a simple NFC tag, and one automation or am I making this way too complex?

Maybe its not coke, maybe just to help me remember to give grandma her meds. :slight_smile:

Additional searching took me to this blueprint, I think this is what I needed.

Check if regular action was performed (NFC, webhook confirmation) - Blueprints Exchange - Home Assistant Community (home-assistant.io)

Well, we’re almost there, this doesn’t do it.

If I snort the coke, and scan the NFC tag, then no alert happens.
If I don’t snort the coke, and don’t scan the NFC tag, then the alert happens… once.

A repeating alert on this blueprint sends the alert regardless of NFC scan status.

How can I get alerts until coke snorted?

I can contribute exactly zero to the solution of your problem, but I really like your “thinking in images”. That’s all. :+1:

2 Likes

Pretty sure you can look at time since state change for nfc scan and use that as condition to determine if coke recently snorted

Current time minus last time scanned > xx

With a time condition, or how do I reference the helper?

set up an automation to flip on an input boolean at 7.

Set another automation to flip it off when the card is scanned

Third automation sounds the reminder on the hour as long as the input boolean is on.

I offer no input of importance…

What I really want to know is why aren’t you using the nfc card to cut your coke line on top of the sensor!

Or a nfc straw

2 Likes

I like where your heads at, I’ll give that a run next.

This sounds simple, which I like. I’ll test. The “Done Checker” blueprint is close, but using notifications build into HA which I’m not looking at daily. I’ll post back when I succeed with this. Seems like a lot of automations though for one job. Hard to manage down the road?

Can you give an example of how this would work? I’m not being successful. I can get repeat to work, but it sends them all at once. Or a delay send them regardless of boolean being on.

not an expert, the trigger is time, conditions is input_boolean = true

see here for trigger: Automation Trigger - Home Assistant

consider this pseudocode:

alias: hourly "medicine" reminder
description: ''
trigger:
  - platform: time_pattern
    minutes: "0"
condition:
  - condition: state
    entity_id: input_boolean.took_medicine
    state: "off"
action:
   # Replace google_translate_say with <platform>_say when you use a different platform.
  - service: tts.google_translate_say
    data:
      entity_id: all
      message: "Don't forget to take your medicine"