mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
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:
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…
x
Reference in New Issue
Block a user