UniFi-API-client
UniFi-API-client copied to clipboard
AP FlexHD LED color change (strange behavior)
I use the API to change the LED color of the AP FlexHD, but it behaves strangely. If I change the color when the LED is 'On', everything goes fine and the color changes.
But if the LED is 'Off', the color value is written successfully including the UI, but I can't turn the LED on either through the API or the UI. In this case, I have to set the color value back to the previous value. This is the only way to switch the LEDs again.
What could be the problem. Have I forgotten some other settings?
...
$device_id = '619529ae665e05052162b6c8'; // FlexHD
$color = '#ff00ff';
$led_on = 'on';
...
$control_led = $unifi_connection->led_override($device_id, $led_on); // LED must be always 'On'
$update_device = $unifi_connection->set_device_settings_base($device_id, ['led_override_color' => $color]);
...