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.
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
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:
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 .
What component (or integration) did you install? The built-in meteoalarm, the ‘custom component’ meteoalarmeu or other similar ‘custom component’? They have different configurations.