OpenSky Network
The OpenSky integration allows one to track overhead flights in a given region. It uses crowd-sourced data from the OpenSky Network
配置
要将 OpenSky Network integration 添加到您的 Home Assistant 实例中,请使用此 My 按钮:
手动配置步骤
如果上述 My 按钮不起作用,您也可以手动执行以下步骤:
-
浏览到您的 Home Assistant 实例。
-
转到
设置 > 设备与服务。 -
在右下角,选择
Add Integration 按钮。 -
从列表中选择 OpenSky Network。
-
按照屏幕上的说明完成设置。
Authentication
By default, polling is done every 15 minutes not to hit the API limit. More API requests are allowed as authenticated users. You can add your credentials after setting up the integration.
Events
- opensky_entry: Fired when a flight enters the region.
- opensky_exit: Fired when a flight exits the region.
Both events have two attributes in common:
-
sensor: Name of
opensky
sensor that fired the event. - callsign: Callsign of the flight.
opensky_entry has 4 additional attributes:
- altitude: Altitude of the flight in meters.
- latitude: Latitude of the flight in decimal.
- longitude: Longitude of the flight in decimal.
- icao24: The ICAO 24-bit address of the aircraft’s transponder.
To receive notifications of the entering flights using the Home Assistant Companion App, add the following lines to your configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file:
automation:
- alias: "Flight entry notification"
triggers:
- trigger: event
event_type: opensky_entry
actions:
- action: notify.mobile_app_<device_name>
data:
message: "Flight entry of {{ trigger.event.data.callsign }}"
One can also get a direct link to the OpenSky website to see the flight using the icao24 identification:
automation:
- alias: "Flight entry notification"
triggers:
- trigger: event
event_type: opensky_entry
actions:
- action: notify.mobile_app_<device_name>
data:
message: "Flight entry of {{ trigger.event.data.callsign }}"
data:
actions:
- action: URI
title: "Track the flight"
uri: >-
https://opensky-network.org/aircraft-profile?icao24={{
trigger.event.data.icao24 }}