Improved thread safety

This commit is contained in:
2022-08-16 20:42:35 +00:00
parent ae9ffb65c1
commit 39f727206f
11 changed files with 82 additions and 8 deletions

View File

@@ -9,6 +9,8 @@ from homeassistant.components.websocket_api import (
from homeassistant.components import websocket_api
from homeassistant.core import callback
from .const import (
BROWSER_ID,
DATA_STORE,
@@ -40,6 +42,7 @@ async def async_setup_connection(hass):
browserID = msg[BROWSER_ID]
store = hass.data[DOMAIN][DATA_STORE]
@callback
def send_update(data):
connection.send_message(event_message(msg["id"], {"result": data}))