I'm working on adding LED control for Unifi devices in HA, but needed to expose the LED control in the underlying library.
Some interesting notes:
Not all devices support RGB LED, and therefore need to ensure the outgoing API call does not include the fields for that (although I'm not sure Unifi actually cares)
There's a hardware capabilities field (device.hw_caps) that can be used to determine if the device supports brightness / color. Reference from here. I'm not sure how accurate that is, but out of the 5 devices I have home my network, only 1 supports RGB, and my testing proves this is accurate.
Testing
New unit tests support both the model change and new DeviceSetLedStatus request method.
Overview
I'm working on adding LED control for Unifi devices in HA, but needed to expose the LED control in the underlying library.
Some interesting notes:
device.hw_caps
) that can be used to determine if the device supports brightness / color. Reference from here. I'm not sure how accurate that is, but out of the 5 devices I have home my network, only 1 supports RGB, and my testing proves this is accurate.Testing
DeviceSetLedStatus
request method.