On one of my medication container (one of those 7 day containers), I've got a contact sensor; the other side of it sits inside my fridge (I used to have a med that needed refrigerated, I don't any longer but I haven't moved the container! ) ... when the contact sensor is "open" it marks that task/automation as complete. Is your integration one that could recognize these "outside acknowledgments" (read: the sensor being open), or should I keep using what I have?
Yes, this is right up its alley, and you can drop the separate task.
Each dose in the integration is just a switch.<patient>_<time> entity, and "given" = that switch turning on. So point your existing contact-sensor automation at the dose's switch instead of a task:
trigger:
- platform: state
entity_id: binary_sensor.your_pill_container # the contact sensor
to: "on" # "open"
action:
- action: medication_reminder.mark_given
target:
entity_id: switch.kaupo_6_00_am_... # the dose for that container
data:
given_at: "{{ now() }}"
(switch.turn_on on that entity works too; mark_given just also lets you stamp the actual taken-time, which is handy with a physical sensor.)
The upside over a plain task: marking it given through the integration also clears the reminder/nag notification, decrements that med's supply count, updates the "last taken" time, and feeds the over-dose guard, none of which a standalone task does. And any external "ack" works the same way, so contact sensors, NFC tags, buttons, even a scale, all just turn the switch on.
One thing to map out: if that container holds more than one dose a day, have the automation pick which dose the "open" belongs to (e.g. target the switch whose dose_time is closest to now). For one dose a day it's a clean one-to-one.
So yeah, I'd switch over, you'll get more out of it than the task.
** Update **
The README now has the "Marking a dose from a sensor, NFC tag, or button" snippet in the contract section, so the "outside acknowledgment" answer is documented for the forum and future users.
button.<patient>_<med>_refill - a one-tap restock, instead of editing the number by hand. By default it sets the supply to its configured refill amount; turn on Add on refill (package refill) for that supply to instead add the refill amount to what is left (e.g. 17 + 30 = 47), capped at the max. It fires a medication_reminder_supply_refill event that the supply number listens for.
Regarding this feature, where/how do you "turn on Add on refill"?
You turn it on per supply, in the same form where you set the supply up:
Settings → Devices & Services → Medication Reminder → Configure → Supplies, then either Track a supply (for a new one) or Edit a supply (for one you already track).
On that supply's details form there's a checkbox "Add on refill (package refill)". Leave it unchecked and the refill button sets the count to the configured refill amount (the default); check it and the button instead adds the refill amount to whatever is left (e.g. 17 + 30 = 47), capped at the max.
It's per supply, so you can mix modes: set-to-amount for one med, add-a-package for another. (Edit a supply was added in 0.24.0, so make sure you're on that or later to change it after the fact.)
Small update: Medication Reminder is now in the default HACS store
For anyone still following this one: the integration got merged into the default
HACS repo today, so it’s no longer a custom-repository install. Open HACS, search
“Medication Reminder”, install, restart, done. If you added it as a custom repo
earlier, nothing changes for you, HACS just tracks it normally from here.
It sat in the review queue a while, and Frenck merged it in the end (and caught a
small manifest thing that I fixed the same day in 0.28.1).
Honestly, a big chunk of what this does came straight out of this thread. The
as-needed/PRN handling, the overdose guard, the supply and refill tracking, the
extra schedule types, the multi-language support, all of it started as someone
here asking “can it also…”. So thank you, genuinely. Keep the requests coming.
Where it’s at now, in case you set it up early and haven’t looked since:
Add patients and dose schedules in the UI, no YAML. Pets and people.
Nagging reminders with missed-dose escalation, routed per patient.
Supply, refill, and cost tracking, with fractional doses (half a pill and such).
As-needed (PRN) meds with a minimum-interval / daily-cap overdose warning.
Separate caregiver and admin dashboards.
German, Dutch, and French translations (community-contributed).
Thanks Tadies, means a lot coming from you. A good chunk of the supply and
scheduling side started from your pill-counter setup and your nudges early on,
so you’ve got fingerprints all over this thing. Glad the half-doses and the
translations are landing well, and that it’s running clean for you with no
errors.
One thing worth a peek since you track supplies: 0.29.0 now shows a dose’s
amount right on the dashboard, so a half-pill day reads as “Marcoumar ½”
instead of looking identical to a full one. Just re-copy your dashboard to
pick it up.