Extract Collection helper from Person integration (#30313)

* Add CRUD foundation

* Use collection helper in person integration

* Lint/pytest

* Add tests

* Lint

* Create notification
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-01-03 21:37:11 +01:00
1 parent 3033dbd86c
commit b9aba30a6e
14 files changed
+1074 -396

No files matched your search

@@ -3,9 +3,20 @@ import asyncio
from concurrent import futures
from functools import partial
import json
from typing import TYPE_CHECKING, Callable
from homeassistant.core import HomeAssistant
from homeassistant.helpers.json import JSONEncoder
if TYPE_CHECKING:
from .connection import ActiveConnection # noqa
WebSocketCommandHandler = Callable[
[HomeAssistant, "ActiveConnection", dict], None
] # pylint: disable=invalid-name
DOMAIN = "websocket_api"
URL = "/api/websocket"
MAX_PENDING_MSG = 512