New Beta Vigilance sensor - Test Async task urls
Pre-release
Pre-release
Markdown test
type: markdown
content: >-
#### PROTEZIONE CIVILE VIGILANZA METEO
{%- set entity = 'sensor.dpc_vigilance' %}
{%- set color = {0:'White', 1:'Green', 2:'Yellow', 3:'Orange', 4:'Red'} %}
{%- set day = {'today':'OGGI: ', 'tomorrow':'DOMANI: ', 'aftertomorrow':
'DOPODOMANI: '} %}
{%- for status in ['today', 'tomorrow','aftertomorrow'] %}
{%- set v = state_attr(entity, status) %}
{% if v %}
{{ day[status] }}
{%- if v['level'] >= 1 -%}
Allerta <font color="{{ color.get(v['level']) }}"> <ha-icon icon="{{ v['icon']
}}"/></ha-icon>
Quantitativi previsti: {{ v['precipitation'] }}</font>
{%- endif %}
{% if v.phenomena %}
Fenomeni nelle vicinanze:
{%- for d in v.phenomena %}
<ha-icon icon="{{ d['icon'] }}"/></ha-icon> {{ d['event'] }}: {{ d['value']
}}
Distanza: {{ d['distance'] }} Km {{ d['direction'] }}{%- endfor %}
{%- endif %}
{%- endif %}
{%- endfor -%}