forked from home-assistant/core
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 logic
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user