From ed907da19021c8757a9f47dc8845c825c10f60fa Mon Sep 17 00:00:00 2001 From: Thomas55555 <59625598+Thomas55555@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:38:18 +0200 Subject: [PATCH] Bump aioautomower to 2024.9.0 (#125647) bump aioautomower to 2024.9.0 --- .../husqvarna_automower/manifest.json | 2 +- .../components/husqvarna_automower/number.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- .../husqvarna_automower/fixtures/mower.json | 15 ++++++++-- .../snapshots/test_diagnostics.ambr | 29 ++++++------------- .../husqvarna_automower/test_number.py | 4 +-- 7 files changed, 26 insertions(+), 30 deletions(-) diff --git a/homeassistant/components/husqvarna_automower/manifest.json b/homeassistant/components/husqvarna_automower/manifest.json index 7326408e403..0721d65524e 100644 --- a/homeassistant/components/husqvarna_automower/manifest.json +++ b/homeassistant/components/husqvarna_automower/manifest.json @@ -7,5 +7,5 @@ "documentation": "https://www.home-assistant.io/integrations/husqvarna_automower", "iot_class": "cloud_push", "loggers": ["aioautomower"], - "requirements": ["aioautomower==2024.8.0"] + "requirements": ["aioautomower==2024.9.0"] } diff --git a/homeassistant/components/husqvarna_automower/number.py b/homeassistant/components/husqvarna_automower/number.py index 540f6aa712e..5fc79ea72f7 100644 --- a/homeassistant/components/husqvarna_automower/number.py +++ b/homeassistant/components/husqvarna_automower/number.py @@ -45,7 +45,7 @@ async def async_set_work_area_cutting_height( work_area_id: int, ) -> None: """Set cutting height for work area.""" - await coordinator.api.commands.set_cutting_height_workarea( + await coordinator.api.commands.workarea_settings( mower_id, int(cheight), work_area_id ) diff --git a/requirements_all.txt b/requirements_all.txt index f6452b08e72..02b803f06d4 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -198,7 +198,7 @@ aioaseko==0.2.0 aioasuswrt==1.4.0 # homeassistant.components.husqvarna_automower -aioautomower==2024.8.0 +aioautomower==2024.9.0 # homeassistant.components.azure_devops aioazuredevops==2.2.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index c74fe22299d..bfabfd9a129 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -186,7 +186,7 @@ aioaseko==0.2.0 aioasuswrt==1.4.0 # homeassistant.components.husqvarna_automower -aioautomower==2024.8.0 +aioautomower==2024.9.0 # homeassistant.components.azure_devops aioazuredevops==2.2.1 diff --git a/tests/components/husqvarna_automower/fixtures/mower.json b/tests/components/husqvarna_automower/fixtures/mower.json index aa8ea2cbef4..6430dd4a89a 100644 --- a/tests/components/husqvarna_automower/fixtures/mower.json +++ b/tests/components/husqvarna_automower/fixtures/mower.json @@ -70,17 +70,26 @@ { "workAreaId": 123456, "name": "Front lawn", - "cuttingHeight": 50 + "cuttingHeight": 50, + "enabled": true, + "progress": 40, + "lastTimeCompleted": 1723449269 }, { "workAreaId": 654321, "name": "Back lawn", - "cuttingHeight": 25 + "cuttingHeight": 25, + "enabled": true, + "progress": 30, + "lastTimeCompleted": 1722449269 }, { "workAreaId": 0, "name": "", - "cuttingHeight": 50 + "cuttingHeight": 50, + "enabled": false, + "progress": 20, + "lastTimeCompleted": 1723439269 } ], "positions": [ diff --git a/tests/components/husqvarna_automower/snapshots/test_diagnostics.ambr b/tests/components/husqvarna_automower/snapshots/test_diagnostics.ambr index 3838f2eb960..5052531efd2 100644 --- a/tests/components/husqvarna_automower/snapshots/test_diagnostics.ambr +++ b/tests/components/husqvarna_automower/snapshots/test_diagnostics.ambr @@ -5,26 +5,6 @@ 'battery_percent': 100, }), 'calendar': dict({ - 'events': list([ - dict({ - 'end': '2024-03-02T00:00:00', - 'rrule': 'FREQ=WEEKLY;BYDAY=MO,WE,FR', - 'schedule_no': 1, - 'start': '2024-03-01T19:00:00', - 'uid': '1140_300_MO,WE,FR', - 'work_area_id': None, - 'work_area_name': None, - }), - dict({ - 'end': '2024-03-02T08:00:00', - 'rrule': 'FREQ=WEEKLY;BYDAY=TU,TH,SA', - 'schedule_no': 2, - 'start': '2024-03-02T00:00:00', - 'uid': '0_480_TU,TH,SA', - 'work_area_id': None, - 'work_area_name': None, - }), - ]), 'tasks': list([ dict({ 'duration': 300, @@ -135,15 +115,24 @@ 'work_areas': dict({ '0': dict({ 'cutting_height': 50, + 'enabled': False, + 'last_time_completed_naive': '1970-01-20T22:43:59.269000', 'name': 'my_lawn', + 'progress': 20, }), '123456': dict({ 'cutting_height': 50, + 'enabled': True, + 'last_time_completed_naive': '1970-01-20T22:44:09.269000', 'name': 'Front lawn', + 'progress': 40, }), '654321': dict({ 'cutting_height': 25, + 'enabled': True, + 'last_time_completed_naive': '1970-01-20T22:27:29.269000', 'name': 'Back lawn', + 'progress': 30, }), }), }) diff --git a/tests/components/husqvarna_automower/test_number.py b/tests/components/husqvarna_automower/test_number.py index 9f2f8793bba..10092528866 100644 --- a/tests/components/husqvarna_automower/test_number.py +++ b/tests/components/husqvarna_automower/test_number.py @@ -78,9 +78,7 @@ async def test_number_workarea_commands( values[TEST_MOWER_ID].work_areas[123456].cutting_height = 75 mock_automower_client.get_status.return_value = values mocked_method = AsyncMock() - setattr( - mock_automower_client.commands, "set_cutting_height_workarea", mocked_method - ) + setattr(mock_automower_client.commands, "workarea_settings", mocked_method) await hass.services.async_call( domain="number", service="set_value",