Skip to content

Commit 3266ae6

Browse files
authored
fix: Fix typing issues in new device traits (#577)
1 parent e48df8b commit 3266ae6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

roborock/devices/traits/v1/command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import Any
22

33
from roborock import RoborockCommand
4+
from roborock.protocols.v1_protocol import ParamsType
45

56

67
class CommandTrait:
@@ -14,7 +15,7 @@ def __post_init__(self) -> None:
1415
"""
1516
self._rpc_channel = None
1617

17-
async def send(self, command: RoborockCommand | str, params: dict[str, Any] | None = None) -> Any:
18+
async def send(self, command: RoborockCommand | str, params: ParamsType = None) -> Any:
1819
"""Send a command to the device."""
1920
if not self._rpc_channel:
2021
raise ValueError("Device trait in invalid state")

roborock/devices/traits/v1/valley_electricity_timer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
_ENABLED_PARAM = "enabled"
66

77

8-
class ValleyElectricityTimerTrait(ValleyElectricityTimer, common.V1TraitMixin):
8+
class ValleyElectricityTimerTrait(ValleyElectricityTimer, common.V1TraitMixin, common.RoborockSwitchBase):
99
"""Trait for managing Valley Electricity Timer settings on Roborock devices."""
1010

1111
command = RoborockCommand.GET_VALLEY_ELECTRICITY_TIMER

0 commit comments

Comments
 (0)