mirror of
				https://github.com/CCOSTAN/Home-AssistantConfig.git
				synced 2025-10-31 10:46:20 +00:00 
			
		
		
		
	Closes #394 - Thanks @SILVRRGIT for fixing and closing this issue. (til 2025!) lol
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user