greghesp / ha-bambulab

A Home Assistant Integration for Bambu Lab Printers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] sensor.printername_end_time entity not available after Home Assistant restarts during a print

WayneManion opened this issue · comments

Describe the bug

I start a print on my P1P (with P1S conversion kit) named Bruce. I restart Home Assistant. The entity sensor.bruce_end_time is not available until the print is finished and a new one begins.

To Reproduce

Start a print.
Restart Home Assistant.
sensor.printername_end_time entity not available.

Expected Behaviour

I expect the sensor.printername_end_time entity to be filled in by combining the current time with the amount of time remaining in the print. For example, if it is 4:29 PM and there is 79 minutes left in the print, I think the end_time entity should be populated with 5:48 PM or something similar.

I created an additional entity with template:
{{ as_timestamp(now() + timedelta(minutes = states('sensor.bruce_remaining_time')|int)) | timestamp_custom('%A %B %-d, %I:%M %p') }}

to solve the problem for the time being.

What device are you using?

P1P

Diagnostic Output

Not provided

Log Extracts

No response

Other Information

No response