Be more annoying about making sure I take my meds. Also, #184

This commit is contained in:
2023-12-18 19:09:10 -05:00
parent a9d7c38c28
commit d03c7b1283
2 changed files with 68 additions and 28 deletions

View File

@ -2540,6 +2540,11 @@
state: 'off' state: 'off'
alias: Morning Notify alias: Morning Notify
sequence: sequence:
- service: counter.increment
target:
entity_id: counter.tony_morning_meds_reminder_count
data: {}
alias: Increment counter
- service: script.turn_on - service: script.turn_on
target: target:
entity_id: script.tony_morning_meds entity_id: script.tony_morning_meds
@ -2556,6 +2561,11 @@
entity_id: input_boolean.tony_afternoon_meds_taken entity_id: input_boolean.tony_afternoon_meds_taken
state: 'off' state: 'off'
sequence: sequence:
- service: counter.increment
target:
entity_id: counter.tony_afternoon_meds_reminder_count
data: {}
alias: Increment counter
- service: script.tony_afternoon_meds - service: script.tony_afternoon_meds
data: {} data: {}
alias: Run afternoon meds script alias: Run afternoon meds script
@ -2795,6 +2805,12 @@
- input_boolean.tina_morning_meds_taken - input_boolean.tina_morning_meds_taken
- input_boolean.tony_afternoon_meds_taken - input_boolean.tony_afternoon_meds_taken
data: {} data: {}
- service: counter.reset
target:
entity_id:
- counter.tony_morning_meds_reminder_count
- counter.tony_afternoon_meds_reminder_count
data: {}
- conditions: - conditions:
- condition: trigger - condition: trigger
id: 6am id: 6am

View File

@ -1871,20 +1871,32 @@ tony_morning_meds:
icon: mdi:medication icon: mdi:medication
mode: restart mode: restart
sequence: sequence:
- service: script.text_notify - parallel:
data: - if:
who: tony - condition: numeric_state
type: alert entity_id: counter.tony_morning_meds_reminder_count
title: Morning Meds above: 2
message: You need to take your morning meds then:
tag: tony-morning-meds - service: script.speech_engine
actions: data:
- action: TONY_MORNING_MEDS_TAKEN who: common_areas
title: Taken type: alert
- action: TONY_MORNING_MEDS_SKIPPED message: Tony, you need to take your morning meds. This is reminder number
title: Skip {{ states('counter.tony_morning_meds_reminder_count') }} for today.
- action: TONY_MORNING_MEDS_ASK_LATER - service: script.text_notify
title: Ask Later data:
who: tony
type: alert
title: Morning Meds
message: You need to take your morning meds
tag: tony-morning-meds
actions:
- action: TONY_MORNING_MEDS_TAKEN
title: Taken
- action: TONY_MORNING_MEDS_SKIPPED
title: Skip
- action: TONY_MORNING_MEDS_ASK_LATER
title: Ask Later
- wait_for_trigger: - wait_for_trigger:
- platform: event - platform: event
event_type: ios.notification_action_fired event_type: ios.notification_action_fired
@ -2217,20 +2229,32 @@ tony_custom_meds:
tony_afternoon_meds: tony_afternoon_meds:
alias: Tony Afternoon Meds alias: Tony Afternoon Meds
sequence: sequence:
- service: script.text_notify - parallel:
data: - if:
who: tony - condition: numeric_state
type: alert entity_id: counter.tony_afternoon_meds_reminder_count
title: Afternoon Meds above: 2
message: You need to take your afternoon meds then:
tag: tony-afternoon-meds - service: script.speech_engine
actions: data:
- action: TONY_AFTERNOON_MEDS_TAKEN who: common_areas
title: Taken type: alert
- action: TONY_AFTERNOON_MEDS_SKIPPED message: Tony, you need to take your afternoon meds. This is reminder number
title: Skip {{ states('counter.tony_afternoon_meds_reminder_count') }} for today.
- action: TONY_AFTERNOON_MEDS_ASK_LATER - service: script.text_notify
title: Ask Later data:
who: tony
type: alert
title: Afternoon Meds
message: You need to take your afternoon meds
tag: tony-afternoon-meds
actions:
- action: TONY_AFTERNOON_MEDS_TAKEN
title: Taken
- action: TONY_AFTERNOON_MEDS_SKIPPED
title: Skip
- action: TONY_AFTERNOON_MEDS_ASK_LATER
title: Ask Later
- wait_for_trigger: - wait_for_trigger:
- alias: Taken - alias: Taken
platform: event platform: event