mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix sabnzbd imports
This commit is contained in:
parent
89bdead44c
commit
dd23a0b3eb
@ -71,7 +71,7 @@ _THROTTLED_REFRESH = None
|
|||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
""" Sets up the SABnzbd sensors. """
|
""" Sets up the SABnzbd sensors. """
|
||||||
from SabnzbdApiException import SabnzbdApi, SabnzbdApiException
|
from pysabnzbd import SabnzbdApi, SabnzbdApiException
|
||||||
|
|
||||||
api_key = config.get("api_key")
|
api_key = config.get("api_key")
|
||||||
base_url = config.get("base_url")
|
base_url = config.get("base_url")
|
||||||
@ -133,7 +133,7 @@ class SabnzbdSensor(Entity):
|
|||||||
def refresh_sabnzbd_data(self):
|
def refresh_sabnzbd_data(self):
|
||||||
""" Calls the throttled SABnzbd refresh method. """
|
""" Calls the throttled SABnzbd refresh method. """
|
||||||
if _THROTTLED_REFRESH is not None:
|
if _THROTTLED_REFRESH is not None:
|
||||||
from SabnzbdApiException import SabnzbdApiException
|
from pysabnzbd import SabnzbdApiException
|
||||||
try:
|
try:
|
||||||
_THROTTLED_REFRESH()
|
_THROTTLED_REFRESH()
|
||||||
except SabnzbdApiException:
|
except SabnzbdApiException:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user