Hi, hope someone could help me:
I try to get some Data into a sensor from a HTML Webseite with platform srape. I try for some hours and have absolutely no luck…
URL is:
https://api.forecast.solar/check/51.15/10.45
my current sensor is:
I can’t get any data in my sensor, tried with many selectors and fields…
thanks and best regards
matt
I’m not quite sure what you are trying to retrieve, but if you want to use the check location API, then you are on the wrong path with the scrape
integration. The API call returns JSON, so please use the rest
integration instead.
This for example returns the location information:
rest:
- resource: "https://api.forecast.solar/check/51.15/10.45"
scan_interval: 600
sensor:
- name: "Forecast"
value_template: "{{ value_json.result.place }}"
2 Likes
MANY THANKS!!
this helped me a lot!
your example shows me the way to get all the data I wanted
best regards
matt
1 Like
For which case would you like to retrieve the place value from forecast.solar? (out of curiosity)
Haha, that was just a example
I wanted the forecast for the next 6 days (have an API key). Just used the Demo URL to find out how can i extract the data
Mostly for you to check if the location is correct
Had locations, which was valid so far, but latitude and longitude was switched
1 Like