diff --git a/custom_components/ecovacs/manifest.json b/custom_components/ecovacs/manifest.json index e58d1b2..c7ec192 100644 --- a/custom_components/ecovacs/manifest.json +++ b/custom_components/ecovacs/manifest.json @@ -1,7 +1,7 @@ { "domain": "ecovacs", "name": "Ecovacs Bumper", - "version": "1.4.5", + "version": "1.5.0", "documentation": "https://github.com/bittles/ha_ecovacs_bumper", "issue_tracker": "https://github.com/bittles/ha_ecovacs_bumper/issues", "requirements": ["sleekxmppfs==1.4.1", "requests>=2.18", "pycryptodome>=3.4", "pycountry-convert>=0.5", "paho-mqtt>=1.4", "stringcase>=1.2"], diff --git a/custom_components/ecovacs/sucks.py b/custom_components/ecovacs/sucks.py index 64ba3c5..264ac1e 100644 --- a/custom_components/ecovacs/sucks.py +++ b/custom_components/ecovacs/sucks.py @@ -15,20 +15,6 @@ from .sucks_const import * import logging LOGGER = logging.getLogger(__name__) -def str_to_bool_or_cert(s): - if s == 'True' or s == True: - return True - elif s == 'False' or s == False: - return False - else: - if not s == None: - if os.path.exists(s): # User could provide a path to a CA Cert as well, which is useful for Bumper - if os.path.isfile(s): - return s - else: - raise ValueError("Certificate path provided is not a file - {}".format(s)) - raise ValueError("Cannot covert {} to a bool or certificate path".format(s)) - class EventEmitter(object): """A very simple event emitting system.""" def __init__(self): diff --git a/custom_components/ecovacs/sucks_api.py b/custom_components/ecovacs/sucks_api.py index 9c146e4..d863d2f 100644 --- a/custom_components/ecovacs/sucks_api.py +++ b/custom_components/ecovacs/sucks_api.py @@ -14,6 +14,20 @@ from .sucks_api_const import * import logging LOGGER = logging.getLogger(__name__) +def str_to_bool_or_cert(s): + if s == 'True' or s == True: + return True + elif s == 'False' or s == False: + return False + else: + if not s == None: + if os.path.exists(s): # User could provide a path to a CA Cert as well, which is useful for Bumper + if os.path.isfile(s): + return s + else: + raise ValueError("Certificate path provided is not a file - {}".format(s)) + raise ValueError("Cannot covert {} to a bool or certificate path".format(s)) + class EcoVacsAPI: CLIENT_KEY = API_CLIENT_KEY SECRET = API_SECRET