Get information about lights and control their brightness and color.
lights-cli <device_path> print <id> lights-cli <device_path> set <id> <brightness> lights-cli <device_path> set <id> <red> <green> <blue> lights-cli <device_path> summary lights-cli list
lights-cli <device_path> print <id>
View the brightness and color (if applicable) of a light. The reported values
are floating point numbers between
0.0 (completely off) and
lights-cli <device_path> set <id> <brightness>
Set the brightness of a light. For lights that support pulse-width modulation
<brightness> can be any number between
0.0 (completely off) and
(completely on). For lights that only support simple on and off states
<brightness> should only be
0.0 (off) or
lights-cli <device_path> set <id> <red> <green> <blue>
Set the color of a light.
<blue> can be any number
1.0 to control the intensity of each color component.
lights-cli <device_path> summary
View the total light count as well as the brightness and capabilities of each
light. Currently supported capabilities are
Brightness is a value between
1.0 as explained in the
Rgb is the RGB value of the light.
whether the light supports pulse-width modulation or only simple on and off
List the device paths of all lights.
All examples for node "123" (to check available nodes type
View the brightness of a light
$ lights-cli /dev/class/light/123 print AMBER_LED Value of AMBER_LED: Brightness 1.000000
View the brightness and color of a light
$ lights-cli /dev/class/light/123 print 1 Value of lp50xx-led-1: Brightness 0.745098 RGB 0.235294 0.176471 0.164706
Set the brightness of a light
$ lights-cli /dev/class/light/123 set AMBER_LED 0.5 # This command exits silently.
Set a light to display the color purple
$ lights-cli /dev/class/light/123 set 5 0.5 0 0.5 # This command exits silently.
View the total light count and each light's brightness and capabilities
$ lights-cli /dev/class/light/123 summary Total 1 lights Value of AMBER_LED: Brightness 0.500000 Capabilities: Brightness
List the device paths of all lights
$ lights-cli list /dev/class/light/123
Accessing this command
This command is only available on certain diagnostic and testing Fuchsia builds.
This is a device-side command, not a host-side command like
In other words before calling this command you must first access the
shell of the Fuchsia device.
To interactively access the Fuchsia device's shell:
ffx component explore <component>
<component> with the name of the component that has access to
the command documented on this page.
To call a single command and return the output to the host:
ffx component explore <component> -c "<command>"
<command> with one of the commands documented on this page.
Source code for