-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add sensors for job queue status and queue count #346
Add sensors for job queue status and queue count #346
Conversation
Please adjust and make sure tests passes |
I don't know why changing the initiliazation order fixes the unit tests because I'm not familiar with the setup of this project. Can you explain why that works? |
Wow... I have no clue, that is quite wild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite nice,
To keep doc up to date, can you add info in the documentation of the sensor page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job
ff12213
into
marcolivierarsenault:main
Thank you for your contrib |
This PR adds two new sensors making use of the job queue API.
One sensor is a textual representation of the current job queue status.
The other one, that initially made me think about implementing this, represents the current amount of jobs in the queue. As I programmed an automation that gracefully shuts down my printer and turns its power off, I though that there should be a way to only do that if there are no pending jobs in the printer's queue.
I am unsure about the unit tests - please advise if and how I should add one ore more tests for these sensors.