How to use the pybotvac.exceptions.NeatoException function in pybotvac

To help you get started, we’ve selected a few pybotvac examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dshokouhi / hass-neato-custom-component / neato / __init__.py View on Github external
def login(self):
        """Login to My Neato."""
        _LOGGER.debug("Trying to connect to Neato API")
        try:
            self.my_neato = self._neato(
                self.config[CONF_USERNAME], self.config[CONF_PASSWORD], self._vendor
            )
        except NeatoException as ex:
            if isinstance(ex, NeatoLoginException):
                _LOGGER.error("Invalid credentials")
            else:
                _LOGGER.error("Unable to connect to Neato API")
                raise ConfigEntryNotReady
            self.logged_in = False
            return

        self.logged_in = True
        _LOGGER.debug("Successfully connected to Neato API")
github home-assistant / home-assistant / homeassistant / components / neato / __init__.py View on Github external
def login(self):
        """Login to My Neato."""
        _LOGGER.debug("Trying to connect to Neato API")
        try:
            self.my_neato = self._neato(
                self.config[CONF_USERNAME], self.config[CONF_PASSWORD], self._vendor
            )
        except NeatoException as ex:
            if isinstance(ex, NeatoLoginException):
                _LOGGER.error("Invalid credentials")
            else:
                _LOGGER.error("Unable to connect to Neato API")
            self.logged_in = False
            return

        self.logged_in = True
        _LOGGER.debug("Successfully connected to Neato API")

pybotvac

Python package for controlling Neato pybotvac Connected vacuum robot

MIT
Latest version published 8 months ago

Package Health Score

56 / 100
Full package analysis

Similar packages