Can SABNZBD component show no. of downloads in current week?

Just wondering, if it would be possible to show the number of downloads completed/ failed in sabnzbd within HASS

That is not a statistic that the SABnzbd api exposes. It could be done by manually parsing the history, but I don’t think that is something I am going to add to the pysabnzbd library since it would mean fetching the entire history output for every update. My history for the past 6 months contains just over 750 slots and is around 1.2 MB of json, but there are people out there who haven’t cleared their history for years and never will and I could imagine some people’s history containing tens or even hundreds of thousands of items that would need to be fetched and parsed every time.

I have an open PR right now that converts the SABnzbd sensor platform to a component with services that can be called to pause, resume, and set the speed limit of the SABnzbd queue and also adds some sensors for history stats like GB downloaded today/this week/this month so you will be able to monitor those from within hass, but I don’t think complete/failed counts will be added unless the SABnzbd api exposes them directly.

Hi Jerad,

thanks for the feedback. SABNZBD within the HASS UI only makes sense for me, if it can tell me that downloads happened in the current week. And if all attempted downloads were successful or not.

This info would have allowed me to skip checking sabnzbd manually on a regular basis. A shame that the API does not allow fetching that data.

FWIW, I think this could be very easily accomplished using a SABnzbd notification script and an input_number in home assistant. Your notification script could make a call to the hass api to increment the input_number, then you could setup an automation to reset the input_number to 0 at the beginning of the week. You could turn this into a nice badge in the hass ui using a template sensor.