Add some additional Logic to the Holiday Countdowns. #288

This commit is contained in:
ccostan 2020-11-25 13:20:11 -05:00
parent 088ba7ca54
commit 348f3783c7
3 changed files with 10 additions and 4 deletions

View File

@ -161,14 +161,20 @@
and don't forget, there are {{ states.sensor.fathers_countdown.state }} days until Fathers day!
{%- elif states('sensor.easter_countdown') | int < 15 -%}
and don't forget, there are {{ states.sensor.easter_countdown.state }} days until Easter Sunday!
{%- elif states('sensor.thanksgiving_day_countdown') | int < 10 -%}
and don't forget, there are {{ states.sensor.thanksgiving_day_countdown.state }} days until Thanksgiving!
{%- elif states('sensor.halloween_countdown') | int < 30 -%}
{%- elif states('sensor.thanksgiving_day_countdown') | int < 10 and states('sensor.thanksgiving_day_countdown') | int > 0 -%}
and don't forget, there are {{ states.sensor.thanksgiving_day_countdown.state }} days until Thanksgiving
{%- elif states('sensor.thanksgiving_day_countdown') | int < 1 -%}
and don't forget, Thanksgiving is tomorrow!
{%- elif states('sensor.halloween_countdown') | int < 30 and states('sensor.halloween_countdown') | int > 0 -%}
and don't forget, there are {{ states.sensor.halloween_countdown.state }} Spooky days until Halloween!
{%- elif states('sensor.halloween_countdown') | int < 1 -%}
and don't forget, Tomorrow is Halloween!
{%- elif states('sensor.chanukkah_countdown') | int < 15 -%}
and don't forget, there are {{ states.sensor.chanukkah_countdown.state }} days until Chanukkah!
{%- elif states('sensor.christmas_countdown') | int < 30 -%}
{%- elif states('sensor.christmas_countdown') | int < 30 and states('sensor.christmas_countdown') | int > 0 -%}
and don't forget, there are {{ states.sensor.christmas_countdown.state }} Merry days until Christmas!
{%- elif states('sensor.christmas_countdown') | int < 1 -%}
and don't forget, Santa Claus is coming tomorrow!
{% endif %}
{%- endmacro -%}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 66 KiB