Radiation detector platform

Here the solution, at least for Germany. I added following code in my sensor.yaml config.

- platform: rest
  name: Radioaktivität 
  resource: "https://www.imis.bfs.de/ogc/opendata/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=opendata:odlinfo_odl_1h_latest&outputFormat=application/json"
  method: GET
  scan_interval: 600  # Sekunden
  value_template: >-
    {% for station in value_json.features %}
      {% if station.properties.name == "HIER EURE MESSSTATION AUS DER CSV EINFÜGEN" %}
        {{ station.properties.value }}
      {% endif %}
    {% endfor %}
  unit_of_measurement: "nSv/h"
1 Like

Thank you for the code. It works for one station. I want to read the values of more than one station (see code as example). When I use the code several time, I get only a value for the last in the list.
Where is my mistake???

  - platform: rest
    name: Radioaktivität München
    resource: "https://www.imis.bfs.de/ogc/opendata/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=opendata:odlinfo_odl_1h_latest&outputFormat=application/json"
    method: GET
    scan_interval: 600  # Sekunden
    value_template: >-
      {% for station in value_json.features %}
        {% if station.properties.name == "Radioaktivität München Neuhausen" %}
          {{ station.properties.value }}
        {% endif %}
      {% endfor %}
    unit_of_measurement: "nSv/h"
  - platform: rest
    name: Radioaktivität Haidmühle
    resource: "https://www.imis.bfs.de/ogc/opendata/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=opendata:odlinfo_odl_1h_latest&outputFormat=application/json"
    method: GET
    scan_interval: 600  # Sekunden
    value_template: >-
      {% for station in value_json.features %}
        {% if station.properties.name == "Haidmühle" %}
          {{ station.properties.value }}
        {% endif %}
      {% endfor %}
    unit_of_measurement: "nSv/h"

Sorry, found my mistake myself. I had a wrong “Radioaktivität” within one station name.
Solved!!!

Works perfect now.

Thank you for your work. Germany is ok now.
Hope we will see solution for other EU countries.

One small thing. In the code you use nSv/h but the site use µSv/h
so my modification is multiple by 1000 the value

    value_template: >-
      {% for station in value_json.features %}
        {% if station.properties.name == "Frankfurt/Oder" %}
          {{ station.properties.value | float * 1000}}
        {% endif %}
      {% endfor %}
    unit_of_measurement: "nSv/h"

Anyway, thanx again for the good work!

Hi!

Please, what is the current possibility to follow 1 sensor in finland ? I’m little lost to how to do it.

So it looks like they blocked that URL. However it looks like the map here:

is using the the following endpoint:
https://remap.jrc.ec.europa.eu/api/timeseries/v1/stations/timeseries/20250628000000/20250705094903?codes=BG0026

Has anyone figured out how to use that one yet? Meanwhile if I manage to put together some sensor I’ll post it here.

Hi community members,
I am a new bee in programming yaml. Please have a look on my code:
Thank you in advance

sensor:
- platform: rest
  name: Radioaktivität 
  resource: "https://www.imis.bfs.de/ogc/opendata/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=opendata:odlinfo_odl_1h_latest&outputFormat=application/json"
  method: GET
  scan_interval: 600  # Sekunden
  value_template: >-
    {% for station in value_json.features %}
      {% if station.properties.name == "Burscheid-Hilgen" %}
        {{ station.properties.value }}
      {% endif %}
    {% endfor %}
  unit_of_measurement: "nSv/h"

I always get a failure in Homeassistant:

‘value_json’ is undefined

Where is my mistake?

Thank you in advance
Bernd