Washington State Department of Transportation (WSDOT)
The Washington State Department of Transportation (WSDOT) integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] will give you travel time information from the Washington State Department of Transportation (WSDOT)
Setup
First, you need to get a free Traveler Information api_key
from the WSDOT API webpage
Configuration
Once you have the code, create wsdot
sensors by editing 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: wsdot
api_key: YOUR_API_KEY
travel_time:
- id: 95
name: I-90 Eastbound HOV
Figuring out which Travel Time ID (id
) is associated with your routes is a bit of a challenge. If you visit https://wsdot.com/Traffic/api/TravelTimes/TravelTimesREST.svc/GetTravelTimesAsJson?AccessCode=[your_api_key_here]
substituting your api_key
, you will get a list of all available routes. Search through it and then find the key TravelTimeID
. That tells you the number you need.
Some common examples include:
73 Issaquah-Seattle (WB PM)
74 Seattle-Issaquah (EB AM)
75 HOV Issaquah-Seattle (WB REV)
76 Issaquah-Seattle (WB REV)
77 HOV Redmond-Seattle (WB PM)
78 HOV Seattle-Redmond (EB AM)
79 Redmond-Seattle (WB PM)
80 Seattle-Redmond (EB AM)
81 HOV Redmond-Seattle via I-90 (WB PM)
82 HOV Seattle-Redmond via I-90 (EB AM)
83 Redmond-Seattle via I-90 (WB PM)
84 Seattle-Redmond via I-90 (EB AM)
85 HOV Redmond-Seattle via I-90 (WB REV)
86 Redmond-Seattle via I-90 (WB REV)
89 Bellevue-Seattle via 520 (WB PM)
90 HOV Bellevue-Seattle via 520 (WB PM)
91 HOV Seattle-Bellevue via 520 (EB AM)
92 Seattle-Bellevue via 520 (EB AM)
93 Bellevue-Seattle via I-90 (WB PM)
94 HOV Bellevue-Seattle via I-90 (WB PM)
95 HOV Seattle-Bellevue via I-90 (EB AM)
96 Seattle-Bellevue via I-90 (EB AM)
97 Bellevue-Seattle via I-90 (WB REV)
98 HOV Bellevue-Seattle via I-90 (WB REV)
WSDOT does provide information about ferry schedules, mountain passes, tolls, etc. but so far only Travel Time data is available in this platform.
Here’s an example of the sensor in use: