def power_off(self): self.clear() self.set_power(self.POWER_DOWN) self.sleep_ms(10) if self.pwr: self.pwr.value(0) # turn off power