mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 05:46:52 +00:00
Add documentation for OASA Telematics greek public transport sensor c (#8978)
* add telematics sensor documentation * Update source/_components/sensor.oasa_telematics.markdown Co-Authored-By: panosmz <p.mazarakis94@gmail.com> * Update source/_components/sensor.oasa_telematics.markdown Co-Authored-By: panosmz <p.mazarakis94@gmail.com> * fix route_id type * rename file & update release no
This commit is contained in:
parent
e039e6ab6c
commit
81f72fc898
72
source/_components/oasa_telematics.markdown
Normal file
72
source/_components/oasa_telematics.markdown
Normal file
@ -0,0 +1,72 @@
|
||||
---
|
||||
layout: page
|
||||
title: "OASA Telematics"
|
||||
description: "Instructions on how to integrate bus and trolley arrival data for Greek OASA Telematics within Home Assistant."
|
||||
date: 2019-03-05 21:52
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: oasa.png
|
||||
ha_category:
|
||||
- Transport
|
||||
- Sensor
|
||||
ha_iot_class: Cloud Polling
|
||||
ha_release: 0.92
|
||||
---
|
||||
|
||||
The `oasa_telematics` sensor will provide you with bus and trolley arrival times for Greek public transport for Athens, using real-time data from [OASA Telematics](http://telematics.oasa.gr/en/).
|
||||
|
||||
## {% linkable_title Configuration %}
|
||||
|
||||
Add a sensor to your `configuration.yaml` file as shown in the example:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: oasa_telematics
|
||||
route_id: YOUR_ROUTE_ID
|
||||
stop_id: 'YOUR_STOP_ID'
|
||||
```
|
||||
|
||||
The `route_id` can be obtained by looking up the "LineCode" of the route you want at this link:
|
||||
|
||||
<http://telematics.oasa.gr/api/?act=webGetLines>
|
||||
|
||||
Then getting the "RouteCode" from this link:
|
||||
|
||||
<http://telematics.oasa.gr/api/?act=webGetRoutes&p1=LINE_CODE>
|
||||
(Replace "LINE_CODE" with the "LineCode" you copied from the first link) find the route you need and copy the `RouteCode` field.
|
||||
|
||||
Next, get the `stop_id` from this link:
|
||||
|
||||
<http://telematics.oasa.gr/api/?act=webGetStops&p1=ROUTE_CODE>
|
||||
(Replace "ROUTE_CODE" with the "RouteCode" you got from the previous link) find the stop you need and copy the `StopID` field. The route must pass from this stop in order for the sensor to work.
|
||||
|
||||
{% configuration %}
|
||||
route_id:
|
||||
description: The id of the public transport route.
|
||||
required: true
|
||||
type: int
|
||||
stop_id:
|
||||
description: The id of the public transport stop.
|
||||
required: true
|
||||
type: string
|
||||
name:
|
||||
description: A friendly name for this sensor.
|
||||
required: false
|
||||
default: OASA Telematics
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
A more extensive example on how to use this sensor:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: oasa_telematics
|
||||
route_id: 1965
|
||||
stop_id: '090006'
|
||||
```
|
BIN
source/images/supported_brands/oasa.png
Normal file
BIN
source/images/supported_brands/oasa.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
Loading…
x
Reference in New Issue
Block a user