gpio view and refactoring

This commit is contained in:
Devaev Maxim
2020-08-31 09:01:40 +03:00
parent 9feb353150
commit 7782668944
6 changed files with 39 additions and 15 deletions

View File

@@ -244,6 +244,7 @@ class KvmdServer(HttpServer): # pylint: disable=too-many-arguments,too-many-ins
await self.__register_ws_client(client)
try:
await self.__broadcast_event("gpio_scheme_state", await self.__user_gpio.get_scheme())
await self.__broadcast_event("gpio_view_state", await self.__user_gpio.get_view())
await asyncio.gather(*[
self.__broadcast_event(component.event_type, await component.get_state())
for component in self.__components