Italy Meteo-hydro alert and hydrogeological phenomena Civil Protection (Protezione Civile). In this custom component you can find the vigilance Bulletin and the Bulletin of national hydrogeological and hydraulic criticalities. They allow to check whether in your current location there will be criticalities/warnings related to weather-hydrogeological and hydraulic phenomena. Weather forecasts for civil protection purposes differs from the classic "weather forecasts". They highlight potentially harmful situations to people or things. This component was created for personal purposes, in order to be able to monitor the Civil Protection site and check for important updates. I hope it will be useful to you.
I try to get the id directly from github, otherwise I get it from the site.
Fixed bulletin base url. #40
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 -%}
Integration now available to set up from the UI.
The yaml configuration is no longer supported. Please read the README file and remove the yaml config.
For binary sensors, the attributes in Italian language (allerta, data, rischio, zona_info) have been replaced in English (alert, date, risk, zone_name).
sensor
Integration now available to set up from the UI.
The yaml configuration is no longer supported. Please read the README file and remove the yaml config.
For binary sensors, the attributes in Italian language (allerta, data, rischio, zona_info) have been replaced in English (alert, date, risk, zone_name).
sensor
A known issue, all entities will be updated with the second update. For the moment I am not able to correct it, if someone wants to help me it is welcome: D Another thing to do is to manage errors and improve data requests via the web.
New version under development. The ISTAT code is no longer required. In the configuration it is still maintained, for compatibility, but in the future, if this version works, it will no longer be allowed. Third party services excluded.