Skip to content

Commit 50d7ffd

Browse files
committed
vucm: fix device channel instantiation
1 parent 1706fb4 commit 50d7ffd

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

enapter/vucm/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ async def _run(self):
3737
device = await self._stack.enter_async_context(
3838
self._device_factory(
3939
channel=enapter.mqtt.api.DeviceChannel(
40+
client=mqtt_client,
4041
hardware_id=self._config.hardware_id,
4142
channel_id=self._config.channel_id,
4243
)

enapter/vucm/ucm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import asyncio
22

3+
import enapter
4+
35
from .device import Device
46

57

68
class UCM(Device):
79
def __init__(self, mqtt_client, hardware_id):
810
super().__init__(
9-
channel=mqtt_client.device_channel(
10-
hardware_id=hardware_id, channel_id="ucm"
11+
channel=enapter.mqtt.api.DeviceChannel(
12+
client=mqtt_client, hardware_id=hardware_id, channel_id="ucm"
1113
)
1214
)
1315

0 commit comments

Comments
 (0)