OzGav / opensky

Opensky custom component
GNU General Public License v3.0
3 stars 2 forks source link

title: OpenSky Network description: Instructions on how to integrate OpenSky Network into Home Assistant. ha_category:

The opensky sensor allows one to track overhead flights in a given region. It uses crowd-sourced data from the OpenSky Network public API. It will also fire Home Assistant events when flights enter and exit the defined region.

Installation

To install this sensor, copy the files from this repo to YOUR_HA_INSTANCE/config/custom_components/opensky

Configuration

To enable this sensor, add the following lines to your configuration.yaml file:

sensor:
  - platform: opensky
    radius: 10
    username: opensky-username
    password: abc123

Configuration options for the OpenSky Network sensor:

Events

Both events have four attributes:

To receive notifications of the entering flights using the Home Assistant Companion App, add the following lines to your configuration.yaml file:

automation:
  - alias: "Flight entry notification"
    trigger:
      platform: event
      event_type: opensky_entry
    action:
      service: 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"
    trigger:
      platform: event
      event_type: opensky_entry
    action:
      service: 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 }}