Closes #394 - Thanks @SILVRRGIT for fixing and closing this issue. (til 2025!) lol

This commit is contained in:
ccostan 2019-01-10 15:32:07 -05:00
parent 66d84998a3
commit 3bcaeac28a
1 changed files with 11 additions and 13 deletions

View File

@ -38,19 +38,17 @@ sensor:
{% endif %}
{{ holiday }}
# - platform: rest
# resource: http://www.webcal.fi/cal.php?id=335&format=json&start_year=current_year&end_year=2020&tz=America%2FNew_York
# name: Flag
# scan_interval: 14400
# value_template: >-
# {% set is_flag_day = False %}
# {%- for day_val in value_json -%}
# {% set now_string = now().strftime('%Y-%m-%d') %}
# {%- if day_val.date==now_string and day_val.flag_day==1 -%}
# {% set is_flag_day = True %}
# {%- endif -%}
# {% endfor %}
# {{is_flag_day}}
- platform: rest
resource: http://www.webcal.fi/cal.php?id=335&format=json&start_year=current_year&end_year=current_year&tz=America%2FNew_York
name: Flag
scan_interval: 14400
value_template: >-
{%- set now_string = now().strftime('%Y-%m-%d') %}
{% for day_val in value_json if day_val.date == now_string %}
True
{% else %}
False
{% endfor -%}
###############################################################################
# Automation that notifies of a Holiday "state" change