Unifi - custom integration based on official Network API

Hi all,

I have created a custom integration based on the official Unifi Network API which was released a few months ago by Ubiquiti:

Unifi Network (custom integration)

Currently it provides mainly sensors and actions for Unifi devices, and device trackers for clients (laptops, phones etc).

Feel free to give it a try and give me feedback.
It can be installed by adding it as a Custom Repository in HACS.

The main goal is to show and validate what the official API provides, and maybe prepare a path to integrate it in the core Unifi Network integration which is based on unofficial APIs (and much more feature rich).
Note: both integrations can be installed in the same Home Assistant instance. They mostly play well together, you will just have some duplicated sensors (suffixed by “_2”).

Here is the full list of supported features (see github README):

Device Trackers

  • UniFi Client Tracker: Reports home when client is currently connected, not_home otherwise. Attributes include IP address, MAC address, last seen timestamp, connected at timestamp (when available), and source_type=router. Automatically created for all discovered clients when client tracking is enabled.

Device Sensors

  • Device State: Current operational state (Online, Offline, etc.)
  • System Statistics (per device):
    • Uptime (timestamp showing when device started)
    • Load Average (1, 5, and 15 minute averages)
    • CPU Utilization (%)
    • Memory Utilization (%)
  • Uplink Statistics (per device):
    • Uplink RX Rate (bps, suggested display as Mbps)
    • Uplink TX Rate (bps, suggested display as Mbps)
  • Radio Statistics (per device, per available radio frequency):
    • TX Retries (%) — created for each available radio frequency (e.g., 2.4GHz, 5GHz, 6GHz)
  • Port Statistics (per device, per physical port):
    • Port State (Up, Down, etc.) with additional attributes for port details
  • PoE Port Statistics (per device, per PoE-capable port):
    • PoE State (Providing Power, Off, etc.) with PoE standard and type information

Device Buttons

  • PoE Port Power Cycle (per device, per PoE-capable port): Triggers power cycle action on PoE ports. Button is automatically available only for ports with PoE capability.
  • Restart Device (per device): Triggers a restart action on the device. Button is only available when device is online.

Update Entities

  • Firmware Update (per device): Shows current firmware version and indicates if firmware updates are available. Displays “Unknown” for latest version when an update is available (UniFi API doesn’t provide specific version information). Note: Firmware installation through Home Assistant is not supported - use the UniFi Network Application for updates.

Services

  • Remove Stale Clients (unifi_network.remove_stale_clients): Removes devices from the Home Assistant device registry that are no longer in the known clients or devices list. Useful for cleaning up devices that were previously tracked but are no longer present in the UniFi network. Can target specific config entries or process all UniFi Network integrations.
8 Likes

Nice, works great. Few things, compared to the built in version, that I currently use:

The POE ports switches to be able to turn on/off the POE power
Switches for Rules
CPU temperature of UDM PRO

Hi @Holdestmade ,
thanks for the feedback. I agree those would be nice, but they are not currently provided by the official Unifi API.
I’m sure it will improve over time. It’s also partly the aim of this integration - get feedback on what’s missing and ask Ubiquiti to add it.
On my side I would also be interested in :

  • POE power consumption per port
  • POE switch on/off per port- RX/TX bandwidth per port
  • Detailed client statistics, especially RX/TX bandwidth
  • Provide the version number of available firmware updates (currently there is just a status “update available”)
  • Temperature sensors as you mentioned
1 Like

I’ve opened a thread on the UniFi forums to request additional features in the official Network API:
https://community.ui.com/questions/Feature-Request---Network-API-Enhancements-for-Home-Assistant-Integration/9f116e3d-33a4-447a-aae2-7418f4d38ddc
If you’re interested, feel free to upvote it or share your own use cases!

I’ve updated the UniFi Network API version to 10.0.160 .

:warning: Due to a breaking change in the UniFi API, please use the matching integration version:

  • Network 9.x → integration v0.2.1
  • Network 10.x → integration v0.3.0
1 Like

The integration is tested and validated against the latest official releases:
UNifi OS 5.0.12
Network 10.1.85

New version 0.4.0 is out.
No functional changes, just an upgrade to the 10.1.x API branch.
There is no breaking change in the API so both versions 0.3.x and 0.4.x should be compatible with all 10.0.x / 10.1.x / 10.2.x UniFi Network Application versions.

New Release: v0.7.0 (Plus a quick catch-up on v0.6.1 and v0.5.0!)

Hey everyone,
A new version (v0.7.0) of the integration is now available. This release focuses on keeping up with recent Home Assistant Core changes and fixing device tracker behaviors.
:police_car_light: v0.7.0 Important Changes & Actions Required:

  • Restore Device Tracker Zones: This release fixes and restores the zone functionality for device trackers following the HA Core 2026.7.x updates.
  • Under the Hood Migration: In line with the recent changes to device tracker entity models in Core, device trackers have been migrated from TrackerEntity to BaseScannerEntity.
  • Minimum HA Version: Because of the BaseScannerEntity support required for client trackers, this release now requires Home Assistant 2026.6.0 or newer.
  • :warning: Cleanup Action: After you pull this update, your old DeviceScanner entities may be marked as “Unavailable”. You will need to manually remove these old entities from your setup.

:counterclockwise_arrows_button: What else is new? (Catching up on v0.6.1 & v0.5.0)
In case you missed the last couple of updates, here is what was recently added:

  • v0.6.1 — Uplink Attributes: We added uplink device details directly into the client device tracker attributes. You can now see:
    • uplink_mac — The MAC address of the UniFi device the client is connected through.
    • uplink_device_name — The name of the UniFi device the client is connected through.
  • v0.5.0 — Optional Filters: big thanks to @jtai for adding optional filters! You can now configure custom filters when enumerating your devices and clients. Check the API documentation for specific syntax rules and filterable properties.

Let me know if you run into any issues after upgrading and cleaning up the old entities!