I want to receive notification to my phone every morning at 10:00 am asking my if I have taken my pills.
- If I click YES, it says “Bye until tomorrow”
- If I click NO, it reminds me after 1 hour (runs the same automations basically)
I have done all this and is working fine. The only thing I want to add is if I dont click anything, lets says I clear my notificationd and I dont click NO no YES. No input from me. Then I want to run the automations notification again, asking me if I have taken my pills.
Basically NO and “not input” does the same.
I have done this with 2 automations. Here they are:
Automation 1:
alias: "Person: Alex pills reminder"
description: ""
trigger:
- platform: time
at: "10:00:00"
condition: []
action:
- service: notify.mobile_app_alexphone
data:
data:
actions:
- action: take_pills
title: "Yes"
- action: not_taken_pills
title: "No"
message: Don't forget to take your pills. Did you take them already?
title: "Reminder:"
- condition: state
entity_id: sensor.alexphone_wifi_connection
state: AkeNet
- service: notify.alexa_media_polk_react
data:
message: Don't forget to take your pills. Did you take them already?
- service: notify.alexdesktop
data:
message: Don't forget to take your pills. Check your phone!
title: "Reminder:"
mode: single
Automation 2:
alias: "Person: Alex pills reminder response"
description: ""
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: take_pills
id: taken
- platform: event
event_type: mobile_app_notification_action
event_data:
action: not_taken_pills
id: notaken
- platform: time
at: "00:00:00"
id: reset
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: taken
- condition: state
entity_id: input_boolean.pills_taken
enabled: true
state: "off"
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.pills_taken
- service: notify.mobile_app_alexphone
data:
message: Great! See you tomorrow.
- conditions:
- condition: trigger
id: notaken
- condition: state
entity_id: input_boolean.pills_taken
state: "off"
enabled: true
sequence:
- service: notify.mobile_app_alexphone
data:
message: I will give you 1 minute to do it, then remind you again!
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.pills_taken
- service: automation.trigger
data:
skip_condition: true
target:
entity_id: automation.person_alex_pills_reminder
- conditions:
- condition: trigger
id: reset
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.pills_taken
mode: single
My best guess is doing some modification to automation 1 (the trigger automation). Can anyone helps?