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

@@ -107,7 +107,6 @@ def handle_unsubscribe_events(hass, connection, msg):
)
@decorators.async_response
@decorators.websocket_command(
{
vol.Required("type"): "call_service",
@@ -116,6 +115,7 @@ def handle_unsubscribe_events(hass, connection, msg):
vol.Optional("service_data"): dict,
}
)
@decorators.async_response
async def handle_call_service(hass, connection, msg):
"""Handle call service command.
@@ -181,8 +181,8 @@ def handle_get_states(hass, connection, msg):
connection.send_message(messages.result_message(msg["id"], states))
@decorators.async_response
@decorators.websocket_command({vol.Required("type"): "get_services"})
@decorators.async_response
async def handle_get_services(hass, connection, msg):
"""Handle get services command.