File tree Expand file tree Collapse file tree 1 file changed +2
-27
lines changed
roborock/devices/traits/b01 Expand file tree Collapse file tree 1 file changed +2
-27
lines changed Original file line number Diff line number Diff line change 11"""Traits for B01 devices."""
22
3- from roborock import RoborockB01Methods
4- from roborock .devices .b01_channel import send_decoded_command
5- from roborock .devices .mqtt_channel import MqttChannel
6- from roborock .devices .traits import Trait
7- from roborock .roborock_message import RoborockB01Props
3+ from .sc import PropertiesApi
84
9- __all__ = [
10- "PropertiesApi" ,
11- ]
12-
13-
14- class PropertiesApi (Trait ):
15- """API for interacting with B01 devices."""
16-
17- def __init__ (self , channel : MqttChannel ) -> None :
18- """Initialize the B01Props API."""
19- self ._channel = channel
20-
21- async def query_values (self , props : list [RoborockB01Props ]) -> None :
22- """Query the device for the values of the given Dyad protocols."""
23- await send_decoded_command (
24- self ._channel , dps = 10000 , command = RoborockB01Methods .GET_PROP , params = {"property" : props }
25- )
26-
27-
28- def create (channel : MqttChannel ) -> PropertiesApi :
29- """Create traits for B01 devices."""
30- return PropertiesApi (channel )
5+ __all__ = ["PropertiesApi" , "sc" , "ss" ]
You can’t perform that action at this time.
0 commit comments