#how to keep/find the correct json selector in this rest sensor

4 messages · Page 1 of 1 (latest)

late escarp
#

using resource https://data.buienradar.nl/2.0/feed/json, I am looking for the station Woensdrecht, and find it at

rest:

  - resource: https://data.buienradar.nl/2.0/feed/json
    scan_interval: 86400
    sensor:
      - unique_id: rest_sensor_buienradar_woensdrecht
        name: Buienradar Woensdrecht
        value_template: >
          {{value_json.actual.stationmeasurements.49.regio}}
        json_attributes_path: '$.actual.stationmeasurements.49'
        json_attributes:
          - timestamp
          - weatherdescription
          - etc

however, the station number changes almost daily, so my sensors go un available, or show data for another station altogether.... Is there another way I can create that sensor, and make it auto select the correct station Id?
fwiw, this is the full json for the station:

{"$id":"53","stationid":6340,
 "stationname":"Meetstation Woensdrecht",
 "lat":51.45,"lon":4.33,
 "regio":"Woensdrecht","timestamp":"2025-02-18T07:30:00",
 "weatherdescription":"Zwaar bewolkt",
 "iconurl":"https://www.buienradar.nl/resources/images/icons/weather/30x30/cc.png",
 "fullIconUrl":"https://www.buienradar.nl/resources/images/icons/weather/96x96/CC.png",
 "graphUrl":"https://www.buienradar.nl/nederland/weerbericht/weergrafieken/cc",
 "winddirection":"O","airpressure":1024.7,"temperature":-5.0,
 "groundtemperature":-6.7,"feeltemperature":-9.5,
 "visibility":12300.0,"windgusts":3.8,
 "windspeed":3.0,"windspeedBft":2,
 "humidity":86.0,"precipitation":0.0,
 "rainFallLast24Hour":0.0,"rainFallLastHour":0.0,
 "winddirectiondegrees":80}
#

how to keep/find the correct json selector in this rest sensor

late escarp
#

check today, it's back to 38 ....