hass-core/homeassistant/components/nuki/helpers.py
Pascal Reeb 5d282db439
Handle HTTPError on nuki integration (#80801)
fix(nuki): handle requests errors
2022-10-30 08:36:19 -07:00

15 lines
378 B
Python

"""nuki integration helpers."""
from homeassistant import exceptions
def parse_id(hardware_id):
"""Parse Nuki ID."""
return hex(hardware_id).split("x")[-1].upper()
class CannotConnect(exceptions.HomeAssistantError):
"""Error to indicate we cannot connect."""
class InvalidAuth(exceptions.HomeAssistantError):
"""Error to indicate there is invalid auth."""