Fix multiple output devices. Also allow connection to multiple meshes?

This commit is contained in:
2022-10-19 20:13:13 +02:00
parent 87ed481f80
commit 8797b119f2
5 changed files with 24 additions and 27 deletions

View File

@@ -1,6 +1,9 @@
from builtins import property
from collections import namedtuple
import logging
_LOGGER = logging.getLogger(__name__)
Device = namedtuple("Device", ["model", "type", "dimmable"])
@@ -101,7 +104,7 @@ class PlejdDevice:
self._dim = dim
if update:
if self.updateCallback:
await self.updateCallback({"state": self._state, "dim": self._dim})
self.updateCallback({"state": self._state, "dim": self._dim})
async def turn_on(self, dim=0):
await self.manager.mesh.set_state(self.address, True, dim)