Updated Boolean logic tests for Color Lights

This commit is contained in:
ccostan 2020-12-12 16:50:33 -05:00
parent d6317cf7a6
commit d43da5a441
7 changed files with 49 additions and 52 deletions

View File

@ -50,8 +50,7 @@ monthly_color_scene:
fathers_day fathers_day
{%- elif states('sensor.memorial_day_countdown') | int < 3 -%} {%- elif states('sensor.memorial_day_countdown') | int < 3 -%}
RWB RWB
{%- elif now().strftime("%m%d")|int >= 704 {%- elif now().strftime("%m%d")|int == 704 -%}
and now().strftime("%m%d")|int <= 704-%}
RWB RWB
{%- elif states('sensor.labor_day_countdown') | int < 3 -%} {%- elif states('sensor.labor_day_countdown') | int < 3 -%}
RWB RWB
@ -60,16 +59,14 @@ monthly_color_scene:
halloween halloween
{%- elif states('sensor.thanksgiving_day_countdown') | int < 4 -%} {%- elif states('sensor.thanksgiving_day_countdown') | int < 4 -%}
thanksgiving thanksgiving
{%- elif states('sensor.chanukkah_countdown') | int < 10 -%} {%- elif states('sensor.chanukkah_countdown') | int <= 1 -%}
hanukkah hanukkah
{%- elif states('sensor.christmas_countdown') | int < 30 -%} {%- elif states('sensor.chanukkah_countdown') | int >= 357 -%}
hanukkah
{%- elif states('sensor.christmas_countdown') | int <= 25 -%}
christmas christmas
{%- elif now().strftime("%m%d")|int == 1231 -%} {%- elif now().strftime("%m%d")|int == 1231 -%}
new_years_day new_years_day
{%- else -%} {%- else -%}
standard standard
{%- endif -%}_colors {%- endif -%}_colors
# http://www.calendar-365.com/holidays/2019.html
# Updated for 2019

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 0 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 0 B