1
0
mirror of https://github.com/home-assistant/core.git synced 2025-04-30 20:27:57 +00:00
Pascal Reeb 62bc8df964
Fall back to polling if webhook cannot be registered on Nuki ()
fix(nuki): throw warning if webhook cannot be created
2023-04-11 11:13:52 +02:00

20 lines
504 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."""