Google Assistant Local SDK (#27428)

* Local Google

* Fix test

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-10-13 14:16:27 -07:00
1 parent 3454b6fa87
commit e866d769e8
17 files changed
+512 -52

No files matched your search

+4 -2
View File
@@ -1,7 +1,7 @@
"""Webhooks for Home Assistant."""
import logging
from aiohttp.web import Response
from aiohttp.web import Response, Request
import voluptuous as vol
from homeassistant.core import callback
@@ -98,9 +98,11 @@ class WebhookView(HomeAssistantView):
url = URL_WEBHOOK_PATH
name = "api:webhook"
requires_auth = False
cors_allowed = True
async def _handle(self, request, webhook_id):
async def _handle(self, request: Request, webhook_id):
"""Handle webhook call."""
_LOGGER.debug("Handling webhook %s payload for %s", request.method, webhook_id)
hass = request.app["hass"]
return await async_handle_webhook(hass, webhook_id, request)