gpio diff events mode

This commit is contained in:
Maxim Devaev
2024-10-19 08:59:52 +03:00
parent 3852d0a456
commit 90d8e745e3
6 changed files with 161 additions and 93 deletions

View File

@@ -384,7 +384,7 @@ class HttpServer:
break
return ws.wsr
async def _broadcast_ws_event(self, event_type: str, event: (dict | None)) -> None:
async def _broadcast_ws_event(self, event_type: str, event: (dict | None), legacy: (bool | None)=None) -> None:
if self.__ws_sessions:
await asyncio.gather(*[
ws.send_event(event_type, event)
@@ -393,6 +393,7 @@ class HttpServer:
not ws.wsr.closed
and ws.wsr._req is not None # pylint: disable=protected-access
and ws.wsr._req.transport is not None # pylint: disable=protected-access
and (legacy is None or ws.kwargs.get("legacy") == legacy)
)
], return_exceptions=True)