nuki47
(Nuki47)
February 27, 2022, 11:55am
1
I am a beginner with scrape…is there a way to get the actual value of a table into the sensor value?
Code (but I doesn’t work)
- platform: scrape
name: pegelstand
resource: https://hydro.ooe.gv.at/#/overview/Wasserstand/station/3720/Fraham?mode=map&selected=Wasserstand
select: ".body > div:nth-child(1) > div:nth-child(2)"
koying
(Chris B)
February 27, 2022, 1:25pm
2
You can get a plain json to use with a rest sensor with:
https://hydro.ooe.gv.at/daten/internet/stations/OG/3720/S/week.json
nuki47
(Nuki47)
February 27, 2022, 4:25pm
3
ok, thanks. But how can I get the actual/latest value with the rest sensor?
koying
(Chris B)
February 27, 2022, 4:46pm
4
value_tempate: '{{ value_json[0]["data"][value_json[0]["rows"]|int -1][1] }}'
1 Like
jolas
January 10, 2023, 8:32pm
5
@koying could you please write the value template value (value_json…) for the value ‘#L1_C ’ which is a sensor collecting values from an ultrasonic?
Thank you in advance!