Closed ezfrag2021 closed 2 years ago
Hello, can you send me the yaml of your blueprint's automation ?
alias: 'Medication Reminder - Gabapentin '
description: ''
use_blueprint:
path: Aohzan/medication_reminder.yaml
input:
notify_device: cb53524615982a509299ae5399dd9467
input_boolean: input_boolean.gabapentin_reminder
notification_message: It's time to give Rex his Gabapentin
ask_later_wait_time: 10
optional_action:
- service: notify.mobile_app_ezfrag_iphone
data:
message: Test
reminder_time1: '08:00:00'
reminder_time2: '19:00:00'
reminder_time3: null
notification_title: Gabapentin reminder!
How did you get the three reminder_time ?
That's a good question. I can't remember completely. At the beginning my dog was on three medications per day so I needed to have three and now he is down to two per day.
I guess I edited the blueprint? Not sure. Maybe that explains it... I guess I broke it somehow?
do you have the last blueprint version ? normally, you should have just reminder_time
and you have to call the blueprint for each time, like Medication Reminder - Gabapentin Morning
and Medication Reminder - Gabapentin Evening
Ah that makes sense! Sorry it was the first time that I ever used a blueprint and I didn't realise it would create an automation. I thought it would be more like an integration and there could only be one instance.
I will start from the beginning and make one for each and see if that fixes the problem. Thanks for your help, I will report back to let you know what happens.
I deleted the existing automation and the blueprint from Home Assistant and imported the original blueprint using the button at this link: https://community.home-assistant.io/t/advanced-medication-reminder/300137
I then created a new automation to trigger at 8am, put in the input boolean details and set it up without any changes. Since it is now past 8am where I live I triggered the automation manually, the notification appeared on my phone, I did a long press and chose "taken" and then nothing happened.
The automation is still waiting for an input and I guess it will timeout and clear the notification. Nothing shows in the logbook either. It looks like the notification event is never triggered. The input boolean is still off.
Firstly, thank you for writing this blueprint. I love it.
I am experiencing a slight issue when using it and I am hoping you can help. The automation works fine but I cannot respond to the event notifications. No matter what option I choose for the notification (taken, skip, delay) there is an error in the log during the choose condition and the automation defaults to dismissing the notification.
I have set-up a button to manually set the input boolean to "on" and mark the medication as taken but it would be nice to use the event notifications that you included.
The error is: Error: In 'template' condition: UndefinedError: 'None' has no attribute 'event'
Here is a screenshot of the automation timeline showing the error: