Meteoalarm push message don't work

I mean when the binary_sensor changes to on by itself.

How did you test this automation? Did you set the state of the binary_sensor manually to on from Developer Tools → States? If so, this is not going to work, this will only temporarily ovverride the state of the sensor and the attributes also won’t appear.
You need to wait for the sensor to change the state by itself, then you’ll also have the attributes and your notification should work.

Yes, I updated the info, something is off:

binary_sensor:
  - platform: meteoalarm
    country: "NL"
    province: "Limburg"
    language: "ne"

Works!

binary_sensor:
  - platform: meteoalarm
    country: "BE"
    province: "Limburg"
    language: "ne"

Not. Weird, it excist: https://www.meteoalarm.eu/ne_NL/0/0/BE007-Limburg%20/%20Limbourg.html. Maybe something wrong in the conf?

@rolfberkenbosch maybe you know how I can fix this? :slight_smile:

and this is the issue, the service doesn’t deliver a spontaneous change, or even a manual update through the update_entity service. As example, I am still seeing the Flooding alerts while there has been a snow alert for 2 days now. It must have something to do with the ‘effective’ and ‘expires’ attribute.

Also, we get a ‘wrong country’ error, while the conf hasn’t changed since original configuration, and the setting is 100% correct
@hjalmarr don’t you get wrong country errors in the log? Seems you are suffering from something like that

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 358, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
    await task
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/meteoalarm/binary_sensor.py", line 88, in update
    alert = self._api.get_alert()
  File "/usr/local/lib/python3.8/site-packages/meteoalertapi/meteoalertapi.py", line 26, in get_alert
    raise(WrongCountry())

Hi @Mariusthvdb no, I don’t get any error in my logs. I fixed it now for myself to use country NL with language NL and province Limburg. If I go to country BE, I only can use the FR language which I don’t want :slight_smile:

PS: I also tested it, and with the automation the push message will be send correctly. But I hope I can somehow use the ne language?

I wouldn’t know sorry, but it seems you really want your info to be geo-locationally correct, first of all and language is of secondary importance.

You should raise an issue on the integration though, maybe it is a core HA thing. If its on the server Meteoalarm side of things, I fear there’s nothing much that ca be done

If the info you get back is bi-lingual, can’t you template the dutch part? It’s what I do on the Weatherbit icon that is bilingual too:

  - type: conditional
    conditions:
      - entity: binary_sensor.weatherbit_alert
        state: 'on'
    card:
      type: markdown
      content: >
        ## <font color= red> {{state_attr('binary_sensor.weatherbit_alert','Title')}}</font>

        <font color= green> **Severity:**</font> <font color= grey> {{state_attr('binary_sensor.weatherbit_alert','Severity')}} </font>

        <font color= green> **Description:**</font>

        <font color= grey> {{state_attr('binary_sensor.weatherbit_alert','Description').split('english')[0]}} </font>

        <font color= green> {{state_attr('sensor.weatherbit_weather_alerts','attribution')}}</font>

Hi, thanks for your replies :D.
This fixed it for me: https://github.com/xlcnd/meteoalarmeu. Happy :smiley:

o nice, hadn’t seen that before. Though, I wonder what the advantage over the core integration would be considering the identical issues described in the disclaimer:

If by any reason the server becames unavailable or sends an error status (and this happens a lot with meteoalarm.eu!) the sensor becomes unavailable too , if in the next update the server is ok, it becomes available again .

Hi

I also don’t understand what the correct settings are to get a Belgian Province.

When replacing ‘region’ by ‘province’ I get an error validation the config.
So Belgium needs a region.

So I tried ‘BE002’ as region (= Province ‘Antwerpen’).
I tried ‘Antwerpen’ and ‘002’.

I keep getting an error in the log file that I have to check the site for the correct region name.
I just don’t know where to look.

Any help from people in Belgium is appreciated.

The site is Antwerpen / Anvers. So the exact name of your region is “Antwerpen / Anvers”.

1 Like

Is best to use 'Antwerpen / Anvers'

Thanks !
It’s working.
Now I only have to add 'language: 'ne' I guess.

Do you, by accident, have an example on how visualize all this data in Lovelace?

What component are you using?!

Sorry, I don’t understand you question.
What component? Is there a specific component that I have to install extra?

What component (or integration) did you install? The built-in meteoalarm, the ‘custom component’ meteoalarmeu or other similar ‘custom component’? They have different configurations.

I installed it with HACS.
When I click repository I’m forwarded to
https://github.com/xlcnd/meteoalarmeu

Seems this is you :slight_smile:

Funny, I didn’t know I was talking to the creator :slight_smile:

So its meteolarmeu. So all you need is to put in you config:

binary_sensor:
- platform: meteoalarmeu
  country: 'BE'
  region: 'Antwerpen / Anvers'

No language and other things that belong to other components.

Thanks
I was hoping to get only the Dutch message.
Seems that in Belgium you get both NL + FR in one message.

Still, thank you for this component !

But you can use something like this

      message: >
        {{ state_attr('binary_sensor.meteoalarmeu', 'message').split('français')[0] | replace('nederlands: ', '') | trim }}

to get the message in ‘nederlands’.

1 Like

yes templating to the rescue, as posted above Meteoalarm push message don't work using another example.