home-assistant-skisporet

Adds a sensor to get the last time a ski track was prepared according to skisporet.no

image

Open your Home Assistant instance and start setting up a new integration.

BREAKING CHANGE

Warning

Due to changes at skisporet.no some attributes are no longer available, and others have appeared.

You also need to set this integration up from scratch again from the UI. Old yaml-config is no longer supported.

Install

This can be installed manually or through HACS

Via HACS

  • Open HACS
  • Click "Integrations"
  • Click the three dots in the upper right corner and select "Custom Repositiories"
  • Add the link to this repo with type "Integration"
  • Click "Download this repository with HACS" in the new "Skisporet" card in HACS
  • Restart Home Assistant

Manual installation

  • Create a new folder under config/custom_components called "skisporet"
  • Copy all the files from this repo to the new folder

Config

The integration is set up from the GUI in HA

First, you need the share-link from skisporet.no

  • Open the map in a browser https://skisporet.no/
  • Click on the track you want the sensor to follow
  • Click the "Share" icon at the upper left corner of the popup
  • Click "Kopier lenke"

Then go to HomeAssistant, Settings, Devices and Services.

  • Click "Add integration"
  • Search for "Skisporet"
  • Add the URL you copied, and give this track a name
  • Click "Submit"

If you have set up "My Homeassistant", you can use this link:

Open your Home Assistant instance and start setting up a new integration.

Note

Skisporet reports last preparation as something like "X days and Y hours ago". To try to keep a consistent sensor value, this "timestamp" is converted to a datetime-object with minutes and seconds set to zero.

If last prep was more than 14 days ago, skipsoret only reports it as "More than 14 days ago". This integration will the always set the timestamp to Jan. 1. 2000. when it receives that update.