Tweak my med report to clean it up a bit in text form
This commit is contained in:
@@ -44,19 +44,21 @@
|
|||||||
{% macro tony_morning_meds(method) %}
|
{% macro tony_morning_meds(method) %}
|
||||||
{% from 'time.jinja' import input_datetime_12hr, input_datetime_12hr_with_date, ct %}
|
{% from 'time.jinja' import input_datetime_12hr, input_datetime_12hr_with_date, ct %}
|
||||||
{% set ct = ct() | int %}
|
{% set ct = ct() | int %}
|
||||||
{% if is_state('input_boolean.tony_morning_meds_taken','on') %}
|
{% if is_state('binary_sensor.overnight','off') %}
|
||||||
Tony took his morning meds at {{ input_datetime_12hr_with_date('input_datetime.tony_morning_meds_taken') }} today.
|
{% if is_state('input_boolean.tony_morning_meds_taken','on') %}
|
||||||
{% elif is_state('input_boolean.tony_morning_meds_taken','off') and ct >= 21600 %}
|
Tony took his morning meds at {{ input_datetime_12hr_with_date('input_datetime.tony_morning_meds_taken') }} today.
|
||||||
Tony has not taken his morning meds.
|
{% elif is_state('input_boolean.tony_morning_meds_taken','off') and ct >= 21600 %}
|
||||||
{% if ct < state_attr('input_datetime.tony_morning_meds_notify','timestamp') | int %}
|
Tony has not taken his morning meds.
|
||||||
{% if method == 'tts' %}
|
{% if ct < state_attr('input_datetime.tony_morning_meds_notify','timestamp') | int %}
|
||||||
{{ ['He has a reminder scheduled for',
|
{% if method == 'tts' %}
|
||||||
'Rest assured that I will pester him mercilessly about this, starting at',
|
{{ ['He has a reminder scheduled for',
|
||||||
'This is absolutely essential, and I will remind him to do it at',
|
'Rest assured that I will pester him mercilessly about this, starting at',
|
||||||
'Since nobody including Tony himself likes him without his meds, I will remind him at',
|
'This is absolutely essential, and I will remind him to do it at',
|
||||||
] | random }} {{ input_datetime_12hr('input_datetime.tony_morning_meds_notify') }} today.
|
'Since nobody including Tony himself likes him without his meds, I will remind him at',
|
||||||
{% else %}
|
] | random }} {{ input_datetime_12hr('input_datetime.tony_morning_meds_notify') }} today.
|
||||||
He will be reminded at {{ input_datetime_12hr('input_datetime.tony_morning_meds_notify') }} today.
|
{% else %}
|
||||||
|
He will be reminded at {{ input_datetime_12hr('input_datetime.tony_morning_meds_notify') }} today.
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user