-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch for Print Time #108
Patch for Print Time #108
Conversation
how can I use it? what I need to do for working? |
You can use test the patch here: Hopefully this helps. Let me know how you get on! |
yeah, its working, thanks king! |
Commands to install via pip pip uninstall octoprint-homeassistant
pip install git+https://github.com/mreditor97/octoprint-homeassistant.git@patch/print-time |
Would you be willing to fork this and add #113 this breaking-change fix? Otherwise people on your fork will still have no joy come tomorrow at 2pm when the beta becomes the new stable. |
@bharvey88 Yes, of course. All my upcoming patches can be found here -
|
I applied the above update but I still get the errors in HA "MQTT entity name starts with the device name in your config" Cheers |
@halfluck Did you update the plugin before updating Home Assistant? I found that the warning messages haven't come to light again since a restart of Home Assistant? Let me know if this still occurs for you when you update to the latest version of my master branch of my fork? |
@mreditor97 Thanks for the quick reply, Yes I rebooted HA and OctoPrint after applying the update from your master branch, https://www.dropbox.com/scl/fi/y9zy6n1c4j8dejcex6iij/ha_log.txt?rlkey=xl57zi9yjppjsk2lal6qqs0br&dl=0 |
@halfluck I'll look into why this happening when I get back from my holiday in a few days time. |
@mreditor97 @halfluck I do not think this is related to the change here. Looks like the MQTT integration at some point wanted the entity NOT to start with the device name, as far as I remember I think it always has with this plugin. It's a warning in any case.. |
@mreditor97 Thanks for the contribution, looks good on my end. |
This fixes problem #107, caused by the previous patch.
I have done some work to allow the Approximate Total Print Time, Print Time, and Print Time Left sensors to be displayed within graphs within the Home Assistant interface. I have changed Approximate Completion Time to use the built in Timestamp function within Home Assistant so it will now automatically display how long it left on your print once it has been started.
All of the time sensors now check to ensure that there is a valid value before changing from
unavailable
state. This means that if you do not have a print selected within Octoprint, the updated sensors will displayunavailable
.Once a print has been selected within Octoprint, the Approximate Total Print Time will become available and will display the expected time for the print to complete.
Only once the print has started, will the Approximate Completion Time and Print Time Left become available with there actual values. Print Time is updated once the printer has actually started making progress through the print.
I hope this is a improvement for you all! Enjoy!
The suggestion for using graphs was in Feature Request #97
I also did a little bit of tiding up of any unused imports