greghesp / ha-bambulab

A Home Assistant Integration for Bambu Lab Printers
696 stars 58 forks source link

[Bug] Print Job Start/End/Remaining times unavailable #512

Closed MwC-Trexx closed 2 months ago

MwC-Trexx commented 2 months ago

Describe the bug

When print jobs are running the following entities are unavailable:

To Reproduce

Perform a print job and review entities for the print device

Expected Behaviour

The print jobs should be updating the device entities to show job stats for start, finish(end), and remaining time.

config_entry-bambu_lab-4dc739e7ee3dd96a8e872ec5737f6920.json bambu_labs.log

What device are you using?

X1C

Diagnostic Output

See attached

Log Extracts

No response

Other Information

No response

AdrianGarside commented 2 months ago

Start/end time get set to unavailable if we have no end time so somehow we failed to get that. Remaining time has no holdback though - what was that showing?

Looking at your provided diagnostic data it seems they've removed gcode_start_time from the mqtt payload on the X1 in the latest firmware - it now matches the P1 series where I have to get the start time by observing the print start or (if available) using the cloud print data.

MwC-Trexx commented 2 months ago

I just confirmed it does show remaining time while the print job is running.

Instead of ‘unavailable’ when no job is active, maybe change it to N/A (if printer status is idle) and unavailable (if no value when a job is running but there is no value or device unavailable).

That way helps differentiate between there is an issue with the integration vs expected behavior.

AdrianGarside commented 2 months ago

https://github.com/greghesp/ha-bambulab/releases/tag/v2.0.20