2021-12-27 22:02:48 +00:00
|
|
|
"""nuki integration helpers."""
|
2022-10-30 15:36:19 +00:00
|
|
|
from homeassistant import exceptions
|
2021-12-27 22:02:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
def parse_id(hardware_id):
|
|
|
|
"""Parse Nuki ID."""
|
|
|
|
return hex(hardware_id).split("x")[-1].upper()
|
2022-10-30 15:36:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CannotConnect(exceptions.HomeAssistantError):
|
|
|
|
"""Error to indicate we cannot connect."""
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidAuth(exceptions.HomeAssistantError):
|
|
|
|
"""Error to indicate there is invalid auth."""
|
2023-04-11 09:13:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
class NukiWebhookException(exceptions.HomeAssistantError):
|
|
|
|
"""Error to indicate there was an issue with the webhook."""
|