Turn off wife's night meds when she gets to work #243
This commit is contained in:
@@ -5587,53 +5587,59 @@
|
|||||||
- id: '1722386174249'
|
- id: '1722386174249'
|
||||||
alias: Tina Meds Cleanup
|
alias: Tina Meds Cleanup
|
||||||
description: Handles the setting/clearing of medication configs for Tina
|
description: Handles the setting/clearing of medication configs for Tina
|
||||||
trigger:
|
triggers:
|
||||||
- platform: state
|
- entity_id:
|
||||||
entity_id:
|
|
||||||
- input_boolean.tina_morning_meds_reminder
|
- input_boolean.tina_morning_meds_reminder
|
||||||
from: 'on'
|
from: 'on'
|
||||||
to: 'off'
|
to: 'off'
|
||||||
id: morning-reminders-off
|
id: morning-reminders-off
|
||||||
alias: Morning reminders off
|
alias: Morning reminders off
|
||||||
|
trigger: state
|
||||||
- alias: Night reminders off
|
- alias: Night reminders off
|
||||||
platform: state
|
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.tina_night_meds_reminder
|
- input_boolean.tina_night_meds_reminder
|
||||||
from: 'on'
|
from: 'on'
|
||||||
to: 'off'
|
to: 'off'
|
||||||
id: night-reminders-off
|
id: night-reminders-off
|
||||||
- platform: event
|
trigger: state
|
||||||
event_type: ios.notification_action_fired
|
- event_type: ios.notification_action_fired
|
||||||
event_data:
|
event_data:
|
||||||
actionName: TINA_MORNING_MEDS_TAKEN
|
actionName: TINA_MORNING_MEDS_TAKEN
|
||||||
id: morning-taken
|
id: morning-taken
|
||||||
alias: Morning taken
|
alias: Morning taken
|
||||||
|
trigger: event
|
||||||
- alias: Night taken
|
- alias: Night taken
|
||||||
platform: event
|
|
||||||
event_type: ios.notification_action_fired
|
event_type: ios.notification_action_fired
|
||||||
event_data:
|
event_data:
|
||||||
actionName: TINA_NIGHT_MEDS_TAKEN
|
actionName: TINA_NIGHT_MEDS_TAKEN
|
||||||
id: night-taken
|
id: night-taken
|
||||||
|
trigger: event
|
||||||
- alias: Morning skipped
|
- alias: Morning skipped
|
||||||
platform: event
|
|
||||||
event_type: ios.notification_action_fired
|
event_type: ios.notification_action_fired
|
||||||
event_data:
|
event_data:
|
||||||
actionName: TINA_MORNING_MEDS_SKIPPED
|
actionName: TINA_MORNING_MEDS_SKIPPED
|
||||||
id: morning-skipped
|
id: morning-skipped
|
||||||
|
trigger: event
|
||||||
- alias: Night skipped
|
- alias: Night skipped
|
||||||
platform: event
|
|
||||||
event_type: ios.notification_action_fired
|
event_type: ios.notification_action_fired
|
||||||
event_data:
|
event_data:
|
||||||
actionName: TINA_NIGHT_MEDS_SKIPPED
|
actionName: TINA_NIGHT_MEDS_SKIPPED
|
||||||
id: night-skipped
|
id: night-skipped
|
||||||
- platform: state
|
trigger: event
|
||||||
entity_id:
|
- entity_id:
|
||||||
- person.christina_stork
|
- person.christina_stork
|
||||||
from: home
|
from: home
|
||||||
id: left
|
id: left
|
||||||
alias: Left
|
alias: Left
|
||||||
condition: []
|
trigger: state
|
||||||
action:
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- person.christina_stork
|
||||||
|
to: Bob Evans
|
||||||
|
id: at-work
|
||||||
|
alias: At Work
|
||||||
|
conditions: []
|
||||||
|
actions:
|
||||||
- alias: Routing
|
- alias: Routing
|
||||||
choose:
|
choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@@ -5642,19 +5648,19 @@
|
|||||||
- morning-reminders-off
|
- morning-reminders-off
|
||||||
alias: Morning Reminders Off
|
alias: Morning Reminders Off
|
||||||
sequence:
|
sequence:
|
||||||
- service: counter.reset
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: counter.tina_morning_meds_reminder_count
|
entity_id: counter.tina_morning_meds_reminder_count
|
||||||
alias: Reset morning reminder count
|
alias: Reset morning reminder count
|
||||||
- service: script.text_notify
|
action: counter.reset
|
||||||
data:
|
- data:
|
||||||
type: alert
|
type: alert
|
||||||
who: tina
|
who: tina
|
||||||
message: clear_notification
|
message: clear_notification
|
||||||
tag: tina-morning-meds
|
tag: tina-morning-meds
|
||||||
alias: Clear morning notification
|
alias: Clear morning notification
|
||||||
|
action: script.text_notify
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
@@ -5662,66 +5668,66 @@
|
|||||||
alias: Night reminders off
|
alias: Night reminders off
|
||||||
sequence:
|
sequence:
|
||||||
- alias: Reset night reminder count
|
- alias: Reset night reminder count
|
||||||
service: counter.reset
|
|
||||||
metadata: {}
|
metadata: {}
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: counter.tina_night_meds_reminder_count
|
entity_id: counter.tina_night_meds_reminder_count
|
||||||
- service: script.text_notify
|
action: counter.reset
|
||||||
data:
|
- data:
|
||||||
type: alert
|
type: alert
|
||||||
who: tina
|
who: tina
|
||||||
message: clear_notification
|
message: clear_notification
|
||||||
tag: tina-night-meds
|
tag: tina-night-meds
|
||||||
alias: Clear night notification
|
alias: Clear night notification
|
||||||
|
action: script.text_notify
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
- morning-taken
|
- morning-taken
|
||||||
alias: Morning taken
|
alias: Morning taken
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_on
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tina_morning_meds_taken
|
entity_id: input_boolean.tina_morning_meds_taken
|
||||||
alias: Turn on morning meds taken
|
alias: Turn on morning meds taken
|
||||||
|
action: input_boolean.turn_on
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
- night-taken
|
- night-taken
|
||||||
alias: Night taken
|
alias: Night taken
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_on
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tina_night_meds_taken
|
entity_id: input_boolean.tina_night_meds_taken
|
||||||
alias: Turn on night meds taken
|
alias: Turn on night meds taken
|
||||||
|
action: input_boolean.turn_on
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
- morning-skipped
|
- morning-skipped
|
||||||
alias: Morning skipped
|
alias: Morning skipped
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_off
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tina_morning_meds_reminder
|
entity_id: input_boolean.tina_morning_meds_reminder
|
||||||
alias: Deactivate morning reminders
|
alias: Deactivate morning reminders
|
||||||
|
action: input_boolean.turn_off
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
- night-skipped
|
- night-skipped
|
||||||
alias: Night skipped
|
alias: Night skipped
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_off
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tina_night_meds_reminder
|
entity_id: input_boolean.tina_night_meds_reminder
|
||||||
alias: Deactivate night reminders
|
alias: Deactivate night reminders
|
||||||
|
action: input_boolean.turn_off
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
@@ -5743,7 +5749,6 @@
|
|||||||
alias: Night meds reminder active
|
alias: Night meds reminder active
|
||||||
then:
|
then:
|
||||||
- alias: Send critical TTS notification
|
- alias: Send critical TTS notification
|
||||||
service: script.text_notify
|
|
||||||
metadata: {}
|
metadata: {}
|
||||||
data:
|
data:
|
||||||
type: critical
|
type: critical
|
||||||
@@ -5751,6 +5756,19 @@
|
|||||||
title: HEY DUMBASS
|
title: HEY DUMBASS
|
||||||
message: YOU FORGOT TO TAKE YOUR MEDS!!!!!
|
message: YOU FORGOT TO TAKE YOUR MEDS!!!!!
|
||||||
tag: tina-left-meds
|
tag: tina-left-meds
|
||||||
|
action: script.text_notify
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- at-work
|
||||||
|
alias: At Work
|
||||||
|
sequence:
|
||||||
|
- action: input_boolean.turn_off
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.tina_night_meds_taken
|
||||||
|
alias: Turn off Night Meds Taken
|
||||||
mode: queued
|
mode: queued
|
||||||
max: 10
|
max: 10
|
||||||
- id: '1722387020007'
|
- id: '1722387020007'
|
||||||
|
Reference in New Issue
Block a user