Fix rooms not being matched correctly in sharkiq.clean_room (#118277)
* Fix rooms not being matched correctly in sharkiq.clean_room * Update sharkiq tests to account for new room matching logicpull/118286/head
parent
0c245f1976
commit
4d7802215c
|
@ -212,6 +212,7 @@ class SharkVacuumEntity(CoordinatorEntity[SharkIqUpdateCoordinator], StateVacuum
|
|||
"""Clean specific rooms."""
|
||||
rooms_to_clean = []
|
||||
valid_rooms = self.available_rooms or []
|
||||
rooms = [room.replace("_", " ").title() for room in rooms]
|
||||
for room in rooms:
|
||||
if room in valid_rooms:
|
||||
rooms_to_clean.append(room)
|
||||
|
|
|
@ -236,7 +236,6 @@ async def test_device_properties(
|
|||
@pytest.mark.parametrize(
|
||||
("room_list", "exception"),
|
||||
[
|
||||
(["KITCHEN"], exceptions.ServiceValidationError),
|
||||
(["KITCHEN", "MUD_ROOM", "DOG HOUSE"], exceptions.ServiceValidationError),
|
||||
(["Office"], exceptions.ServiceValidationError),
|
||||
([], MultipleInvalid),
|
||||
|
|
Loading…
Reference in New Issue