def light_off( dt ): with thermostatLock: GPIO.output( lightPin, GPIO.LOW ) log( LOG_LEVEL_DEBUG, CHILD_DEVICE_SCREEN, MSG_SUBTYPE_TEXT, "Screen Off" )