Initial notification framework for meds rework
This commit is contained in:
@ -64,17 +64,17 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_morning_meds_notify:
|
tony_morning_meds_notify:
|
||||||
name: Tony Morning Meds Notify
|
name: Tony Morning Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_afternoon_meds_notify:
|
tony_afternoon_meds_notify:
|
||||||
name: Tony Afternoon Meds Notify
|
name: Tony Afternoon Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_night_meds_notify:
|
tony_night_meds_notify:
|
||||||
name: Tony Night Meds Notify
|
name: Tony Night Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_custom_meds_taken_p1:
|
tony_custom_meds_taken_p1:
|
||||||
@ -84,7 +84,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_custom_meds_notify_p1:
|
tony_custom_meds_notify_p1:
|
||||||
name: Tony Custom Meds Notify P1
|
name: Tony Custom Meds Notify P1
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_custom_meds_taken_p2:
|
tony_custom_meds_taken_p2:
|
||||||
@ -94,7 +94,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_custom_meds_notify_p2:
|
tony_custom_meds_notify_p2:
|
||||||
name: Tony Custom Meds Notify P2
|
name: Tony Custom Meds Notify P2
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_ibuprofen_taken:
|
tony_ibuprofen_taken:
|
||||||
@ -104,7 +104,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_ibuprofen_notify:
|
tony_ibuprofen_notify:
|
||||||
name: Tony Ibuprofen Notify
|
name: Tony Ibuprofen Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_tylenol_taken:
|
tony_tylenol_taken:
|
||||||
@ -114,7 +114,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_tylenol_notify:
|
tony_tylenol_notify:
|
||||||
name: Tony Tylenol Notify
|
name: Tony Tylenol Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
|
|
||||||
@ -179,3 +179,33 @@ sensor:
|
|||||||
- project
|
- project
|
||||||
- items
|
- items
|
||||||
scan_interval: 30
|
scan_interval: 30
|
||||||
|
|
||||||
|
template:
|
||||||
|
- binary_sensor:
|
||||||
|
- name: Tony Morning Meds Needed
|
||||||
|
unique_id: 32f2f158-8c59-486e-bf85-f14909375ff7
|
||||||
|
state: >
|
||||||
|
{% set ct = as_timestamp(now()) %}
|
||||||
|
{% set notify = state_attr('input_datetime.tony_morning_meds_notify','timestamp') %}
|
||||||
|
{{ (ct >= notify) and is_state('input_boolean.tony_morning_meds_taken','off') }}
|
||||||
|
attributes:
|
||||||
|
reminder_time: "{{ states('input_datetime.tony_morning_meds_notify') }}"
|
||||||
|
icon: mdi:medication
|
||||||
|
- name: Tony Afternoon Meds Needed
|
||||||
|
unique_id: 32f2f158-8c59-486e-bf85-f14909375ff7
|
||||||
|
state: >
|
||||||
|
{% set ct = as_timestamp(now()) %}
|
||||||
|
{% set notify = state_attr('input_datetime.tony_afternoon_meds_notify','timestamp') %}
|
||||||
|
{{ (ct >= notify) and is_state('input_boolean.tony_afternoon_meds_taken','off') }}
|
||||||
|
attributes:
|
||||||
|
reminder_time: "{{ states('input_datetime.tony_afternoon_meds_notify') }}"
|
||||||
|
icon: mdi:medication
|
||||||
|
- name: Tony Night Meds Needed
|
||||||
|
unique_id: 32f2f158-8c59-486e-bf85-f14909375ff7
|
||||||
|
state: >
|
||||||
|
{% set ct = as_timestamp(now()) %}
|
||||||
|
{% set notify = state_attr('input_datetime.tony_night_meds_notify','timestamp') %}
|
||||||
|
{{ (ct >= notify) and is_state('input_boolean.tony_night_meds_taken','off') }}
|
||||||
|
attributes:
|
||||||
|
reminder_time: "{{ states('input_datetime.tony_night_meds_notify') }}"
|
||||||
|
icon: mdi:medication
|
||||||
|
Reference in New Issue
Block a user