|
|
|
|
@ -39,14 +39,14 @@ sensor:
|
|
|
|
|
{{ holiday }}
|
|
|
|
|
|
|
|
|
|
- platform: rest
|
|
|
|
|
resource: http://www.webcal.fi/cal.php?id=335&format=json&start_year=current_year&end_year=2018&tz=America%2FNew_York
|
|
|
|
|
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-%}
|
|
|
|
|
{%- if day_val.date==now_string and day_val.flag_day==1 -%}
|
|
|
|
|
{% set is_flag_day = True %}
|
|
|
|
|
{%- endif -%}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|