- id: '1739887169144'
alias: 'Notify: Medication Reminder'
description: ''
triggers:
- trigger: state
entity_id:
- schedule.medicine_reminder
from: 'off'
to: 'on'
conditions: []
actions:
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.medicine_taken
- repeat:
sequence:
- action: notify.mobile_app_pixel_7_pro
metadata: {}
data:
data:
media_stream: alarm_stream
command: 20
message: command_volume_level
- action: notify.mobile_app_pixel_7_pro
metadata: {}
data:
message: command_activity
data:
ttl: 0
priority: high
intent_action: android.intent.action.SET_TIMER
intent_extras: android.intent.extra.alarm.LENGTH:1, android.intent.extra.alarm.MESSAGE:"Take
Medicine!", android.intent.extra.alarm.SKIP_UI:true
- wait_for_trigger:
- trigger: tag
tag_id: 5df539c9-9c73-4eaa-82be-3b94bd1be7a6
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- if:
- condition: template
value_template: '{{ wait.trigger.id == ''TagScanned'' }}'
then:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.medicine_taken
while:
- condition: state
entity_id: input_boolean.medicine_taken
state: 'on'
mode: single
I’m trying to run the above code based on a reddit post ( Custom Nagging medication reminder : r/homeassistant).
When the automation runs I get a timer displaying on my phone but I also get an accompanying system message stating:
“Please open the Home Assistant app and send the command again in order to grant the proper permissions…”
However, when I open the app, no request appears. I’ve granted the app all the permissions available (as far as I can see) but with no success.
Just to note the alarm timer on the phone doesn’t display the message “Take Medicine!” so I’m not sure that this is what’s triggering the message.
Any ideas what I might be doing wrong?
Thanks
Dave