Hi all – I hope this is the right forum. Avid HA user here, not smart enough to create my own plugins. Onthesnow is a great site that tracks ski conditions around the world, and has a REST API with plenty of documentation. For those of us, could be an awesome addition for a dashboard, showing local stats on particular ski resorts.
Hoping someone finds this as awesome as I do… picturing a lovelace card similar to ‘weather’ showing ski conditions for a resort, plenty of fields available, particularly ahead of ski season!
Im trying to develop something based on this information.
but unfortunately it’s impossible to get access to this API.
In order to access you need create an account and generate your token.
and no one is responding there for account creation.
I am able to successfully query the API and receive a response, see below. However, the response returns “8in” or “82in” as an example, is there a way to strip the “in” so we can get it into a proper numeric format?
- resource: https://ski-resort-forecast.p.rapidapi.com/Winter%20Park/snowConditions
method: GET
scan_interval: 86400
headers:
X-RapidAPI-Key: "MY API KEY"
X-RapidAPI-Host: "ski-resort-forecast.p.rapidapi.com"
params:
units: "i"
sensor:
- name: "Winter Park Fresh Snow"
value_template: "{{ value_json.freshSnowfall }}"
#unit_of_measurement: Degrees
unique_id: a2b80ad8-4c68-46e4-a755-fe46dfa2b930
Debug log of response:
2024-04-07 11:02:59.144 DEBUG (MainThread) [homeassistant.components.rest.data] Data fetched from resource: {"topSnowDepth":"82in","botSnowDepth":"81in","freshSnowfall":"8in","lastSnowfallDate":"6 Apr 2024","basicInfo":{"region":"USA - Colorado","name":"Winter Park","url":"https://www.snow-forecast.com/resorts/Winter-Park/6day/top","topLiftElevation":"12054ft","midLiftElevation":"10525ft","botLiftElevation":"8997ft","lat":"-105.77","lon":"39.88"}}
Round two, here is my final solution using the RapidAPI ski forecast – if someone can help me format the date of last snow into a proper date format, that would be great! The API (free) itself can be found at: Ski Resort Forecast API Documentation (joeykyber) | RapidAPI
Nice – I was able to get in 18 days this year, not bad for me will count that as a win. Looks like the API I am pulling references https://www.snow-forecast.com as the source if you’re curious. Would be cool to get something like this built in.