Skip to content

Commit cfc92f7

Browse files
committed
add scenes support
1 parent 321bcde commit cfc92f7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

roborock/web_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ async def execute_scene(self, user_data: UserData, scene_id: int) -> None:
388388
"Authorization": self._get_hawk_authentication(rriot, f"/user/scene/{str(scene_id)}/execute"),
389389
},
390390
)
391-
execute_scene_response = await execute_scene_request.request("post", f"/user/scene/{str(scene_id)}/execute")
391+
execute_scene_response = await execute_scene_request.request("POST", f"/user/scene/{str(scene_id)}/execute")
392392
if not execute_scene_response.get("success"):
393393
raise RoborockException(execute_scene_response)
394394

tests/test_web_api.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from yarl import URL
2-
31
from roborock import HomeData, HomeDataScene, UserData
42
from roborock.web_api import RoborockApiClient
53
from tests.mock_data import HOME_DATA_RAW, USER_DATA
@@ -60,4 +58,4 @@ async def test_execute_scene(mock_rest):
6058
api = RoborockApiClient(username="test_user@gmail.com")
6159
ud = await api.pass_login("password")
6260
await api.execute_scene(ud, 123456)
63-
assert ("post", URL("https://api-us.roborock.com/user/scene/123456/execute")) in mock_rest.requests
61+
mock_rest.assert_any_call("https://api-us.roborock.com/user/scene/123456/execute", "post")

0 commit comments

Comments
 (0)