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
2020-01-03 21:37:11 +01:00
committed by GitHub
parent 3033dbd86c
commit b9aba30a6e
14 changed files with 1074 additions and 396 deletions

View File

@@ -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