Updated briefings with better garbage collection logic

This commit is contained in:
2022-10-22 18:37:59 -04:00
parent 942d73783d
commit 149f0edfda
4 changed files with 68 additions and 15 deletions

View File

@ -96,7 +96,9 @@
<p> <p>
Let me check the sit rep for today. Let me check the sit rep for today.
{% if dow == 'Monday' %} {% if is_state('sensor.garbage_collection_large_pickup','1') %}
'Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all large garbage items tonight, and do not forget the trash can!'
{% elif is_state('sensor.garbage_collection','1') %}
{{ [ {{ [
'Do not forget to take the trash bin to the curb, tomorrow is trash pickup day.', 'Do not forget to take the trash bin to the curb, tomorrow is trash pickup day.',
'Make sure to take the trash out. No, I do not mean Tony.', 'Make sure to take the trash out. No, I do not mean Tony.',
@ -104,13 +106,12 @@
] | random }} ] | random }}
{% endif %} {% endif %}
{% if dow == 'Tuesday' %} {% set gc = state_attr('sensor.garbage_collection','days') %}
{% if is_state('binary_sensor.evening','on') %} {% if gc == 7 %}
{{ [ {{ [
'Do not forget to bring the trash can back from the curb.', 'Do not forget to bring the trash can back from the curb.',
'The trash can will feel lonely if you leave it at the curb all night.' 'The trash can will feel lonely if you leave it at the curb all night.'
] | random }} ] | random }}
{% endif %}
{% endif %} {% endif %}
{% if is_state('binary_sensor.evening','on') %} {% if is_state('binary_sensor.evening','on') %}

View File

@ -120,6 +120,26 @@
It appears no traffic reports are needed today. Enjoy your day off! It appears no traffic reports are needed today. Enjoy your day off!
{% endif %} {% endif %}
<p>
{% if is_state('sensor.garbage_collection_large_pickup','1') %}
'Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all large garbage items tonight, and do not forget the trash can!'
{% elif is_state('sensor.garbage_collection','1') %}
{{ [
'Do not forget to take the trash bin to the curb, tomorrow is trash pickup day.',
'Make sure to take the trash out. No, I do not mean Tony.',
'Tomorrow is a big day for the garbage men. Make sure you do not let them down! Take the trash out!'
] | random }}
{% endif %}
{% set gc = state_attr('sensor.garbage_collection','days') %}
{% if gc == 7 %}
{{ [
'Do not forget to bring the trash can back from the curb.',
'The trash can will feel lonely if you leave it at the curb all night.'
] | random }}
{% endif %}
</p>
<p> <p>
{% if is_state('input_boolean.briefing_extras','on') %} {% if is_state('input_boolean.briefing_extras','on') %}
"And now we have the following extra information to pass along. {{ states('input_text.briefing_extras') }} " "And now we have the following extra information to pass along. {{ states('input_text.briefing_extras') }} "

View File

@ -31,13 +31,25 @@
{% endif %} {% endif %}
</p> </p>
{% set dow = as_timestamp(now()) | timestamp_custom('%A') %} <p>
{% if dow == 'Monday' %} {% if is_state('sensor.garbage_collection_large_pickup','1') %}
"I hope that by now you have remembered to take the garbage can to the curb. " 'Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all large garbage items tonight, and do not forget the trash can!'
{% endif %} {% elif is_state('sensor.garbage_collection','1') %}
{% if dow == 'Tuesday' %} {{ [
"At this point you should have already done this, but make sure the garbage can is brought back to the house! " 'Do not forget to take the trash bin to the curb, tomorrow is trash pickup day.',
{% endif %} 'Make sure to take the trash out. No, I do not mean Tony.',
'Tomorrow is a big day for the garbage men. Make sure you do not let them down! Take the trash out!'
] | random }}
{% endif %}
{% set gc = state_attr('sensor.garbage_collection','days') %}
{% if gc == 7 %}
{{ [
'Do not forget to bring the trash can back from the curb.',
'The trash can will feel lonely if you leave it at the curb all night.'
] | random }}
{% endif %}
</p>
<p> <p>
"Bedroom climate scheduling will be as follows. " "Bedroom climate scheduling will be as follows. "

View File

@ -124,6 +124,26 @@
{% endif %} {% endif %}
</p> </p>
<p>
{% if is_state('sensor.garbage_collection_large_pickup','1') %}
'Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all large garbage items tonight, and do not forget the trash can!'
{% elif is_state('sensor.garbage_collection','1') %}
{{ [
'Do not forget to take the trash bin to the curb, tomorrow is trash pickup day.',
'Make sure to take the trash out. No, I do not mean Tony.',
'Tomorrow is a big day for the garbage men. Make sure you do not let them down! Take the trash out!'
] | random }}
{% endif %}
{% set gc = state_attr('sensor.garbage_collection','days') %}
{% if gc == 7 %}
{{ [
'Do not forget to bring the trash can back from the curb.',
'The trash can will feel lonely if you leave it at the curb all night.'
] | random }}
{% endif %}
</p>
<p> <p>
{% if is_state('light.living_room_lights','on') %} {% if is_state('light.living_room_lights','on') %}
{% if is_state('input_boolean.early_night_mode','on') %} {% if is_state('input_boolean.early_night_mode','on') %}