diff --git a/components/gpio_control/GPIODevices/shutdown_button.py b/components/gpio_control/GPIODevices/shutdown_button.py index ee8cb1e98..839efbe8c 100644 --- a/components/gpio_control/GPIODevices/shutdown_button.py +++ b/components/gpio_control/GPIODevices/shutdown_button.py @@ -54,8 +54,12 @@ def callbackFunctionHandler(self, *args): # leave it on for the moment, it will be off when the system is down self.when_pressed(*args) else: - # switch off LED if pressing was cancelled early (during flashing) - self.set_led(GPIO.LOW) + # switch off LED if pressing was cancelled early (during flashing) and no status led is configured + if status_led is not CONFUGRED: + self.set_led(GPIO.LOW) + else: + self.set_led(GPIO.HIGH) + def __repr__(self): return ''.format(