mirror of https://github.com/home-assistant/core
21 lines
505 B
Python
21 lines
505 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."""
|
|
|
|
|
|
class NukiWebhookException(exceptions.HomeAssistantError):
|
|
"""Error to indicate there was an issue with the webhook."""
|