Skip to content

Commit f801837

Browse files
committed
feat(q10): expose StatusTrait in Q10PropertiesApi
Adds the StatusTrait to Q10PropertiesApi to enable querying device status. The trait was implemented but not exposed in the API class. This enables Home Assistant integration to call api.status.refresh() to retrieve Q10 device data (battery, status, fan level, etc.)
1 parent 9a989c5 commit f801837

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
from roborock.devices.transport.mqtt_channel import MqttChannel
55

66
from .command import CommandTrait
7+
from .status import StatusTrait
78
from .vacuum import VacuumTrait
89

910
__all__ = [
1011
"Q10PropertiesApi",
12+
"StatusTrait",
1113
]
1214

1315

@@ -17,12 +19,16 @@ class Q10PropertiesApi(Trait):
1719
command: CommandTrait
1820
"""Trait for sending commands to Q10 devices."""
1921

22+
status: StatusTrait
23+
"""Trait for querying Q10 device status."""
24+
2025
vacuum: VacuumTrait
2126
"""Trait for sending vacuum related commands to Q10 devices."""
2227

2328
def __init__(self, channel: MqttChannel) -> None:
2429
"""Initialize the B01Props API."""
2530
self.command = CommandTrait(channel)
31+
self.status = StatusTrait(channel)
2632
self.vacuum = VacuumTrait(self.command)
2733

2834

0 commit comments

Comments
 (0)