Skip to content

Commit 80f9875

Browse files
committed
chore: move send and add docs
1 parent 900ed38 commit 80f9875

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

roborock/devices/traits/b01/q7/__init__.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ def __init__(self, channel: MqttChannel) -> None:
2828
"""Initialize the B01Props API."""
2929
self._channel = channel
3030

31-
async def send(self, command: RoborockB01Q7Methods, params: dict) -> Any:
32-
return await send_decoded_command(
33-
self._channel,
34-
dps=10000,
35-
command=command,
36-
params=params,
37-
)
38-
3931
async def query_values(self, props: list[RoborockB01Props]) -> B01Props | None:
4032
"""Query the device for the values of the given Q7 properties."""
4133
result = await self.send(
@@ -108,6 +100,15 @@ async def find_me(self) -> Any:
108100
params={},
109101
)
110102

103+
async def send(self, command: RoborockB01Q7Methods, params: dict) -> Any:
104+
"""Send a command to the device."""
105+
return await send_decoded_command(
106+
self._channel,
107+
dps=10000,
108+
command=command,
109+
params=params,
110+
)
111+
111112

112113
def create(channel: MqttChannel) -> Q7PropertiesApi:
113114
"""Create traits for B01 devices."""

0 commit comments

Comments
 (0)