Allow teaching logbook about events (#32444)

* Allow teaching logbook about events

* Use async_add_executor_job

* Fix tests
This commit is contained in:
Paulus Schoutsen 2020-03-05 11:55:50 -08:00 committed by GitHub
parent 7c51318861
commit 8aea538662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 175 additions and 105 deletions

View file

@ -3,15 +3,13 @@ import logging
import homeassistant.core as ha
from .const import API_DIRECTIVE, API_HEADER
from .const import API_DIRECTIVE, API_HEADER, EVENT_ALEXA_SMART_HOME
from .errors import AlexaBridgeUnreachableError, AlexaError
from .handlers import HANDLERS
from .messages import AlexaDirective
_LOGGER = logging.getLogger(__name__)
EVENT_ALEXA_SMART_HOME = "alexa_smart_home"
async def async_handle_message(hass, config, request, context=None, enabled=True):
"""Handle incoming API messages.