This was interesting. I found several posts on the net, on how to disable the green LED on the Pi Zero W. None of them where working. Then I noticed, that the led was just inverted. On state means the LED is dark off state means the led is lit.
So this is how it works:
echo default-on | sudo tee /sys/class/leds/led0/trigger # LED dark echo none | sudo tee /sys/class/leds/led0/trigger # LED lit
The LED was lighting my whole bedroom. Now it’s dark at night again.
There are several options to trigger the LED. You can list them with
cat /sys/class/leds/led0/trigger. The selected one becomes surrounded with square braces.
cat /sys/class/leds/led0/trigger #none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 default-on input panic mmc1 [mmc0] rfkill-any rfkill-none rfkill0
As I didn’t find out how to set this using
/boot/config.txt. I ust used
/etc/rc.local. This way the LED is turned of when boot is completed.