Automatic SABnzbd Download Pausing

This is Version 1, please find Version 2 here which is compatible with 2022.5 onwards.

##########################

A simple Blueprint that pauses SABnzbd downloads whilst external users are watching content on your Plex server. This Blueprint requires the use of the Tautulli & SABnzbd integrations, along with a pre-created Input Boolean to override the automation in the event that you’d like downloads to continue whilst users are watching content.
I created this as an automation for myself a while back due to users experiencing issues whilst my server was busy.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: SABnzbd Download Handling
  description: Pause SABnzbd downloads whilst external users are watching Plex
  domain: automation
  input:
    tautulli:
      name: Tautulli
      description: The entity of your Tautulli integration
      selector:
        entity:
          domain: sensor
    sabnzbd_status:
      name: SABnzbd Status
      description: The entity that shows the current status of SABnzbd
      selector:
        entity:
          domain: sensor
    sabnzbd_override:
      name: SABnzbd Override
      description: The input boolean you have created to act as an override switch for this automation
      selector:
        entity:
          domain: input_boolean

mode: restart
max_exceeded: silent

trigger:
  - entity_id: !input sabnzbd_status
    platform: state
    to: Downloading
  - platform: numeric_state
    entity_id: !input tautulli
    below: '1'
  - platform: numeric_state
    entity_id: !input tautulli
    above: '0'
    attribute: wan_bandwidth
  - platform: state
    entity_id: !input sabnzbd_override

action:
  - choose:
    - conditions:
      - condition: state
        entity_id: !input sabnzbd_status
        state: Downloading
      - condition: numeric_state
        entity_id: !input tautulli
        above: '0'
        attribute: wan_bandwidth
      - condition: state
        entity_id: !input sabnzbd_override
        state: 'off'
      sequence:
      - data: {}
        service: sabnzbd.pause
    default:
    - data: {}
      service: sabnzbd.resume
2 Likes

Yet again, tnx

Could this be adapted to if an entity is home, according to a wifi tracker? The issue I typically have is that when anyone is home and a download starts, the internet for the entire house slows down while the queue is processing making it nearly unusable. The download speed of the ISP does fluctuate so I can’t just set a max % and have that work consistently.

I would like to setup a way where if one a few MAC addresses are found on the Ubiquiti Wifi, then the download speed gets set to 50% or another value.

Would you be able to help write that automation?

Apologies, I completely missed this question - It sounds like you’re after a different automation in that you want the conditions to be if device X is at home then pause the download, is that right? eg.

trigger:
  - platform: state
    entity_id:
      - sensor.sabnzbd_status
    to: Downloading
condition:
  - condition: state
    entity_id: device_tracker.DEVICE
    state: home
action:
  - service: sabnzbd.pause
    data: {}