You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Entity categories appropriately marked as Diagnostic or Config
12
-
- Three platforms:
13
-
-**device_tracker** - Presence detection
14
-
-**sensor** - Monitoring and diagnostics
15
-
-**button** - Device controls
12
+
- Service for cleaning up stale client devices from device registry
13
+
- Four platforms:
14
+
-**device_tracker** - Presence detection for clients
15
+
-**sensor** - Monitoring and diagnostics for devices
16
+
-**button** - Device and port controls
17
+
-**update** - Firmware update information
16
18
17
19
### Entities created
18
20
19
21
#### Device Trackers
20
22
21
-
-**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`.
23
+
-**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.
22
24
23
25
#### Device Sensors
24
26
@@ -47,6 +49,14 @@ Home Assistant custom integration for UniFi Network that uses UniFi's official I
47
49
-**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.
48
50
-**Restart Device** (per device): Triggers a restart action on the device. Button is only available when device is online.
49
51
52
+
#### Update Entities
53
+
54
+
-**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.
55
+
56
+
#### Services
57
+
58
+
-**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.
59
+
50
60
**Update interval**: 30 seconds by default.
51
61
52
62
### Future Capabilities
@@ -93,11 +103,11 @@ Manual install:
93
103
3.**Site Selection**: Choose which UniFi site to monitor from the automatically discovered list.
94
104
95
105
4.**Feature Selection**: Choose which features to enable:
- You can enable one or both features based on your monitoring needs
99
109
100
-
The integration will automatically discover all devices and clients using API pagination to ensure complete coverage. Entities are created dynamically based on device capabilities (e.g., PoE sensors and buttons only appear for ports with PoE support).
110
+
The integration will automatically discover all devices and clients using API pagination to ensure complete coverage. Entities are created dynamically based on device capabilities (e.g., PoE sensors and buttons only appear for ports with PoE support, radio sensors only for devices with wireless radios).
101
111
102
112
## Notes and troubleshooting
103
113
@@ -106,27 +116,30 @@ The integration will automatically discover all devices and clients using API pa
106
116
-**Presence Detection Logic**:
107
117
-**Clients**: Present in connected clients list → `home`, otherwise → `not_home`
108
118
-**Dynamic Entity Creation**:
109
-
- Radio sensors only appear for devices that expose radio interface statistics
110
-
- Port sensors are created for all physical ports on devices with port interfaces
119
+
- Radio sensors only appear for devices that expose radio interface statistics (Access Points, Gateways with Wi-Fi)
120
+
- Port sensors are created for all physical ports on devices with port interfaces (Switches, Gateways)
111
121
- PoE sensors and buttons only appear for ports with PoE capability
112
-
- Client trackers are created for all connected clients
122
+
- Client trackers are created for all connected clients and automatically updated as new clients connect
123
+
- Update entities show firmware information for all devices with available firmware data
113
124
-**Device Capabilities**: Different UniFi devices expose different sensor sets based on their hardware capabilities (e.g., switches vs access points vs gateways).
114
125
-**Entity Organization**:
115
126
- Device entities are grouped under their respective UniFi device in the Device Registry
116
127
- Client entities are grouped under their respective client device
117
128
- All entities use the device/client name as the device name with specific sensor names
118
129
- Entity categories are set appropriately (Diagnostic for monitoring, Config for controls)
130
+
-**Service Usage**: Use the `unifi_network.remove_stale_clients` service to clean up the device registry when clients are no longer present in your network
119
131
120
132
## Development
121
133
122
134
### Project Structure
123
135
124
136
-**`unifi_network/`**: Main integration code
125
137
- Core integration logic, coordinators, and entity platforms
0 commit comments