@ -7,9 +7,15 @@ input_boolean:
|
||||
work_today_extended:
|
||||
name: Work Today Extended
|
||||
icon: mdi:briefcase-plus
|
||||
tina_morning_meds_reminder:
|
||||
name: Tina Morning Meds Reminder
|
||||
icon: mdi:medication
|
||||
tina_morning_meds_taken:
|
||||
name: Tina Morning Meds Taken
|
||||
icon: mdi:medication
|
||||
tina_night_meds_reminder:
|
||||
name: Tina Night Meds Reminder
|
||||
icon: mdi:medication
|
||||
tina_night_meds_taken:
|
||||
name: Tina Night Meds Taken
|
||||
icon: mdi:medication
|
||||
@ -35,7 +41,7 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tina_morning_meds_notify:
|
||||
name: Tina Morning Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
tina_night_meds_taken:
|
||||
@ -45,7 +51,7 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tina_night_meds_notify:
|
||||
name: Tina Night Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
|
||||
@ -191,165 +197,3 @@ script:
|
||||
- service: script.master_bedroom_scheduling_evening
|
||||
- service: script.emma_bedroom_scheduling_evening
|
||||
- service: script.security_scheduling
|
||||
|
||||
tina_morning_meds:
|
||||
alias: 'Tina Morning Meds'
|
||||
icon: mdi:medication
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: tina
|
||||
type: alert
|
||||
title: Morning Meds
|
||||
message: You need to take your morning meds
|
||||
tag: tina-morning-meds
|
||||
actions:
|
||||
- action: "TINA_MORNING_MEDS_TAKEN"
|
||||
title: Taken
|
||||
- action: "TINA_MORNING_MEDS_SKIPPED"
|
||||
title: Skip
|
||||
- action: "TINA_MORNING_MEDS_ASK_LATER"
|
||||
title: Ask Later
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_MORNING_MEDS_TAKEN"
|
||||
id: taken
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_MORNING_MEDS_SKIPPED"
|
||||
id: skipped
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_MORNING_MEDS_ASK_LATER"
|
||||
id: ask-later
|
||||
- platform: state
|
||||
entity_id: person.christina_stork
|
||||
from: 'home'
|
||||
id: left
|
||||
- platform: state
|
||||
entity_id: input_boolean.tina_morning_meds_taken
|
||||
to: 'on'
|
||||
id: manual
|
||||
timeout: "00:30:00"
|
||||
continue_on_timeout: true
|
||||
- choose:
|
||||
- conditions: "{{ wait.trigger.id in ['taken','manual'] }}"
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.tina_morning_meds_taken
|
||||
- conditions: "{{ wait.trigger.id == 'ask-later' }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_morning_meds_notify
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import set_datetime %}
|
||||
{{ set_datetime(0,30) }}
|
||||
- conditions: "{{ wait.trigger.id == 'left' }}"
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: tina
|
||||
type: alert
|
||||
title: HEY DUMBASS
|
||||
message: YOU FORGOT TO TAKE YOUR MORNING MEDS!!!!!
|
||||
- conditions: "{{ wait.trigger == 'none' or wait.trigger.idx is undefined }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_morning_meds_notify
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import set_datetime %}
|
||||
{{ set_datetime(0,1) }}
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: tina
|
||||
message: clear_notification
|
||||
tag: tina-morning-meds
|
||||
|
||||
tina_night_meds:
|
||||
alias: 'Tina Night Meds'
|
||||
icon: mdi:medication
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: tina
|
||||
type: alert
|
||||
title: Night Meds
|
||||
message: You need to take your night meds
|
||||
tag: tina-night-meds
|
||||
actions:
|
||||
- action: "TINA_NIGHT_MEDS_TAKEN"
|
||||
title: Taken
|
||||
- action: "TINA_NIGHT_MEDS_SKIPPED"
|
||||
title: Skip
|
||||
- action: "TINA_NIGHT_MEDS_ASK_LATER"
|
||||
title: Ask Later
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_NIGHT_MEDS_TAKEN"
|
||||
id: taken
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_NIGHT_MEDS_SKIPPED"
|
||||
id: skipped
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_NIGHT_MEDS_ASK_LATER"
|
||||
id: ask-later
|
||||
- platform: state
|
||||
entity_id: input_boolean.tina_night_meds_taken
|
||||
to: 'on'
|
||||
id: manual
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.master_bedroom_sleeping
|
||||
- input_boolean.goodnight
|
||||
to: 'on'
|
||||
id: sleeping
|
||||
timeout: "00:30:00"
|
||||
continue_on_timeout: true
|
||||
- choose:
|
||||
- conditions: "{{ wait.trigger.id in ['taken','manual'] }}"
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.tina_night_meds_taken
|
||||
- conditions: "{{ wait.trigger.id == 'ask-later' }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_night_meds_notify
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import set_datetime %}
|
||||
{{ set_datetime(0,30) }}
|
||||
- conditions: "{{ wait.trigger == 'none' or wait.trigger.idx is undefined }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_night_meds_notify
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import set_datetime %}
|
||||
{{ set_datetime(0,1) }}
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: tina
|
||||
message: clear_notification
|
||||
tag: tina-night-meds
|
Reference in New Issue
Block a user