got one for you:
attribution: Powered by Weatherbit.io
alerts:
- city_name: Roosendaal
title: Extreme High Temperature
description: >-
nederlands: Tijdens de volgende dagen bepaalt een droge en warme
continentale luchtmassa ons weer. In het centrum van het land schommelen
de maxima al boven 25 graden dinsdag, en rond of boven 30 graden van
woensdag tot vrijdag.Zaterdag wordt het wat minder warm, maar
waarschijnlijk liggen de maxima nog op of boven 25 graden in het centrum
van het land.
français: De l'air continental sec et tres chaud determinera notre temps
durant les prochains jours. Dans le centre du pays, les maxima depasseront
deja la barre des 25 degres ce mardi, puis seront de l'ordre de, ou
superieurs a 30 degres de mercredi a vendredi.Samedi, les temperatures
pourront quelque peu diminuer, mais resteront encore probablement egales
ou legerement superieures a 25 degres sur le centre.
severity: Advisory
effective_local: '2020-06-23T12:25:00'
expires_local: '2020-06-25T00:59:00'
uri: 'https://www.meteoalarm.eu/fr_FR/0/0/BE002.html'
regions:
- 'Antwerpen / Anvers,BE'
friendly_name: Weatherbit Weather Alerts
icon: 'mdi:alert'
this tells us a few things:
Apparently weatherbit sets 2 languages, based on the thought I live in Antwerp region (which I do, but I live in the Netherlands…) Belgium has 2 official languages, Dutch and French, so this is kind of clever.
Still, it is incorrect. And it should also know that, since the city Roosendaal is correct
We could be able to set a country code, on which the integration could check the appropriate alerts?
As you can also see, it selects the meteoalarm.eu region (in French) for Belgium. This is noteworthy, since we have our ‘own’ region in my region, Noord-Brabant. As is used in the Meteoalarm integration:
- platform: meteoalarm
name: Meteoalarm Brabant
country: 'NL'
language: 'ne'
province: 'Noord-Brabant'
all in all, not sure if there is anything you can do about this, and I might be forced to use the template as I do:
weatherbit_alert:
friendly_name: Weatherbit Alert
value_template: >
{{states('sensor.weatherbit_weather_alerts')|int > 0}}
attribute_templates:
Title: >
{% if states('sensor.weatherbit_weather_alerts')|int > 0 %}
{{state_attr('sensor.weatherbit_weather_alerts','alerts')[0].title}}
{% else %} No alert
{% endif %}
City: >
Weatherbit alert {{state_attr('sensor.weatherbit_weather_alerts','alerts')
[0].city_name}}
Description: >
{% if states('sensor.weatherbit_weather_alerts')|int > 0 %}
{{state_attr('sensor.weatherbit_weather_alerts','alerts')
[0].description.split('nederlands:')[1].split('français')[0]}}
{% else %} No alert
{% endif %}
Severity: >
{{state_attr('sensor.weatherbit_weather_alerts','alerts')[0].severity}}
Effective: >
{{as_timestamp(state_attr('sensor.weatherbit_weather_alerts','alerts')
[0].effective_local)|timestamp_custom('%X %d %B')}}
Expires: >
{{as_timestamp(state_attr('sensor.weatherbit_weather_alerts','alerts')
[0].expires_local)|timestamp_custom('%X %d %B')}}
please have a look and see if you can improve?