settings: Screen blanking settings
This commit is contained in:
@@ -100,16 +100,12 @@ class Printer:
|
||||
self.set_dev_stat(x, "temperature", d["temperature"])
|
||||
|
||||
if "webhooks" in data or "idle_timeout" in data or "pause_resume" in data or "print_stats" in data:
|
||||
logger.debug("Evaluating state: %s" % data)
|
||||
logger.debug("State info: %s %s %s" % (self.data['webhooks'], self.data['idle_timeout'],
|
||||
self.data['print_stats']))
|
||||
self.evaluate_state()
|
||||
|
||||
def evaluate_state(self):
|
||||
wh_state = self.data['webhooks']['state'].lower() # possible values: startup, ready, shutdown, error
|
||||
idle_state = self.data['idle_timeout']['state'].lower() # possible values: Idle, printing, ready
|
||||
print_state = self.data['print_stats']['state'].lower() # possible values: complete, paused, printing, standby
|
||||
logger.debug("State evaluations: %s %s %s" % (wh_state, idle_state, print_state))
|
||||
|
||||
if wh_state == "ready":
|
||||
new_state = "ready"
|
||||
|
Reference in New Issue
Block a user