roborock.devices.traits.b01.q10

Traits for Q10 B01 devices.

 1"""Traits for Q10 B01 devices."""
 2
 3from roborock.devices.traits import Trait
 4from roborock.devices.transport.mqtt_channel import MqttChannel
 5
 6from .command import CommandTrait
 7from .vacuum import VacuumTrait
 8
 9__all__ = [
10    "Q10PropertiesApi",
11]
12
13
14class Q10PropertiesApi(Trait):
15    """API for interacting with B01 devices."""
16
17    command: CommandTrait
18    """Trait for sending commands to Q10 devices."""
19
20    vacuum: VacuumTrait
21    """Trait for sending vacuum related commands to Q10 devices."""
22
23    def __init__(self, channel: MqttChannel) -> None:
24        """Initialize the B01Props API."""
25        self.command = CommandTrait(channel)
26        self.vacuum = VacuumTrait(self.command)
27
28
29def create(channel: MqttChannel) -> Q10PropertiesApi:
30    """Create traits for B01 devices."""
31    return Q10PropertiesApi(channel)
class Q10PropertiesApi(roborock.devices.traits.Trait):
15class Q10PropertiesApi(Trait):
16    """API for interacting with B01 devices."""
17
18    command: CommandTrait
19    """Trait for sending commands to Q10 devices."""
20
21    vacuum: VacuumTrait
22    """Trait for sending vacuum related commands to Q10 devices."""
23
24    def __init__(self, channel: MqttChannel) -> None:
25        """Initialize the B01Props API."""
26        self.command = CommandTrait(channel)
27        self.vacuum = VacuumTrait(self.command)

API for interacting with B01 devices.

Q10PropertiesApi(channel: roborock.devices.transport.mqtt_channel.MqttChannel)
24    def __init__(self, channel: MqttChannel) -> None:
25        """Initialize the B01Props API."""
26        self.command = CommandTrait(channel)
27        self.vacuum = VacuumTrait(self.command)

Initialize the B01Props API.

command: roborock.devices.traits.b01.q10.command.CommandTrait

Trait for sending commands to Q10 devices.

vacuum: roborock.devices.traits.b01.q10.vacuum.VacuumTrait

Trait for sending vacuum related commands to Q10 devices.