Bump pybotvac and use new exceptions (#27249)
* Bump pybotvac * Fix tests * Remove super calls * Surround some more statements * Correct logger message for vacuum
This commit is contained in:
parent
1059cea28f
commit
dae8cd8801
12 changed files with 178 additions and 77 deletions
|
@ -3,7 +3,7 @@
|
|||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
from requests.exceptions import HTTPError, ConnectionError as ConnError
|
||||
from pybotvac.exceptions import NeatoLoginException, NeatoRobotException
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
|
@ -106,7 +106,9 @@ class NeatoConfigFlow(config_entries.ConfigFlow, domain=NEATO_DOMAIN):
|
|||
|
||||
try:
|
||||
Account(username, password, this_vendor)
|
||||
except (HTTPError, ConnError):
|
||||
except NeatoLoginException:
|
||||
return "invalid_credentials"
|
||||
except NeatoRobotException:
|
||||
return "unexpected_error"
|
||||
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue