Raspberrry Pi - How to turn off power and action LED?

To turn off the leds on the pi run the following in the terminal.
this works on a pi 3 running raspbian

The power LED
sudo sh -c 'echo 0 > /sys/class/leds/led1/brightness'

The action LED
sudo sh -c 'echo 0 > /sys/class/leds/led0/brightness'