Belgium weather provider: IRM / KMI (meteo.be)

Hello,

Home Assistant is fairly new for me so i’m struggling with what I want to make and I’m not even sure if it would work with this integration.

We have around 7 screens/blinds around the house. Is there a way to create an automation that will open the blinds if there is rain expected within 15 minutes for example?

If it will start to rain within 15 minutes, it will trigger an automation to check if the blinds are closed or not. If they are closed, it will open them so that they don’t get wet.

Is it possible with this integration?

I monitored the “Volgende Waarschuwing/Next_warning” entity because I thought this would give me the value rain/snow/… But this is on a “unkown” state since I installed this integration 3 days ago.

Thanks!

@jdejaegh is this possible with your integration?

I am trying to make a sensor to display the amount of rain which fall today.
Any idea how to do this?

I tried some templates, but without succes

Hi,

That is expected: the warnings are for more extreme weather events like strong wind, heavy rainfall, thunder and so on. This is not meant to show when usual rain will fall.

What follows is not an automation, but a template sensor for the amount of rain expected in the next 20–30 minutes. From that, you should have a good starting point for your automation (monitor state change of this sensor, write your logic for the blinds).

Adding this in your configuration.yml file will create a new template sensor. This sensor will be updated every 10 minutes, on Home Assistant boot and whenever the weather state changes. It will fetch rain forecast from the radar and sum the forecast for the 3 next 10-minutes intervals. Note that the first interval will always be the current 10-minutes (e.g. at 11:01, the first interval will be 11:00 to 11:10).

template:
  - trigger:
      - platform: state
        entity_id: weather.home
      - platform: homeassistant
        event: start
      - platform: time_pattern
        minutes: 10
    action:
      - service: irm_kmi.get_forecasts_radar
        data:
          include_past_forecasts: false
        target:
          entity_id: weather.home
        response_variable: response
    sensor:
      - name: Rain in the next 20 minutes
        unique_id: rain_20_minutes_template
        state: "{{ response['weather.home'][:3] | map(attribute='native_precipitation') | sum }}"
        unit_of_measurement: mm

Make sure that weather.home is replaced with your actual IRM / KIM weather entity.

Hope this helps :slight_smile:

1 Like

Assuming your weather entity is weather.home, I would go with this. It gets the amount of rain from the daily forecast for today.

template:
  - trigger:
      - platform: state
        entity_id: weather.home
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.home
        response_variable: response
    sensor:
      - name: Rain today
        unique_id: rain_today
        state: "{{ response['weather.home'].forecast[0].get('precipitation') }}"
        unit_of_measurement: mm
1 Like

Looks perfect! Thanks for the extra info!

I’ve been playing with what I’ve read here to get the forecast temperature of today. I’m close, but I can’t seem to figure out what I’m doing wrong.

I’ve added this to my configuration.yaml:

template:
  - trigger:
      - platform: state
        entity_id: weather.mystreet
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.mystreet
        response_variable: response
    sensor:
      - name: Temperature today
        unique_id: temperature_today
        state: "{{ response['weather.mystreet'].forecast[0].temperature }}"
        unit_of_measurement: °C

I’m really trying to understand what it does:

  • The triggers are when my entity changes state or when HA starts
  • The service references to what I can find here, I use the type daily and the returned data goes into the variable response
  • Lastly I create a sensor with id temperature_today with the temperature value of the first forecast

This all seems correct with my current knowledge, I just can’t figure out what I’m doing wrong. I see the sensor.temperature_today in my HA, but the state is unknown.

Anyone with a little push in the right direction?

Depending on what time you get the forecast there is no max temperature available for the current day. Actually I’m struggling with the same issue.

It’s native to the KMI app. If you check in the evening you can see the night (min) temperature, but the max from the current day is gone. If you check during the day a max and min for the current day will be available.

That explains! At least I’ve learned how it works now. :grinning: