Code Monkey home page Code Monkey logo

home-assistant-custom-components-ingv's Introduction

Hi there 😃

🔭 I’m currently working on Notifier - Centro Notifiche

⚡ Fun fact: I'm not a programmer 😄

📫 How to reach me:

Websitebadge Forum telegrambadge facebookbadge


⚡ Recent Activity

  1. 🗣 Commented on #32 in caiosweet/Home-Assistant-custom-components-INGV
  2. 🗣 Commented on #2453 in alandtse/alexa_media_player
  3. 🗣 Commented on #2453 in alandtse/alexa_media_player
  4. 🗣 Commented on #31 in caiosweet/Home-Assistant-custom-components-INGV
  5. 🔒 Closed issue #31 in caiosweet/Home-Assistant-custom-components-INGV



caiosweet

caiosweet


$$\textbf{\color{#0099ff} \huge Enjoy Yourself \unicode{x1f973} Caio Sweet}$$



home-assistant-custom-components-ingv's People

Contributors

caiosweet avatar dependabot[bot] avatar ktibow avatar mrai64 avatar viper5000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

home-assistant-custom-components-ingv's Issues

integration not found in automation trigger

hi, I was trying your example automation but there is something wrong with the code:
trigger: - platform: geo_location source: "ingv_centro_nazionale_terremoti"
the trigger is not recognized... source "ingv..." says INTEGRATION NOT FOUND.
Did you have some suggestion?
card and all other things works perfectly!

Add unit of measurement localization

the sensor is great in English but in the other languages (currently it/pt) it is inconsistent, I wanted to open a PR but I didn't understand how to do it, I only found the translation files

Link immagini

Describe the bug

Credo che sia cambiato il link per ottenere l'immagine della mappa di ciascun terremoto.

To Reproduce

Per verificare il link che viene attualmente fornito dall'integrazione basta aprire i dettagli di un terremoto, come nell'immagine sottostante:
Screenshot 2024-08-08 alle 10 33 50

Il link fornito attualmente dall'integrazione è il seguente:
http://shakemap.rm.ingv.it/shake4/data/39998141/current/products/intensity.jpg
Se si prova ad aprire detto link si vede che non funziona.

Il link attualmente corretto per ottenere la mappa di detto terremoto, invece, è il seguente:
https://shakemap.ingv.it/data/39998141/current/products/intensity.jpg
Se si prova ad aprire detto link si vede che funziona correttamente.

Conclusion
Credo che sia necessario aggiornare la struttura del link fornito dall'integrazione, in quanto sembra essere cambiata la struttura del link per ottenere l'immagine di ciascun terremoto su shakemap.ingv.it

Grazie mille

Ciao

Example of lovelace card?

Can you show us an example about how to configure a lovelace card with this component?
I see many new sensors created so i think i need only an entities card or not? And how to show a map?

deprecated constant which will be removed in HA Core 2025.1

LENGTH_MILES was used from ingv_centro_nazionale_terremoti, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.MILES instead, please create a bug report at https://github.com/caiosweet/Home-Assistant-custom-components-INGV/issues

LENGTH_KILOMETERS was used from ingv_centro_nazionale_terremoti, this is a deprecated constant which will be removed in HA Core 2025.1.
Use UnitOfLength.KILOMETERS instead, please create a bug report at https://github.com/caiosweet/Home-Assistant-custom-components-INGV/issues

The name property of the Unit System is deprecated

As per home-assistant/core#80257

The name of a unit system should never be used for checking its type. Instance checks should be used instead:

Correct:

if hass.config.units is IMPERIAL_SYSTEM:
    pass

if hass.config.units is METRIC_SYSTEM:
    pass

Incorrect:

if hass.config.units.name == CONF_UNIT_SYSTEM_IMPERIAL:
    pass

if hass.config.units.name == CONF_UNIT_SYSTEM_METRIC:
    pass

help to edit binary_sensor template to remove warning in log of homeassistant 2021.4.X

Describe the bug

After update home assistant 2021.4.0 in the log there are warning when a tamplate is empty.
https://www.home-assistant.io/blog/2021/04/07/release-20214/#warnings-for-undefined-variables-in-templates
To Reproduce
Steps to reproduce the behavior:

  1. Update home assistant to 2021.4.1
  2. See the log file

Expected behavior
I hope to edit the template of all the binary sensor and other templates to don't show the warning.
For example, someone fix easier template in this way: https://community.home-assistant.io/t/template-sensor-template-variable-warning-with-ha-2021-4/297237

Screenshots

2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='state')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.latitude')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.longitude')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.title')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.region')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.magnitude')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.publication_date')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.event_id')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.image_url')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.attribution')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti') |sort(attribute='attributes.publication_date')|map(attribute='attributes.external_id')|list|last|replace('smi:','')}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{% set last_date = states.geo_location
  | selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  | sort(attribute='attributes.publication_date')
  | map(attribute='attributes.publication_date') |list|last %}
{{ ((as_timestamp(utcnow())-as_timestamp(last_date))/3600) <= 24 if last_date else False }}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='state')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.latitude')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.longitude')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.title')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.region')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.magnitude')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.publication_date')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.event_id')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.image_url')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti')
  |sort(attribute='attributes.publication_date')|map(attribute='attributes.attribution')|list|last}}'
2021-04-09 18:52:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: No last item, sequence was empty. when rendering '{{states.geo_location|selectattr('attributes.source','eq','ingv_centro_nazionale_terremoti') |sort(attribute='attributes.publication_date')|map(attribute='attributes.external_id')|list|last|replace('smi:','')}}'

Desktop (please complete the following information):
System Health

version: core-2021.4.1
installation_type: Home Assistant Core
dev: false
hassio: false
docker: false
virtualenv: true
python_version: 3.8.7
os_name: Linux
os_version: 5.10.17-v7l+
arch: armv7l
timezone: Europe/Rome

Smartphone (please complete the following information):

Additional context

Il componente non rimuove le entità precedenti

Chiedo scusa per l'uso dell'italiano ma non ho troppa dimestichezza con l'inglese.
Ho correttamente installato tramite HACS il componente, le entità vengono generate ma non vengono mai rimosse. Al momento ne ho 4 e se dovessero arrivare altri eventi credo aumenteranno.

Il mio sistema è HassOS Supervised, Core 2022.2.9, Python 3.9.7 su Raspberry 4

Non saprei come riprodurre l'errore e non ho visto nulla nei log che possa aiutarmi nella comprensione.

Grazie per l'ottimo lavoro
Paolo

Errors after HAOS 2023.10.1

I always get these errors when HA start, just after upgrading to HAOS 2023.10.1

2023-10-10 12:18:31.997 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=(#### TERREMOTI - ULTIME 24h  [<img src="https://www.hsit.it/images/favicon.png"/> Hai Sentito Il Terremoto](http://www.haisentitoilterremoto.it/)
<!-- Setting -->
  {%- set person = 'person.maurizio' -%}
  {%- set url = "https://shakemap.rm.ingv.it/shake/{}/download/{}.jpg" -%}
  {%- set entityid = 'binary_sensor.lastquake' -%}
  {%- set id = state_attr(entityid, 'event_id') -%}
  {%- set data_utc = state_attr(entityid, 'publication_date') -%}
  {%- set magnitudo = (state_attr(entityid, 'magnitude')|float) if not none else '0' -%}
  {%- set code = {0:'White', 1:'Green', 2:'Yellow', 3:'Orange', 4:'Red'} -%}
  {%- set color = code[state_attr('binary_sensor.lastquake', 'level')|int] -%}
  {%- set lat = state_attr(entityid, 'lat') -%}
  {%- set long = state_attr(entityid, 'long') -%}
<font>
**<font color="{{color}}">{{as_timestamp(data_utc)|timestamp_custom ('%H:%M:%S del %d/%m/%Y')}}</font>**<br><br> Un terremoto di magnitudo **<font color="{{color}}">{{magnitudo}}</font>**<br> è avvenuto nella zona: [{{state_attr(entityid, 'region')}}](https://www.openstreetmap.org/?mlat={{lat}}&mlon={{long}}#map=12/{{lat}}/{{long}})<br> a <font color="{{color}}">**{{state_attr(entityid, 'distance')}}**</font> km da casa,<br> con coordinate geografiche (lat, long) {{lat}},{{long}}.<br> {{("Tu ti trovi a " ~ distance(lat, long, person)) ~ " km dall'epicentro." if is_state(person, 'not_home') else ''}} </font> {% if magnitudo >= 3 %}<br> [Shakemap]({{url.format(id,'intensity')}}) ~  [PGA]({{url.format(id,'pga')}}) ~ [PGV]({{url.format(id,'pgv')}}) ~ [TvMap]({{url.format(id,'tvmap')}}) ~ [TvMap2]({{url.format(id,'tvmap_bare')}}) ~  [HaiSentitoIlTerremoto](http://eventi.haisentitoilterremoto.it/{{id}}/{{id}}_mcs.jpg)
<!-- Scegli il tipo di immagine da visualizzare [intensity,pga,pgv,tvmap,tvmap_bare] -->
  <img src="{{url.format(id,'intensity')}}"/>
  <!-- <img src="{{url.format(id,'pga')}}"/> -->
{% endif %}
<!-- 
  Map Google
  [{{state_attr(entityid, 'region')}}](http://maps.google.com/maps?z=8&q=loc:{{lat}}+{{long}})
  Map Open Streat Map
  [{{state_attr(entityid, 'region')}}](https://www.openstreetmap.org/?mlat={{lat}}&mlon={{long}}#map=8/{{lat}}/{{long}})
-->) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1925, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 568, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2196, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 8, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1928, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1626, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input '' when rendering template '#### TERREMOTI - ULTIME 24h  [<img src="https://www.hsit.it/images/favicon.png"/> Hai Sentito Il Terremoto](http://www.haisentitoilterremoto.it/)
<!-- Setting -->
  {%- set person = 'person.maurizio' -%}
  {%- set url = "https://shakemap.rm.ingv.it/shake/{}/download/{}.jpg" -%}
  {%- set entityid = 'binary_sensor.lastquake' -%}
  {%- set id = state_attr(entityid, 'event_id') -%}
  {%- set data_utc = state_attr(entityid, 'publication_date') -%}
  {%- set magnitudo = (state_attr(entityid, 'magnitude')|float) if not none else '0' -%}
  {%- set code = {0:'White', 1:'Green', 2:'Yellow', 3:'Orange', 4:'Red'} -%}
  {%- set color = code[state_attr('binary_sensor.lastquake', 'level')|int] -%}
  {%- set lat = state_attr(entityid, 'lat') -%}
  {%- set long = state_attr(entityid, 'long') -%}
<font>
**<font color="{{color}}">{{as_timestamp(data_utc)|timestamp_custom ('%H:%M:%S del %d/%m/%Y')}}</font>**<br><br> Un terremoto di magnitudo **<font color="{{color}}">{{magnitudo}}</font>**<br> è avvenuto nella zona: [{{state_attr(entityid, 'region')}}](https://www.openstreetmap.org/?mlat={{lat}}&mlon={{long}}#map=12/{{lat}}/{{long}})<br> a <font color="{{color}}">**{{state_attr(entityid, 'distance')}}**</font> km da casa,<br> con coordinate geografiche (lat, long) {{lat}},{{long}}.<br> {{("Tu ti trovi a " ~ distance(lat, long, person)) ~ " km dall'epicentro." if is_state(person, 'not_home') else ''}} </font> {% if magnitudo >= 3 %}<br> [Shakemap]({{url.format(id,'intensity')}}) ~  [PGA]({{url.format(id,'pga')}}) ~ [PGV]({{url.format(id,'pgv')}}) ~ [TvMap]({{url.format(id,'tvmap')}}) ~ [TvMap2]({{url.format(id,'tvmap_bare')}}) ~  [HaiSentitoIlTerremoto](http://eventi.haisentitoilterremoto.it/{{id}}/{{id}}_mcs.jpg)
<!-- Scegli il tipo di immagine da visualizzare [intensity,pga,pgv,tvmap,tvmap_bare] -->
  <img src="{{url.format(id,'intensity')}}"/>
  <!-- <img src="{{url.format(id,'pga')}}"/> -->
{% endif %}
<!-- 
  Map Google
  [{{state_attr(entityid, 'region')}}](http://maps.google.com/maps?z=8&q=loc:{{lat}}+{{long}})
  Map Open Streat Map
  [{{state_attr(entityid, 'region')}}](https://www.openstreetmap.org/?mlat={{lat}}&mlon={{long}}#map=8/{{lat}}/{{long}})
-->' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 694, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 570, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input '' when rendering template '#### TERREMOTI - ULTIME 24h  [<img src="https://www.hsit.it/images/favicon.png"/> Hai Sentito Il Terremoto](http://www.haisentitoilterremoto.it/)
<!-- Setting -->
  {%- set person = 'person.maurizio' -%}
  {%- set url = "https://shakemap.rm.ingv.it/shake/{}/download/{}.jpg" -%}
  {%- set entityid = 'binary_sensor.lastquake' -%}
  {%- set id = state_attr(entityid, 'event_id') -%}
  {%- set data_utc = state_attr(entityid, 'publication_date') -%}
  {%- set magnitudo = (state_attr(entityid, 'magnitude')|float) if not none else '0' -%}
  {%- set code = {0:'White', 1:'Green', 2:'Yellow', 3:'Orange', 4:'Red'} -%}
  {%- set color = code[state_attr('binary_sensor.lastquake', 'level')|int] -%}
  {%- set lat = state_attr(entityid, 'lat') -%}
  {%- set long = state_attr(entityid, 'long') -%}
<font>
**<font color="{{color}}">{{as_timestamp(data_utc)|timestamp_custom ('%H:%M:%S del %d/%m/%Y')}}</font>**<br><br> Un terremoto di magnitudo **<font color="{{color}}">{{magnitudo}}</font>**<br> è avvenuto nella zona: [{{state_attr(entityid, 'region')}}](https://www.openstreetmap.org/?mlat={{lat}}&mlon={{long}}#map=12/{{lat}}/{{long}})<br> a <font color="{{color}}">**{{state_attr(entityid, 'distance')}}**</font> km da casa,<br> con coordinate geografiche (lat, long) {{lat}},{{long}}.<br> {{("Tu ti trovi a " ~ distance(lat, long, person)) ~ " km dall'epicentro." if is_state(person, 'not_home') else ''}} </font> {% if magnitudo >= 3 %}<br> [Shakemap]({{url.format(id,'intensity')}}) ~  [PGA]({{url.format(id,'pga')}}) ~ [PGV]({{url.format(id,'pgv')}}) ~ [TvMap]({{url.format(id,'tvmap')}}) ~ [TvMap2]({{url.format(id,'tvmap_bare')}}) ~  [HaiSentitoIlTerremoto](http://eventi.haisentitoilterremoto.it/{{id}}/{{id}}_mcs.jpg)
<!-- Scegli il tipo di immagine da visualizzare [intensity,pga,pgv,tvmap,tvmap_bare] -->
  <img src="{{url.format(id,'intensity')}}"/>
  <!-- <img src="{{url.format(id,'pga')}}"/> -->
{% endif %}
<!-- 
  Map Google
  [{{state_attr(entityid, 'region')}}](http://maps.google.com/maps?z=8&q=loc:{{lat}}+{{long}})
  Map Open Streat Map
  [{{state_attr(entityid, 'region')}}](https://www.openstreetmap.org/?mlat={{lat}}&mlon={{long}}#map=8/{{lat}}/{{long}})
-->' but no default was specified

Never seen before....

INSTALLATION ERROR ON HOME ASSISTANT CORE ON SYNOLOGY NAS DSM 7

Hi, the custom component "Home-Assistant-custom-components-INGV" is very interesting. I tried to install it via HACS and I cofigured the configuration.yalm file as per your instructions. But I get this error: "Platform error geo_location.ingv_centro_nazionale_terquoti - Requirements for ingv_centro_nazionale_terquoti not found: ['georss-ingv-centro-Nazionale-earthquakes-client == 0.5']."
I tried to install georss-ingv-national-center-earthquakes-client == 0.5 via: pip install georss-ingv-national-center-earthquakes-client == 0.5 but I get an error also in this case.
How can I proceed?
I use Home Assistant Core on Synology Nas DSM 7.
Thank you

Integrating with other QuakeML feeds

Other country/govs, such as the USGS in the US, provide QuakeML feeds for their regions. Would it be possible to substitute our own feed during the config process, rather than using INGV's? (This is a feature request).

If it seems like too much work I am happy to look into implementing myself and submitting a PR as I've been interested in HACS development for awhile but haven't had a chance to work on anything.

Warning about a deprecated signature

There is a warning in the log about a signature deprecated:

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for ingv_centro_nazionale_terremoti using this method at custom_components/ingv_centro_nazionale_terremoti/__init__.py, line 90: hass.config_entries.async_setup_platforms(entry, PLATFORMS)
  • Home Assistant 2023.2.2
  • Supervisor 2023.01.1
  • Frontend 20230202.0 - latest

Alarms are repeating for the same events

I've been using the automation feature to document more efficiently. It was functioning properly until recently. However, since yesterday, there has been a eartquake, and now it occasionally triggers for the same event repeatedly.
The aqutomation is this:

alias: INFO INGV terremoti
description: ""
trigger:

  • platform: geo_location
    source: ingv_centro_nazionale_terremoti
    zone: zone.geoalert
    event: enter
    condition: []
    action:

  • service: notify.joins21
    data:
    title: TERREMOTO
    message: >-
    Rilevato terremoto a una distanza di {{trigger.to_state.state}} Km
    da casa. Magnitudo: {{trigger.to_state.attributes.magnitude}}
    Epicentro: {{trigger.to_state.attributes.region}} Profondità:
    {{trigger.to_state.attributes.depth}} km. Il terremoto è avvenuto alle
    {% set data_utc = trigger.to_state.attributes.publication_date
    %} {{as_timestamp(data_utc)|timestamp_custom('%H:%M:%S -
    %d/%m/%Y')}}

  • service: notify.joins24
    data:
    title: TERREMOTO
    message: >-
    Rilevato terremoto a una distanza di {{trigger.to_state.state}} Km
    da casa. Magnitudo: {{trigger.to_state.attributes.magnitude}}
    Epicentro: {{trigger.to_state.attributes.region}} Profondità:
    {{trigger.to_state.attributes.depth}} km. Il terremoto è avvenuto alle
    {% set data_utc = trigger.to_state.attributes.publication_date
    %} {{as_timestamp(data_utc)|timestamp_custom('%H:%M:%S -
    %d/%m/%Y')}}

  • condition: time
    after: "07:00:00"
    before: "23:00:00"
    weekday:

    • tue
    • wed
    • thu
    • fri
    • sat
    • sun
    • mon
  • service: tts.google_say
    data:
    entity_id: media_player.google_sala
    message: >
    Rilevato terremoto a una distanza di {{trigger.to_state.state}} Km da

    casa. Magnitudo: {{trigger.to_state.attributes.magnitude}}  Epicentro:
    
    {{trigger.to_state.attributes.region}} Profondità:
    
    {{trigger.to_state.attributes.depth}} km. Il terremoto è avvenuto alle
    {% set data_utc =
    
    trigger.to_state.attributes.publication_date %}
    
    {{as_timestamp(data_utc)|timestamp_custom('%H:%M:%S - %d/%m/%Y')}}
    

mode: queued

In my log I found these errors:
Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: aio_quakeml_client.feed
Fonte: custom_components/ingv_centro_nazionale_terremoti/init.py:160
integration: INGV Earthquakes (documentazione, problemi)
Prima occorrenza: 7 aprile 2024 alle ore 07:45:38 (121 occorrenze)
Ultima registrazione: 10:29:34

Requesting data from https://webservices.ingv.it/fdsnws/event/1/query?lat=**.*******&lon=12.66378164291382&maxradiuskm=75.0&minmag=3.0&starttime=2024-04-10T06:53:00 failed with timeout error
Requesting data from https://webservices.ingv.it/fdsnws/event/1/query?lat=**.*******&lon=12.66378164291382&maxradiuskm=75.0&minmag=3.0&starttime=2024-04-10T07:33:00 failed with timeout error
Requesting data from https://webservices.ingv.it/fdsnws/event/1/query?lat=**.*******&lon=12.66378164291382&maxradiuskm=75.0&minmag=3.0&starttime=2024-04-10T07:54:00 failed with timeout error
Requesting data from https://webservices.ingv.it/fdsnws/event/1/query?lat=**.*******&lon=12.66378164291382&maxradiuskm=75.0&minmag=3.0&starttime=2024-04-10T08:24:00 failed with timeout error
Requesting data from https://webservices.ingv.it/fdsnws/event/1/query?lat=**.********&lon=12.66378164291382&maxradiuskm=75.0&minmag=3.0&starttime=2024-04-10T08:29:00 failed with timeout error

and these:

Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: aio_quakeml_client.feed_manager
Fonte: custom_components/ingv_centro_nazionale_terremoti/init.py:160
integration: INGV Earthquakes (documentazione, problemi)
Prima occorrenza: 7 aprile 2024 alle ore 07:45:38 (121 occorrenze)
Ultima registrazione: 10:29:34

Update not successful, no data received from <IngvCentroNazionaleTerremotiQuakeMLFeed(home=(.************, 12.66378164291382), url=https://webservices.ingv.it/fdsnws/event/1/query, radius=75.0, magnitude=3.0)>

HOME ASSISTANT:
Core
2024.3.3
Supervisor
2024.04.0
Operating System
12.1
Frontend
20240307.0

Probably the immage I attached can explain the error:
Screenshot_11-4-2024_10549_carhome duckdns org

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.