Added shower awareness to K's bedtime announcement

This commit is contained in:
2022-08-05 14:27:04 -04:00
parent e62617a27f
commit c7b2092b21

View File

@ -3,12 +3,18 @@
{%- macro getReport() -%}
<p>
Good Evening, Kallen,
{{ [ 'It is almost bedtime. That means it is time to start preparing for bed. if you are taking a shower tonight, you need to head that way.',
'My sensors are detecting a strange smell. I am running diagnostics. But in the mean time, you should start a shower.',
'I hate to say it but, the day is coming to an end. Time to finish up your tasks, pick up any toys you have out, and get ready for bed.',
'Did you ever hear the one about the kid who never took a shower? <break time="2s"/>Yeah, me either. So we should keep it that way. It is time to get ready for bed.',
'The count down clock until bedtime has started. Time to get cleaned up, get your pajamas on, and head for your bedroom.'
] | random }}
{%- if as_timestamp(strptime(state_attr('calendar.kallen_tasks','end_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%Y-%m-%d") == now().strftime("%Y-%m-%d") and is_state_attr('calendar.kallen_tasks','message','Shower') %}
{{ [ 'My sensors are detecting a strange smell. I am running diagnostics. But in the mean time, you should start a shower.',
'It is a shower night, so you need to head upstairs and get on that.',
'Did you ever hear the one about the kid who never took a shower? <break time="2s"/>Yeah, me either. So we should keep it that way. It is time to get ready for bed.'
] | random }}
{% else %}
{{ [ 'It is almost bedtime. That means it is time to start preparing for bed.',
'I hate to say it but, the day is coming to an end. Time to finish up your tasks, pick up any toys you have out, and get ready for bed.',
'The count down clock until bedtime has started. Time to get cleaned up, get your pajamas on, and head for your bedroom.',
'Its the final countdown <break time="2s"/> until bedtime, silly. Time to get ready to head that way!'
] | random }}
{% endif %}
{% if is_state('sensor.school_tomorrow', 'on') %}
{{ [ 'Because you have school tomorrow. ',
'Because you have to get up early tomorrow for school.',
@ -57,7 +63,8 @@
Tomorrow is the first day of summer. Are you ready?
{%- endif %}
{{ [ 'I will turn on your bedroom lights and appropriate white noise device at bedtime.',
'I have executed the Pre bed routine for your room. Standby for bedtime protocol in two zero minutes.'
'I have executed the Pre bed routine for your room. Standby for bedtime protocol in two zero minutes.',
'I will prepare your bedroom shortly.'
] | random }}
</p>
{%- endmacro -%}