From 22add7c9fb41e549417553927f6b8cf650439f08 Mon Sep 17 00:00:00 2001 From: Heine Furubotten Date: Fri, 30 Nov 2018 08:29:41 +0100 Subject: [PATCH] Documentation for entur public transport sensor (#6643) * Documentation for entur public transport sensor * :pencil2: Tweaks * Updated for changes in sensor code. - Show on map configuration - Expand platforms under stops. - Bumped version number. * renamed file and updated for changes in config on the sensor. * bumped version number and minor tweaks. * Update 'ha_release' --- .../sensor.entur_public_transport.markdown | 81 +++++++++++++++++++ source/images/supported_brands/entur.svg | 21 +++++ 2 files changed, 102 insertions(+) create mode 100644 source/_components/sensor.entur_public_transport.markdown create mode 100644 source/images/supported_brands/entur.svg diff --git a/source/_components/sensor.entur_public_transport.markdown b/source/_components/sensor.entur_public_transport.markdown new file mode 100644 index 000000000000..b42557d29d3a --- /dev/null +++ b/source/_components/sensor.entur_public_transport.markdown @@ -0,0 +1,81 @@ +--- +layout: page +title: "Entur public transport" +description: "Instructions for how to set up monitoring of public transport departures in Norway." +date: 2018-10-09 17:15 +sidebar: true +comments: false +sharing: true +footer: true +logo: entur.svg +ha_category: Transport +ha_release: 0.84 +ha_iot_class: "Cloud Polling" +--- + +The `entur_public_transport` sensor gives real-time departure information for the next two departures from any bus stop, car ferry quay, train station, airport and person ferries quay in Norway. + +For each stop place given in the configuration, a sensor will be mounted for that stop place. It will give remaining minutes until the nearest departure in the state, but also next departure in the attributes. Information about if the departure is monitored in real-time or is from scheduled times, and how many minutes there is in delays, are included as well. + +Real-time data is fetched from [Entur](https://www.entur.org). Entur is a service which collects and delivers information about all public transport available in Norway under an [open source license](https://data.norge.no/nlod/no). + +## {% linkable_title Configuration %} + +```yaml +# Example configuration.yaml entry +sensor: + - platform: entur_public_transport + stop_ids: + - 'STOP_ID_1' + - 'STOP_ID_2' +``` + +{% configuration %} +stop_ids: + description: List of stop places or platforms to monitor departure times from. + required: true + type: list +name: + description: Override parts of the sensor name. + required: false + type: string + default: Entur +expand_platforms: + description: If additional sensors should be created for each platform under a stop place. + required: false + type: boolean + default: true +show_on_map: + description: If platform locations should be added to the sensor, and the map. + required: false + type: boolean + default: false +{% endconfiguration %} + +## {% linkable_title Example usage %} + +```yaml +# Example configuration.yaml entry +sensor: + - platform: entur_public_transport + name: Transport + expand_platforms: true + show_on_map: true + stop_ids: + - 'NSR:StopPlace:548' # Bergen train station + - 'NSR:StopPlace:737' # Trondheim airport + - 'NSR:StopPlace:5850' # Grorud T bus stop + - 'NSR:StopPlace:58652' # Mortavika ferry + - 'NSR:StopPlace:27639' # Sør-Hidle quay + - 'NSR:Quay:48550' # Fiskepiren bus stop platform 1 +``` + +## {% linkable_title Obtaining a stop id %} + +[Entur's travel planer](https://en-tur.no) has a map of all stops used in Norway. Use the map to find the stops you're interested in. When you have found one of your stops, click on it. + +Now the web browser should contain an URL with the id in it. Such as this: + +`https://en-tur.no/nearby-stop-place-detail?id=NSR:StopPlace:32376` + +The stop id is the content after `id=` parameter in the url. Copy paste this into the configuration. diff --git a/source/images/supported_brands/entur.svg b/source/images/supported_brands/entur.svg new file mode 100644 index 000000000000..a64ca1543b88 --- /dev/null +++ b/source/images/supported_brands/entur.svg @@ -0,0 +1,21 @@ + + + + + + + + + + +