Don't try to update if there is no print time estimate
This commit is contained in:
parent
3c1afc7b73
commit
d81a17ef61
@ -18,7 +18,10 @@ def get_printer_job(calendar, printer):
|
||||
print(f"Failed to get current job for {printer['name']}: {e}")
|
||||
return
|
||||
|
||||
if current_job["state"] == "Printing":
|
||||
if (
|
||||
current_job["state"] == "Printing"
|
||||
and current_job["progress"]["printTimeLeft"] is not None
|
||||
):
|
||||
now = datetime.utcnow()
|
||||
start = now - timedelta(seconds=current_job["progress"]["printTime"])
|
||||
estimated_end = now + timedelta(
|
||||
|
Loading…
Reference in New Issue
Block a user