Skip to content

Commit

Permalink
Documentation for entur public transport sensor (#6643)
Browse files Browse the repository at this point in the history
* Documentation for entur public transport sensor

* ✏️ 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'
  • Loading branch information
hfurubotten authored and fabaff committed Nov 30, 2018
1 parent dad3cba commit 22add7c
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
81 changes: 81 additions & 0 deletions source/_components/sensor.entur_public_transport.markdown
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 21 additions & 0 deletions source/images/supported_brands/entur.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 22add7c

Please sign in to comment.