Quite proud of my efforts! Inspired by my recent bout of ‘Man Flu’ and guzzling paracetamol like they are sweets (however not wanting to take more than the recommended dosage), I managed to Vibe Code a card that essentially logs items. My use case is taking medication and knowing the time that this was taken.
I have also added some NFC stickers to my medicine cabinet. With an automation, I can simply scan the relevant tag and it logs when (whoe evers phone scanned the item) it was taken.
I have also integrated it with my refuse/recycling/garden waste bins too (and plant watering). Again - NFC on each bin. I have systems in place that provides notifications for which bin needs to go out etc. Scanning the NFC on the bin both Logs the Item to my Logger card, and removes the ‘bins out’ persistent notification.
Not planning on releasing this or anything, but I guess I could provide the code if anyone wants it.
Here is an example automation too:
alias: "NFC Log: Bin Taken Out"
triggers:
- tag_id: recycling bin
trigger: tag
- tag_id: refuse bin
trigger: tag
- tag_id: garden bin
trigger: tag
conditions: []
actions:
- target:
entity_id: input_boolean.bin_notification
action: input_boolean.turn_off
data: {}
- data:
name: Home
entity_id: sensor.logger_data
domain: logger_card
message: >
{% set scanners = {
"YOUR_DEVICE_ID": "Martin (tag)",
"YOUR_DEVICE_ID": "Clare (tag)",
"YOUR_DEVICE_ID": "E (tag)"
} %} {% set person = scanners.get(trigger.event.data.device_id,
"Someone") %} [{{ person }}] {{ trigger.event.data.tag_id | capitalize
}} out
action: logbook.log
