From 72e5b86c0c139485a65e2837c8f7c1795100d4dd Mon Sep 17 00:00:00 2001 From: Heine Furubotten Date: Tue, 9 Oct 2018 19:03:29 +0200 Subject: [PATCH 1/6] Documentation for entur public transport sensor --- ...entur_public_transport_departures.markdown | 63 +++++++++++++++++++ source/images/supported_brands/entur.svg | 21 +++++++ 2 files changed, 84 insertions(+) create mode 100644 source/_components/sensor.entur_public_transport_departures.markdown create mode 100644 source/images/supported_brands/entur.svg diff --git a/source/_components/sensor.entur_public_transport_departures.markdown b/source/_components/sensor.entur_public_transport_departures.markdown new file mode 100644 index 000000000000..a1a36b692806 --- /dev/null +++ b/source/_components/sensor.entur_public_transport_departures.markdown @@ -0,0 +1,63 @@ +--- +layout: page +title: "Entur public transport" +description: "Instructions for how to set up monitoring of public transport departures in Norway." +date: 2018-09-01 17:15 +sidebar: true +comments: false +sharing: true +footer: true +logo: entur.svg +ha_category: Transport +ha_release: 0.80 +ha_iot_class: "Cloud Polling" +--- + +The `entur_public_transport` sensor gives realtime 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 nearest departure in the state, but also next departure in the attributes. Information about if the departure is monitored in realtime or is from scheduled times, and how many minues there is in delays, are included as well. + +Realtime 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 +{% endconfiguration %} + +## {% linkable_title Example usage %} + +```yaml +# Example configuration.yaml entry +sensor: + - platform: entur_public_transport + 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 a 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. \ No newline at end of file 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 @@ + + + + + + + + + + + From 0cb28e69c203de4b21acbf029d26a616d3824812 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 9 Oct 2018 19:38:17 +0200 Subject: [PATCH 2/6] :pencil2: Tweaks --- .../sensor.entur_public_transport_departures.markdown | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/_components/sensor.entur_public_transport_departures.markdown b/source/_components/sensor.entur_public_transport_departures.markdown index a1a36b692806..93e3736aedf3 100644 --- a/source/_components/sensor.entur_public_transport_departures.markdown +++ b/source/_components/sensor.entur_public_transport_departures.markdown @@ -13,11 +13,11 @@ ha_release: 0.80 ha_iot_class: "Cloud Polling" --- -The `entur_public_transport` sensor gives realtime departure information for the next two departures from any bus stop, car ferry quay, train station, airport and person ferries quay in Norway. +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 nearest departure in the state, but also next departure in the attributes. Information about if the departure is monitored in realtime or is from scheduled times, and how many minues there is in delays, are included as well. +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. -Realtime 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). +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 %} @@ -56,8 +56,8 @@ sensor: [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 a url with the id in it. Such as this: +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. \ No newline at end of file +The stop id is the content after id= parameter in the url. Copy paste this into the configuration. From 69040053a4e56faec07fc2f24d7a05a8ff4d41f4 Mon Sep 17 00:00:00 2001 From: Heine Furubotten Date: Fri, 19 Oct 2018 23:24:41 +0200 Subject: [PATCH 3/6] Updated for changes in sensor code. - Show on map configuration - Expand platforms under stops. - Bumped version number. --- ...or.entur_public_transport_departures.markdown | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source/_components/sensor.entur_public_transport_departures.markdown b/source/_components/sensor.entur_public_transport_departures.markdown index 93e3736aedf3..e596a286cd2f 100644 --- a/source/_components/sensor.entur_public_transport_departures.markdown +++ b/source/_components/sensor.entur_public_transport_departures.markdown @@ -2,14 +2,14 @@ layout: page title: "Entur public transport" description: "Instructions for how to set up monitoring of public transport departures in Norway." -date: 2018-09-01 17:15 +date: 2018-10-09 17:15 sidebar: true comments: false sharing: true footer: true logo: entur.svg ha_category: Transport -ha_release: 0.80 +ha_release: 0.81 ha_iot_class: "Cloud Polling" --- @@ -35,6 +35,16 @@ stop_ids: description: List of stop places or platforms to monitor departure times from. required: true type: list +expand_platforms: + description: If additional sensors should be created for each platform under a stop place. + required: false + type: boolean + default: true +add_to_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 %} @@ -43,6 +53,8 @@ stop_ids: # Example configuration.yaml entry sensor: - platform: entur_public_transport + expand_platforms: true + add_to_map: true stop_ids: - 'NSR:StopPlace:548' # Bergen train station - 'NSR:StopPlace:737' # Trondheim airport From abf8ab50177b02aaf241116e7f7c89b3a4318482 Mon Sep 17 00:00:00 2001 From: Heine Furubotten Date: Tue, 13 Nov 2018 20:22:26 +0100 Subject: [PATCH 4/6] renamed file and updated for changes in config on the sensor. --- ...markdown => sensor.entur_public_transport.markdown} | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename source/_components/{sensor.entur_public_transport_departures.markdown => sensor.entur_public_transport.markdown} (94%) diff --git a/source/_components/sensor.entur_public_transport_departures.markdown b/source/_components/sensor.entur_public_transport.markdown similarity index 94% rename from source/_components/sensor.entur_public_transport_departures.markdown rename to source/_components/sensor.entur_public_transport.markdown index e596a286cd2f..eefcf6b8c95e 100644 --- a/source/_components/sensor.entur_public_transport_departures.markdown +++ b/source/_components/sensor.entur_public_transport.markdown @@ -35,12 +35,17 @@ 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 -add_to_map: +show_on_map: description: If platform locations should be added to the sensor, and the map. required: false type: boolean @@ -53,8 +58,9 @@ add_to_map: # Example configuration.yaml entry sensor: - platform: entur_public_transport + name: Transport expand_platforms: true - add_to_map: true + show_on_map: true stop_ids: - 'NSR:StopPlace:548' # Bergen train station - 'NSR:StopPlace:737' # Trondheim airport From 80a3788d3820865eeb635acf8313d94007ee65e8 Mon Sep 17 00:00:00 2001 From: Heine Furubotten Date: Tue, 13 Nov 2018 20:24:16 +0100 Subject: [PATCH 5/6] bumped version number and minor tweaks. --- source/_components/sensor.entur_public_transport.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_components/sensor.entur_public_transport.markdown b/source/_components/sensor.entur_public_transport.markdown index eefcf6b8c95e..7cbabfcdd6cf 100644 --- a/source/_components/sensor.entur_public_transport.markdown +++ b/source/_components/sensor.entur_public_transport.markdown @@ -9,7 +9,7 @@ sharing: true footer: true logo: entur.svg ha_category: Transport -ha_release: 0.81 +ha_release: 0.83 ha_iot_class: "Cloud Polling" --- @@ -78,4 +78,4 @@ 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. +The stop id is the content after `id=` parameter in the url. Copy paste this into the configuration. From ad8e18eefc33204f97ca9ad32c1076b643daedc3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Nov 2018 23:13:53 +0100 Subject: [PATCH 6/6] Update 'ha_release' --- source/_components/sensor.entur_public_transport.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/sensor.entur_public_transport.markdown b/source/_components/sensor.entur_public_transport.markdown index 7cbabfcdd6cf..b42557d29d3a 100644 --- a/source/_components/sensor.entur_public_transport.markdown +++ b/source/_components/sensor.entur_public_transport.markdown @@ -9,7 +9,7 @@ sharing: true footer: true logo: entur.svg ha_category: Transport -ha_release: 0.83 +ha_release: 0.84 ha_iot_class: "Cloud Polling" ---