Be more annoying about making sure I take my meds. Also, #184
This commit is contained in:
@ -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
|
||||||
|
24
scripts.yaml
24
scripts.yaml
@ -1871,6 +1871,18 @@ tony_morning_meds:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
mode: restart
|
mode: restart
|
||||||
sequence:
|
sequence:
|
||||||
|
- parallel:
|
||||||
|
- if:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: counter.tony_morning_meds_reminder_count
|
||||||
|
above: 2
|
||||||
|
then:
|
||||||
|
- service: script.speech_engine
|
||||||
|
data:
|
||||||
|
who: common_areas
|
||||||
|
type: alert
|
||||||
|
message: Tony, you need to take your morning meds. This is reminder number
|
||||||
|
{{ states('counter.tony_morning_meds_reminder_count') }} for today.
|
||||||
- service: script.text_notify
|
- service: script.text_notify
|
||||||
data:
|
data:
|
||||||
who: tony
|
who: tony
|
||||||
@ -2217,6 +2229,18 @@ tony_custom_meds:
|
|||||||
tony_afternoon_meds:
|
tony_afternoon_meds:
|
||||||
alias: Tony Afternoon Meds
|
alias: Tony Afternoon Meds
|
||||||
sequence:
|
sequence:
|
||||||
|
- parallel:
|
||||||
|
- if:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: counter.tony_afternoon_meds_reminder_count
|
||||||
|
above: 2
|
||||||
|
then:
|
||||||
|
- service: script.speech_engine
|
||||||
|
data:
|
||||||
|
who: common_areas
|
||||||
|
type: alert
|
||||||
|
message: Tony, you need to take your afternoon meds. This is reminder number
|
||||||
|
{{ states('counter.tony_afternoon_meds_reminder_count') }} for today.
|
||||||
- service: script.text_notify
|
- service: script.text_notify
|
||||||
data:
|
data:
|
||||||
who: tony
|
who: tony
|
||||||
|
Reference in New Issue
Block a user