Home Assistant Custom Components DPC Alert Versions Save

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.

v2021.8.1b

2 years ago

I try to get the id directly from github, otherwise I get it from the site.

  • NB Probable known issue For unauthenticated requests, the rate limit allows for up to 60 requests per hour.

2021.8.1

2 years ago

Fixed bulletin base url. #40

2021.8.0

2 years ago
  • Added Vigilance Sensor
  • Web Requests with Asynchronous Request
  • Increased timeout for slow connections and code reordering

2021.7.1b3

2 years ago

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 -%}

2021.7.1b1

2 years ago

2021.7.0

2 years ago

Breaking Changes

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).

Changes

  • Added sensor
  • Added new extra attributes in binary sensor (id, publication_date, expires, last_update, image_url)

v2021.7.0b1

2 years ago

Breaking Changes

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).

Changes

  • Added sensor
  • Added new extra attributes in binary sensor (id, publication_date, expires, last_update, image_url)

2021.06.1

3 years ago
  • New version under development. (From Beta)
  • 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. Instead of ISTAT, the coordinates of the place to be monitored will be taken. (Latitude and Longitude)
  • Third party services excluded.
  • Added the "image_url" attribute for the preview of the complete image of the alerts on the national territory.
  • Some attributes have been removed, please see the readme.
Note

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.

2021.6.0-beta

3 years ago

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.

2021.4.0

3 years ago