Hello!
As it happens I’m trying to achieve same kind of thing with rest.
My wfs request link is like this and returns beautiful xml for Hämeenlinna weather station:
https://opendata.fmi.fi/wfs/fin?service=WFS&version=2.0.0&request=getFeature&storedquery_id=fmi::observations::weather::timevaluepair&place=H%C3%A4meenlinna¶meters=t2m&timezone=Europe/Helsinki×tep=30
I installed xml->json converter and did some cleaning and got a file like this:
{
"wfs:FeatureCollection":{
"wfs:member":{
"omso:PointTimeSeriesObservation":{
"om:featureOfInterest":{
"sams:SF_SpatialSamplingFeature":{
"sam:sampledFeature":{
"target:LocationCollection":{
"target:member":{
"target:Location":{
"gml:identifier":{
},
"gml:name":[
{
"#text":"Hämeenlinna ""Katinen",
"@codeSpace":"http://xml.fmi.fi/namespace/locationcode/name"
},
{
"#text":"-16000125",
"@codeSpace":"http://xml.fmi.fi/namespace/locationcode/geoid"
},
{
"#text":"2754",
"@codeSpace":"http://xml.fmi.fi/namespace/locationcode/wmo"
}
],
"target:region":{
"#text":"Hämeenlinna",
"@codeSpace":"http://xml.fmi.fi/namespace/location/region"
},
"target:representativePoint":{
"@xlink:href":"#point-fmisid-101150-1-1-t2m"
}
}
}
}
},
"sams:shape":{
"gml:Point":{
"@gml:id":"point-fmisid-101150-1-1-t2m",
"@srsDimension":"2",
"@srsName":"http://www.opengis.net/def/crs/EPSG/0/4258",
"gml:name":"Hämeenlinna ""Katinen",
"gml:pos":"60.99920 ""24.49163"
}
}
}
},
"om:observedProperty":{
"@xlink:href":"http://opendata.fmi.fi/meta?observableProperty=observation¶m=t2m&language=fin"
},
"om:parameter":{
"om:NamedValue":{
"om:name":{
"@xlink:href":"https://inspire.ec.europa.eu/codeList/ProcessParameterValue/value/groundObservation/observationIntent"
},
"om:value":"atmosphere"
}
},
"om:phenomenonTime":{
"gml:TimePeriod":{
"@gml:id":"time1-1-1",
"gml:beginPosition":"2025-02-15T13:54:00Z",
"gml:endPosition":"2025-02-16T01:54:00Z"
}
},
"om:procedure":{
"@xlink:href":"http://xml.fmi.fi/inspire/process/opendata"
},
"om:result":{
"wml2:MeasurementTimeseries":{
"@gml:id":"obs-obs-1-1-t2m",
"wml2:point":[
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T14:00:00Z",
"wml2:value":"-7.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T14:10:00Z",
"wml2:value":"-7.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T14:20:00Z",
"wml2:value":"-7.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T14:30:00Z",
"wml2:value":"-7.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T14:40:00Z",
"wml2:value":"-7.8"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T14:50:00Z",
"wml2:value":"-7.8"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T15:00:00Z",
"wml2:value":"-8.0"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T15:10:00Z",
"wml2:value":"-8.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T15:20:00Z",
"wml2:value":"-8.3"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T15:30:00Z",
"wml2:value":"-8.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T15:40:00Z",
"wml2:value":"-8.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T15:50:00Z",
"wml2:value":"-8.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T16:00:00Z",
"wml2:value":"-8.9"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T16:10:00Z",
"wml2:value":"-9.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T16:20:00Z",
"wml2:value":"-9.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T16:30:00Z",
"wml2:value":"-9.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T16:40:00Z",
"wml2:value":"-8.9"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T16:50:00Z",
"wml2:value":"-8.8"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T17:00:00Z",
"wml2:value":"-8.8"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T17:10:00Z",
"wml2:value":"-8.8"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T17:20:00Z",
"wml2:value":"-8.8"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T17:30:00Z",
"wml2:value":"-8.9"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T17:40:00Z",
"wml2:value":"-9.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T17:50:00Z",
"wml2:value":"-9.3"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T18:00:00Z",
"wml2:value":"-9.3"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T18:10:00Z",
"wml2:value":"-9.4"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T18:20:00Z",
"wml2:value":"-9.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T18:30:00Z",
"wml2:value":"-9.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T18:40:00Z",
"wml2:value":"-9.8"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T18:50:00Z",
"wml2:value":"-10.0"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T19:00:00Z",
"wml2:value":"-10.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T19:10:00Z",
"wml2:value":"-10.2"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T19:20:00Z",
"wml2:value":"-10.4"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T19:30:00Z",
"wml2:value":"-10.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T19:40:00Z",
"wml2:value":"-10.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T19:50:00Z",
"wml2:value":"-10.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T20:00:00Z",
"wml2:value":"-10.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T20:10:00Z",
"wml2:value":"-10.8"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T20:20:00Z",
"wml2:value":"-11.0"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T20:30:00Z",
"wml2:value":"-11.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T20:40:00Z",
"wml2:value":"-11.2"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T20:50:00Z",
"wml2:value":"-11.2"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T21:00:00Z",
"wml2:value":"-11.3"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T21:10:00Z",
"wml2:value":"-11.2"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T21:20:00Z",
"wml2:value":"-11.3"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T21:30:00Z",
"wml2:value":"-11.4"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T21:40:00Z",
"wml2:value":"-11.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T21:50:00Z",
"wml2:value":"-11.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T22:00:00Z",
"wml2:value":"-11.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T22:10:00Z",
"wml2:value":"-11.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T22:20:00Z",
"wml2:value":"-11.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T22:30:00Z",
"wml2:value":"-11.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T22:40:00Z",
"wml2:value":"-11.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T22:50:00Z",
"wml2:value":"-11.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T23:00:00Z",
"wml2:value":"-11.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T23:10:00Z",
"wml2:value":"-11.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T23:20:00Z",
"wml2:value":"-11.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T23:30:00Z",
"wml2:value":"-11.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T23:40:00Z",
"wml2:value":"-11.9"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-15T23:50:00Z",
"wml2:value":"-11.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T00:00:00Z",
"wml2:value":"-11.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T00:10:00Z",
"wml2:value":"-11.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T00:20:00Z",
"wml2:value":"-11.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T00:30:00Z",
"wml2:value":"-11.1"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T00:40:00Z",
"wml2:value":"-11.2"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T00:50:00Z",
"wml2:value":"-11.3"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T01:00:00Z",
"wml2:value":"-11.3"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T01:10:00Z",
"wml2:value":"-11.4"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T01:20:00Z",
"wml2:value":"-11.5"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T01:30:00Z",
"wml2:value":"-11.6"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T01:40:00Z",
"wml2:value":"-11.7"
}
},
{
"wml2:MeasurementTVP":{
"wml2:time":"2025-02-16T01:50:00Z",
"wml2:value":"-11.9"
}
}
]
}
},
"om:resultTime":{
"gml:TimeInstant":{
"@gml:id":"time2-1-1",
"gml:timePosition":"2025-02-16T01:54:00Z"
}
}
}
}
}
}
I would like to make a sensor out of the last (most recent) observation. This is what I tried so far:
sensor:
- platform: rest
resource: "https://opendata.fmi.fi/wfs/fin?service=WFS&version=2.0.0&request=getFeature&storedquery_id=fmi::observations::weather::timevaluepair&place=H%C3%A4meenlinna¶meters=t2m&timezone=Europe/Helsinki×tep=30"
name: FMI Temperature
unique_id: fmi_temperature
scan_interval: 600 # 10 minutes
value_template: '{{ value_json["wfs:FeatureCollection"]["wfs:member"]["omso:PointTimeSeriesObservation"]["om:featureOfInterest"]["om:result"]["wml2:MeasurementTimeseries"]["wml2:point"]["wml2:MeasurementTVP"]["wml2:value"] }}'
New observation is made every 10 min so that’s why scan_interval is set to 600 sec. I managed to load as much as nothing with this…
If anyone else has played with this, any help would be appreciated 
Regards,
Juho