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"