Is meteoalarm.eu down?

Too bad @rolfberkenbosch isn’t chiming in on this discussion. :cry:

Sorry, I was not logged in. I will look into it!

The problem that I’m facing right now is that the website is totally not responsive enough. I have send them several emails, but get 0 response back. I’m looking if we can setup a mirror of meteoalarm.eu. Does anyone has some knowledge how to do this ?

What did you mean with “Hope they also fix the attributes, or better said, the absence of attributes in the ‘Off’ state.”

What do you expect ?

thanks for getting back to this, I probably should have been more explicit, sorry for that…

using:

  - type: markdown
    content: >
      # <font color= grey> Weer Alarm Brabant:  [[ binary_sensor.meteoalarm_brabant.state ]] </font>

      ___

      **Alarm code**

      <font color= [[ sensor.weer_alarm.state ]]> - [[ sensor.weer_alarm.state ]] </font>

      <font color= [[ sensor.weer_alarm.state ]]> - [[ binary_sensor.meteoalarm_brabant.attributes.awareness_level ]] </font>

      <font color= [[ sensor.weer_alarm.state ]]> - [[ binary_sensor.meteoalarm_brabant.attributes.awareness_type ]] </font>

      **Headline**

      <font color= #4caf50> - [[ binary_sensor.meteoalarm_brabant.attributes.headline ]] </font>

      **Event**

      <font color= #4caf50> - [[ binary_sensor.meteoalarm_brabant.attributes.event ]] </font>

      **Status**

      <font color= #4caf50> - [[ binary_sensor.meteoalarm_brabant.attributes.description ]] </font>

      ___

renders:

35

because the attributes aren’t set when the binary_sensor is Off.

would be really nice if the attributes could be set to None, or some other informative setting.

Ive created a template sensor based on the meteo_alarm binary_sensor:

      weer_alarm:
        friendly_name: Weeralarm
        value_template: >
          {% if is_state('binary_sensor.meteoalarm_brabant','on') %}
          {% set code = state_attr('binary_sensor.meteoalarm_brabant','awareness_level').split(';')[1] %}
          {{code|title}}
          {% else %} Green
          {% endif %}
        icon_template: >
          {% if is_state('binary_sensor.meteoalarm_brabant','on') %}
          {% set code = state_attr('binary_sensor.meteoalarm_brabant','awareness_level').split(';')[0] %}
          {% else %} {% set code = '0' %} 
          {% endif %}
          {{'mdi:numeric-' + code + '-box'}}

and customizations:

    sensor.weer_alarm:
      templates:
        icon_color: >
          return state;

    binary_sensor.meteoalarm_brabant:
      friendly_name: Meteoalarm Brabant
      templates:
        icon_color: >
          return entities['sensor.weer_alarm'].state;

to help out somewhat, but it would be really nice if this could be done without all this extra coding :wink:

I will into it. I haven’t seen that meteoalarm has a standard XML output. I have created a loop that will give all the attributes back when there is an “weather alarm”. Not every country is giving back the same attributes, that’s why it makes it difficult to set all the attributes to none.

You can look if you can use jinja2 for you markdown. That will solve your problem.

I hope you can at least fix the issue that an entity currently is not created if the site is down when restarting HA. When timing out, you should at least create the sensor with an Unknown state, that will be updated as soon as the site is back online.

Thanks for having a look.

Issue though isn’t my markdown card but the sensor not having attributes. If no warning is issued it should optimally say so, and not be non-existent.
Hope you can find a way to do so.

Hi again,

got to report a remarkable difference between Hassio version on Meteo alarm.
in dev-template enter:

{{states.binary_sensor.meteoalarm_brabant.attributes}}

HA 95.4 gives:

{'language': 'en-GB', 'category': 'Met', 'event': 'Severe high-temperature warning', 'responseType': 'Monitor', 'urgency': 'Future', 'severity': 'Severe', 'certainty': 'Likely', 'effective': '2019-07-23T07:32:43+00:00', 'onset': '2019-07-23T07:00:00+00:00', 'expires': '2019-07-25T07:00:00+00:00', 'senderName': 'KNMI Royal Netherlands Meteorological Institute', 'headline': 'High-temperature - No warnings for Noord-Brabant - The Netherlands', 'description': 'Persistent heat.\nMaximumtemperatures today 30-34°C, Wednesday and Thursday 32-38°C.\nMinimum temperatures around 20°C.\nNationaal Hitteplan activated.\nBE PREPARED that high temperatures will  lead to health risks amongst vulnerable people like the elderly and very young.\nListen to and act upon advice from the authorities.', 'web': 'http://meteoalarm.eu/ne_NL/0/0/NL013-Noord-Brabant.html', 'contact': '[email protected]', 'awareness_type': '5; high-temperature', 'awareness_level': '3; orange; Severe', 'attribution': 'Information provided by MeteoAlarm.', 'friendly_name': 'Meteoalarm Brabant', 'icon': 'mdi:alert', 'device_class': 'safety', 'custom_ui_state_card': 'state-card-custom-ui', 'templates': OrderedDict([('icon_color', "return entities['sensor.weer_alarm'].state;\n")])}

while HA 96.3 gives:

{'language': 'en-GB', 'category': 'Met', 'event': 'Severe high-temperature warning', 'responseType': 'Monitor', 'urgency': 'Future', 'severity': 'Severe', 'certainty': 'Likely', 'effective': '2019-07-24T11:57:43+00:00', 'onset': '2019-07-24T11:00:00+00:00', 'expires': '2019-07-26T04:00:00+00:00', 'senderName': 'KNMI Royal Netherlands Meteorological Institute', 'headline': 'High-temperature - No warnings for Noord-Brabant - The Netherlands', 'description': 'Persistent heat.\nMaximumtemperatures today and Thursday 32-38°C, very locally even warmer.\nMinimum temperatures around 20°C.\nNationaal Hitteplan activated.\nBE PREPARED that high temperatures will  lead to health risks amongst vulnerable people e.g.\nthe elderly and very young.\nListen to and act upon advice from the authorities.', 'web': 'http://meteoalarm.eu/ne_NL/0/0/NL013-Noord-Brabant.html', 'contact': '[email protected]', 'attribution': 'Information provided by MeteoAlarm', 'friendly_name': 'Meteoalarm Brabant', 'device_class': 'safety', 'custom_ui_state_card': 'state-card-custom-ui', 'templates': OrderedDict([('icon_color', "return entities['sensor.weer_alarm'].state;\n")])}

rather important missing attributes are the awareness level and awareness type.

could you please check this is expected behavior @rolfberkenbosch ?

these attributes are of capital importance…

got to report a remarkable difference between Hassio version on Meteo alarm.

I didn’t know there was a HassIO version, I can’t see it in the add-on store, do you have a link to the HassIO version? Thanks

It’s an integration, not an add-on. https://www.home-assistant.io/components/meteoalarm/

The versione 0.1.6 meteoalertapi.py fixed the problem.
meteoalert-api
…but the version in Hass Is 0.1.5.

I don’t know if it’s enough to change the version in the manifest.JSON file of the component. I put everything in the custom_components/meteoalarm and it works

__init__.py
binary_sensor.py
manifest.json
meteoalertapi.py

so you see the attributes again: awareness level and type? thats great to hear, thanks to the dev (Rolf Berkenbosch) for the fix.

wouldn’t this be available with the next HA version/update? since it is a core integration now, it wouldn’t need adding it and a custom component?

Sure! But it has been fixed since 12 July 2019 :0)
They are a little late :O)
:stuck_out_tongue_winking_eye:

Hi @rolfberkenbosch,

since awareness_level still isn’t back, I need to rebuild my templates around attribute severity which shows always.

can’t find any documentation on the available severities on the Meteoalarm website or in the integration though, other than these color schedules:

11


At the moment I see severity: Moderate which is color yellow,

I take it Safe would be green…

would you know the names of the white (Unknown ?), orange (Severe?) and red ( Dangerous?) labels? With that I could create a little mapper in Jinja to get my template working again.

probably like this:

      weer_alarm:
        friendly_name: Weeralarm
        value_template: >
          {% if is_state('binary_sensor.meteoalarm_brabant','on') %}
          {% set param = state_attr('binary_sensor.meteoalarm_brabant','severity') %}
            {% if param == 'Safe' %} Green
            {% elif param == 'Moderate' %} Yellow
            {% elif param == 'Severe' %} Orange
            {% elif param == 'Dangerous' %} Red
            {% else %} White
            {% endif %}
          {% else %} Grey
          {% endif %}
        icon_template: >
          {% set state = states('sensor.weer_alarm') %}
          {% if state == 'Green' %} {% set code = '1' %}
          {% elif state == 'Yellow' %} {% set code = '2' %}
          {% elif state == 'Orange' %} {% set code = '3' %}
          {% elif state == 'Red' %} {% set code = '4' %}
          {% else %} {% set code = '0' %} 
          {% endif %}
          {{'mdi:numeric-' + code + '-box'}}

thanks for having a look

There are a few awareness levels:

  • 2; yellow; Moderate
  • 3; orange; Severe
  • 4; red; Extreme