Expose create/delete cloudhook (#21606)

* Expose create/delete cloudhook

* Make sure we dont publish cloudhooks when not connected
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-03-03 19:03:49 -08:00
1 parent c25cbccca9
commit f5ed6432eb
6 files changed
+153 -6

No files matched your search

+4 -5
View File
@@ -16,15 +16,14 @@ from homeassistant.util.aiohttp import MockRequest
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from . import auth_api
from . import utils
from .const import MESSAGE_EXPIRATION, MESSAGE_AUTH_FAIL
from .const import (
MESSAGE_EXPIRATION, MESSAGE_AUTH_FAIL, STATE_CONNECTED, STATE_CONNECTING,
STATE_DISCONNECTED
)
HANDLERS = Registry()
_LOGGER = logging.getLogger(__name__)
STATE_CONNECTING = 'connecting'
STATE_CONNECTED = 'connected'
STATE_DISCONNECTED = 'disconnected'
class UnknownHandler(Exception):
"""Exception raised when trying to handle unknown handler."""