There is currently support for the following device types within Home Assistant:
Adding Ubiquiti UniFi to your Home Assistant instance can be done via the user interface, by using this My button:
Ubiquiti UniFi can be auto-discovered by Home Assistant. If an instance was found, it will be shown as “Discovered”, which you can select to set it up right away.
If there wasn’t any discovered automatically, don’t worry! You can set up a manual integration entry:
The user needs administrator privileges in order to control switches.
All configuration options are offered from the front end. Enter what UniFi integration you want to change options on and press the cog wheel. Some advanced options are available when “Advanced Mode” is enabled on your user profile page.
The UniFi controller allows you to create multiple users on it besides the main administrator. If all you want to use is the device tracker then it is recommended that you create a limited user that has
read-only permissions for the UniFi device tracker. If you want blocking of network access or POE control as well you would need to have ‘admin’ permissions.
For UniFi OS a local-only user needs to be created. A user who uses the Ubiquiti cloud will not work. You can do this in the manage users section on the UniFi OS dashboard. Make sure to give it the right permissions for the functions you want to use. Note the Dream Machine Pro and Cloud Key Gen2 plus updated to UniFi OS needs the port to be 443.
The UniFi controller can either be a dedicated hardware device (UniFi’s cloud key), or as software on any Linux system. If you run the UniFi controller on the same operating system as Home Assistant there may be conflicts in ports if you have the MQTT integration as well.
It is recommended that you run the UniFi controller in a dedicated virtual machine to avoid that situation.
Presence detection depends on accurate time configuration between Home Assistant and the UniFi controller.
If Home Assistant and the UniFi controller are running on separate machines or VMs ensure that all clocks are synchronized. Failing to have synchronized clocks will lead to Home Assistant failing to mark a device as home.
Allow control of network access to clients configured in the integration options by adding MAC addresses. Items in this list will have a Home Assistant switch created, using the UniFi Device name, allowing for blocking and unblocking.
Entities appear automatically for each connected POE client. If no POE client device is in operation, no entity will be visible. Note: UniFi infrastructure devices such as access points and other switches are not (yet) supported, even if they are powered over ethernet themselves.
Note that POE control actually configures the network port of the switch which the client is connected to.
Entities appear automatically for each restriction group. If there are no restrictions in a group, no entity will be visible. Toggling the switch in Home Assistant will enable or disable all restrictions inside a group.
Get entities reporting receiving and transmitting bandwidth per network client.
Get entities reporting uptime per network client.
If you have problems with UniFi or the integration you can add debug prints to the log.
logger: default: info logs: aiounifi: debug homeassistant.components.unifi: debug homeassistant.components.device_tracker.unifi: debug homeassistant.components.switch.unifi: debug
Suggest an edit to this page, or provide/view feedback for this page.