Buienalarm custom_component

Many thanks Giel!
I just want to correct myself as for the average I forgot to multiply by 60 minutes. The correct definition is:
precipitation_forecast_average: The total mentioned above divided by 15 minutes (therefore shown in mm/h) multiplied by 60 minutes.

These are the definitions I created for myself:
- temperature #what is the temperature right now
- precipitation #How hard it is raining right now (shown in mm/h). This is not affected by timeframe.
- precipitation_forecast_average #How much it will rain in total between right now and selected timeframe (in mm).
- precipitation_forecast_total #The total mentioned above divided by timeframe and multiplied by 60 minutes (therefore shown in mm/h)
- next_rain_forecast #-1 means no rain forecast within timeframe, 0 means it is currently raining, N means rain is forecast within N minutes. Impact of timeframe: if you set timeframe to 15 and it will rain in 16 minutes, the value will be -1 and then become 15 one minute later.

is there a way to get the times in the further? as the timing now doesn’t make sense…

exactly this. I’m looking for a graph which can display the upcoming rain, like the android app does.

e.g.:

tried several thins, but i don’t want the iframe work-around…

See here: Custom UI: Buienradar rain forecast graph
Best to use Spudjes updated version, down in the thread.

I have just installed this component a few days ago and noticed something odd.

It almost seems like the next_rain_forecast is always showing a value of “2021 min.” when rain is forecasted and it shows “Unknown” when there is no rain.

Has anyone seen this before? Any thoughts?

1 Like

Same here i reverted back to version 1.6

I am getting a lot of Bad Gateway errors in the log. Anyone else getting this?

Logger: custom_components.buienalarm
Source: helpers/update_coordinator.py:200
Integration: buienalarm (documentation)
First occurred: July 31, 2021, 13:18:10 (113 occurrences)
Last logged: 08:23:23

Same problem here, uninstall for now It makes HA very slow

Is there a solution on how @JJFourie did the bottom part of his setup with the picture element?

Hi I`m really new with this. I have installed buienalarm via ssh and the custom component via hacs. I also added the sensor template in configuration.yaml however am getting an error on restart:

ValueError: Template error: as_timestamp got invalid input 'unknown' when rendering template '{% if as_timestamp(states('sensor.buienalarm_next_rain_forecast')) %}
  {{ ( ( as_timestamp(states('sensor.buienalarm_next_rain_forecast')) - as_timestamp(now()) ) / 60 ) | round }}
{% else %}
  {{ states('nonexistent') }}
{% endif %}' but no default was specified

No clue what I did wrong.

@Culemsao
In my configuration.yaml file I have an entry

template: !include templates.yaml

In that templates.yaml file I’ve created the following:

- sensor:
    - name: "Buienalarm Next rain forecast (min)"
      unique_id: buienalarm_next_rain_forecast
      device_class: duration
      unit_of_measurement: m
      state: >
        {% if states('sensor.buienalarm_next_rain_forecast')=="unknown" %}
          {{ 0.0 }}
        {% else %}
          {{((as_timestamp(states('sensor.buienalarm_next_rain_forecast'))-as_timestamp(now()))/60)|round(2)}}
        {% endif %}
      icon: >
        {% if states('sensor.buienalarm_next_rain_forecast')=='unknown' %}
        mdi:weather-cloudy
        {% else %}
        mdi:weather-rainy
        {% endif %}

If your configuration.yaml entry is like “template:” then you create the sensor under that “branch” like such:

template:
  - sensor:
      - name: "Buienalarm Next rain forecast (min)"
        unique_id: buienalarm_next_rain_forecast
        device_class: duration
        unit_of_measurement: m
        state: >
          {% if states('sensor.buienalarm_next_rain_forecast')=="unknown" %}
            {{ 0.0 }}
          {% else %}
            {{((as_timestamp(states('sensor.buienalarm_next_rain_forecast'))-as_timestamp(now()))/60)|round(2)}}
          {% endif %}
        icon: >
          {% if states('sensor.buienalarm_next_rain_forecast')=='unknown' %}
          mdi:weather-cloudy
          {% else %}
          mdi:weather-rainy
          {% endif %}

Hi all,

I’m also really new to Home Assistant. But I’d really like the integration of Buienalarm. Anybody created a good automation on this sensor to check if it will go rain? I don’t want to be disturbed via messages (notify service) every minute of course when it will start raining :slight_smile:

Hopefully somebody has a good idea or has something implemented already.

Regards,
Pieter

i am confused…
in my configuration.yaml file i have added:

sensor:
- platform: buienalarm
  timeframe: 30
  name: buienalarm
  scan_interval: 60
  monitored_conditions:
    - temperature
    - precipitation
    - precipitation_forecast_average
    - precipitation_forecast_total
    - next_rain_forecast

that is giving me a sensors:
sensor.neerslag_buienalarm_regen_data

but when i look at states in developer tools i can’t find anything about the list in the yaml file
- temperature
- precipitation
- precipitation_forecast_average
- precipitation_forecast_total
- next_rain_forecast

also when i make a card i don;t see any data mentioned above i can only select that sensor.neerslag_buienalarm_regen_data.

can anyone point me into the right direction?

Seeing the “neerslag_” prefix, that sounds more like the neerslag app sensor

buienalarm sensor should have " sensor.buienalarm_{monitored_condition} ."

die heb ik ook…

mmm dan heeft hij e.e.a. niet goed in geladen denk ik.

image

ik heb de files in de directory

krijg ook deze foutmelding

Can you show your configuration.yml? I thnk issue roots from there.

#   ==================== WASMACHINE / DROGER  ===================
sensor:
  - platform: filter
    name: "Wasmachine average 2min"
    entity_id: sensor.sonoff_1002270ff8_power 
    filters:
      - filter: time_simple_moving_average
        window_size: "00:02"
  - platform: filter
    name: "Droger average 2min"
    entity_id: sensor.sonoff_1002270091_power
    filters:
      - filter: time_simple_moving_average
        window_size: "00:02"

#   ==================== BUIENALARM  ===================
  - platform: buienalarm
    timeframe: 15
    name: buienalarm
    #scan_interval: 60
    monitored_conditions:
      - temperature
      - precipitation 
      - precipitation_forecast_average
      - precipitation_forecast_total
      - next_rain_forecas