1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-14 17:08:22 +00:00
This commit is contained in:
J. Nick Koston 2023-11-11 17:39:09 -06:00
parent 9194c82213
commit 0c06abd960
No known key found for this signature in database

View File

@ -289,7 +289,10 @@ class EsphomeCommandWebSocket(tornado.websocket.WebSocketHandler):
self._use_popen = os.name == "nt"
@authenticated
async def on_message(self, message):
async def on_message( # pylint: disable=invalid-overridden-method
self, message: str
) -> None:
# Since tornado 4.5, on_message is allowed to be a coroutine
# Messages are always JSON, 500 when not
json_message = json.loads(message)
type_ = json_message["type"]