OASA Telematics
The oasa_telematics
integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] will provide you with bus and trolley arrival times for Greek public transport for Athens, using real-time data from OASA Telematics
Configuration
Add the integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] to your configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file.
在更改了configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件后,重启 Home Assistant 以应用更改。 该集成现在显示在集成页面的 设置 > 设备与服务 下。其实体在集成卡片上以及实体标签上列出。
# 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.
Examples
A more extensive example on how to use this sensor:
# Example configuration.yaml entry
sensor:
- platform: oasa_telematics
route_id: 1965
stop_id: "090006"