Skip to content

Commit f2dcb1e

Browse files
committed
chore: Switch the rooms trait back to the local API
1 parent 9a73737 commit f2dcb1e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

roborock/devices/traits/v1/rooms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def room_map(self) -> dict[int, NamedRoomMapping]:
3939
return {room.segment_id: room for room in self.rooms}
4040

4141

42-
@common.mqtt_rpc_channel
4342
class RoomsTrait(Rooms, common.V1TraitMixin):
4443
"""Trait for managing the room mappings of Roborock devices."""
4544

tests/devices/traits/v1/test_rooms.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ def rooms_trait(device: RoborockDevice) -> RoomsTrait:
3333
async def test_refresh_rooms_trait(
3434
rooms_trait: RoomsTrait,
3535
mock_rpc_channel: AsyncMock,
36-
mock_mqtt_rpc_channel: AsyncMock,
3736
) -> None:
3837
"""Test successfully getting room mapping."""
3938
# Setup mock to return the sample room mapping
40-
mock_mqtt_rpc_channel.send_command.side_effect = [
39+
mock_rpc_channel.send_command.side_effect = [
4140
ROOM_MAPPING_DATA,
4241
]
4342
# Before refresh, rooms should be empty
@@ -64,5 +63,5 @@ async def test_refresh_rooms_trait(
6463
assert rooms[2].iot_id == "2362041"
6564

6665
# Verify the RPC call was made correctly
67-
assert mock_mqtt_rpc_channel.send_command.call_count == 1
68-
mock_mqtt_rpc_channel.send_command.assert_any_call(RoborockCommand.GET_ROOM_MAPPING)
66+
assert mock_rpc_channel.send_command.call_count == 1
67+
mock_rpc_channel.send_command.assert_any_call(RoborockCommand.GET_ROOM_MAPPING)

0 commit comments

Comments
 (0)