Bump aioautomower to 2025.4.4 (#143533)

* Bump aioautomower to 2025.4.1

* Update split_tests.py

* revert b3222b9be994d39e9e5b28d8e06abeb36bbda6ca

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* aioautomower==2025.4.2

* fix

* aioautomower==2025.4.30b0

* revert

* some try

* aioautomower==2025.4.0

* aioautomower==2025.4.3b0

* aioautomower==2025.4.4

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
This commit is contained in:
Thomas55555 2025-04-26 23:07:14 +02:00 committed by GitHub
parent 868b8ad318
commit 49299a6bf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 18 additions and 18 deletions

View File

@ -8,5 +8,5 @@
"iot_class": "cloud_push", "iot_class": "cloud_push",
"loggers": ["aioautomower"], "loggers": ["aioautomower"],
"quality_scale": "silver", "quality_scale": "silver",
"requirements": ["aioautomower==2025.4.0"] "requirements": ["aioautomower==2025.4.4"]
} }

View File

@ -44,8 +44,8 @@ async def async_set_work_area_cutting_height(
) -> None: ) -> None:
"""Set cutting height for work area.""" """Set cutting height for work area."""
await coordinator.api.commands.workarea_settings( await coordinator.api.commands.workarea_settings(
mower_id, work_area_id, cutting_height=int(cheight) mower_id, work_area_id
) ).cutting_height(cutting_height=int(cheight))
async def async_set_cutting_height( async def async_set_cutting_height(

View File

@ -206,12 +206,12 @@ class WorkAreaSwitchEntity(WorkAreaControlEntity, SwitchEntity):
async def async_turn_off(self, **kwargs: Any) -> None: async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the switch off.""" """Turn the switch off."""
await self.coordinator.api.commands.workarea_settings( await self.coordinator.api.commands.workarea_settings(
self.mower_id, self.work_area_id, enabled=False self.mower_id, self.work_area_id
) ).enabled(enabled=False)
@handle_sending_exception(poll_after_sending=True) @handle_sending_exception(poll_after_sending=True)
async def async_turn_on(self, **kwargs: Any) -> None: async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the switch on.""" """Turn the switch on."""
await self.coordinator.api.commands.workarea_settings( await self.coordinator.api.commands.workarea_settings(
self.mower_id, self.work_area_id, enabled=True self.mower_id, self.work_area_id
) ).enabled(enabled=True)

2
requirements_all.txt generated
View File

@ -201,7 +201,7 @@ aioaseko==1.0.0
aioasuswrt==1.4.0 aioasuswrt==1.4.0
# homeassistant.components.husqvarna_automower # homeassistant.components.husqvarna_automower
aioautomower==2025.4.0 aioautomower==2025.4.4
# homeassistant.components.azure_devops # homeassistant.components.azure_devops
aioazuredevops==2.2.1 aioazuredevops==2.2.1

View File

@ -189,7 +189,7 @@ aioaseko==1.0.0
aioasuswrt==1.4.0 aioasuswrt==1.4.0
# homeassistant.components.husqvarna_automower # homeassistant.components.husqvarna_automower
aioautomower==2025.4.0 aioautomower==2025.4.4
# homeassistant.components.azure_devops # homeassistant.components.azure_devops
aioazuredevops==2.2.1 aioazuredevops==2.2.1

View File

@ -6,7 +6,7 @@ import time
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from aioautomower.model import MowerAttributes from aioautomower.model import MowerAttributes
from aioautomower.session import AutomowerSession, _MowerCommands from aioautomower.session import AutomowerSession, MowerCommands
from aioautomower.utils import mower_list_to_dictionary_dataclass from aioautomower.utils import mower_list_to_dictionary_dataclass
from aiohttp import ClientWebSocketResponse from aiohttp import ClientWebSocketResponse
import pytest import pytest
@ -119,7 +119,7 @@ def mock_automower_client(values) -> Generator[AsyncMock]:
mock = AsyncMock(spec=AutomowerSession) mock = AsyncMock(spec=AutomowerSession)
mock.auth = AsyncMock(side_effect=ClientWebSocketResponse) mock.auth = AsyncMock(side_effect=ClientWebSocketResponse)
mock.commands = AsyncMock(spec_set=_MowerCommands) mock.commands = AsyncMock(spec_set=MowerCommands)
mock.get_status.return_value = values mock.get_status.return_value = values
mock.start_listening = AsyncMock(side_effect=listen) mock.start_listening = AsyncMock(side_effect=listen)
@ -142,7 +142,7 @@ def mock_automower_client_one_mower(values) -> Generator[AsyncMock]:
mock = AsyncMock(spec=AutomowerSession) mock = AsyncMock(spec=AutomowerSession)
mock.auth = AsyncMock(side_effect=ClientWebSocketResponse) mock.auth = AsyncMock(side_effect=ClientWebSocketResponse)
mock.commands = AsyncMock(spec_set=_MowerCommands) mock.commands = AsyncMock(spec_set=MowerCommands)
mock.get_status.return_value = values mock.get_status.return_value = values
mock.start_listening = AsyncMock(side_effect=listen) mock.start_listening = AsyncMock(side_effect=listen)

View File

@ -68,7 +68,7 @@ async def test_number_workarea_commands(
values[TEST_MOWER_ID].work_areas[123456].cutting_height = 75 values[TEST_MOWER_ID].work_areas[123456].cutting_height = 75
mock_automower_client.get_status.return_value = values mock_automower_client.get_status.return_value = values
mocked_method = AsyncMock() mocked_method = AsyncMock()
setattr(mock_automower_client.commands, "workarea_settings", mocked_method) mock_automower_client.commands.workarea_settings.return_value = mocked_method
await hass.services.async_call( await hass.services.async_call(
domain="number", domain="number",
service="set_value", service="set_value",
@ -79,12 +79,12 @@ async def test_number_workarea_commands(
freezer.tick(timedelta(seconds=EXECUTION_TIME_DELAY)) freezer.tick(timedelta(seconds=EXECUTION_TIME_DELAY))
async_fire_time_changed(hass) async_fire_time_changed(hass)
await hass.async_block_till_done() await hass.async_block_till_done()
mocked_method.assert_called_once_with(TEST_MOWER_ID, 123456, cutting_height=75) mocked_method.cutting_height.assert_called_once_with(cutting_height=75)
state = hass.states.get(entity_id) state = hass.states.get(entity_id)
assert state.state is not None assert state.state is not None
assert state.state == "75" assert state.state == "75"
mocked_method.side_effect = ApiError("Test error") mocked_method.cutting_height.side_effect = ApiError("Test error")
with pytest.raises( with pytest.raises(
HomeAssistantError, HomeAssistantError,
match="Failed to send command: Test error", match="Failed to send command: Test error",

View File

@ -192,7 +192,7 @@ async def test_work_area_switch_commands(
values[TEST_MOWER_ID].work_areas[TEST_AREA_ID].enabled = boolean values[TEST_MOWER_ID].work_areas[TEST_AREA_ID].enabled = boolean
mock_automower_client.get_status.return_value = values mock_automower_client.get_status.return_value = values
mocked_method = AsyncMock() mocked_method = AsyncMock()
setattr(mock_automower_client.commands, "workarea_settings", mocked_method) mock_automower_client.commands.workarea_settings.return_value = mocked_method
await hass.services.async_call( await hass.services.async_call(
domain=SWITCH_DOMAIN, domain=SWITCH_DOMAIN,
service=service, service=service,
@ -202,12 +202,12 @@ async def test_work_area_switch_commands(
freezer.tick(timedelta(seconds=EXECUTION_TIME_DELAY)) freezer.tick(timedelta(seconds=EXECUTION_TIME_DELAY))
async_fire_time_changed(hass) async_fire_time_changed(hass)
await hass.async_block_till_done() await hass.async_block_till_done()
mocked_method.assert_called_once_with(TEST_MOWER_ID, TEST_AREA_ID, enabled=boolean) mocked_method.enabled.assert_called_once_with(enabled=boolean)
state = hass.states.get(entity_id) state = hass.states.get(entity_id)
assert state is not None assert state is not None
assert state.state == excepted_state assert state.state == excepted_state
mocked_method.side_effect = ApiError("Test error") mocked_method.enabled.side_effect = ApiError("Test error")
with pytest.raises( with pytest.raises(
HomeAssistantError, HomeAssistantError,
match="Failed to send command: Test error", match="Failed to send command: Test error",