Bump pylamarzocco to 2.0.4 (#145402)

This commit is contained in:
Josef Zweck 2025-05-21 22:02:14 +02:00 committed by GitHub
parent 4f24d63de1
commit d43371ed2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 13 deletions

View File

@ -37,5 +37,5 @@
"iot_class": "cloud_push", "iot_class": "cloud_push",
"loggers": ["pylamarzocco"], "loggers": ["pylamarzocco"],
"quality_scale": "platinum", "quality_scale": "platinum",
"requirements": ["pylamarzocco==2.0.3"] "requirements": ["pylamarzocco==2.0.4"]
} }

View File

@ -4,7 +4,7 @@ import asyncio
from dataclasses import dataclass from dataclasses import dataclass
from typing import Any from typing import Any
from pylamarzocco.const import FirmwareType, UpdateCommandStatus from pylamarzocco.const import FirmwareType, UpdateStatus
from pylamarzocco.exceptions import RequestNotSuccessful from pylamarzocco.exceptions import RequestNotSuccessful
from homeassistant.components.update import ( from homeassistant.components.update import (
@ -125,7 +125,7 @@ class LaMarzoccoUpdateEntity(LaMarzoccoEntity, UpdateEntity):
await self.coordinator.device.update_firmware() await self.coordinator.device.update_firmware()
while ( while (
update_progress := await self.coordinator.device.get_firmware() update_progress := await self.coordinator.device.get_firmware()
).command_status is UpdateCommandStatus.IN_PROGRESS: ).command_status is UpdateStatus.IN_PROGRESS:
if counter >= MAX_UPDATE_WAIT: if counter >= MAX_UPDATE_WAIT:
_raise_timeout_error() _raise_timeout_error()
self._attr_update_percentage = update_progress.progress_percentage self._attr_update_percentage = update_progress.progress_percentage

2
requirements_all.txt generated
View File

@ -2093,7 +2093,7 @@ pykwb==0.0.8
pylacrosse==0.4 pylacrosse==0.4
# homeassistant.components.lamarzocco # homeassistant.components.lamarzocco
pylamarzocco==2.0.3 pylamarzocco==2.0.4
# homeassistant.components.lastfm # homeassistant.components.lastfm
pylast==5.1.0 pylast==5.1.0

View File

@ -1708,7 +1708,7 @@ pykrakenapi==0.1.8
pykulersky==0.5.8 pykulersky==0.5.8
# homeassistant.components.lamarzocco # homeassistant.components.lamarzocco
pylamarzocco==2.0.3 pylamarzocco==2.0.4
# homeassistant.components.lastfm # homeassistant.components.lastfm
pylast==5.1.0 pylast==5.1.0

View File

@ -3,12 +3,7 @@
from collections.abc import Generator from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch from unittest.mock import AsyncMock, MagicMock, patch
from pylamarzocco.const import ( from pylamarzocco.const import FirmwareType, UpdateProgressInfo, UpdateStatus
FirmwareType,
UpdateCommandStatus,
UpdateProgressInfo,
UpdateStatus,
)
from pylamarzocco.exceptions import RequestNotSuccessful from pylamarzocco.exceptions import RequestNotSuccessful
from pylamarzocco.models import UpdateDetails from pylamarzocco.models import UpdateDetails
import pytest import pytest
@ -61,7 +56,7 @@ async def test_update_process(
mock_lamarzocco.get_firmware.side_effect = [ mock_lamarzocco.get_firmware.side_effect = [
UpdateDetails( UpdateDetails(
status=UpdateStatus.TO_UPDATE, status=UpdateStatus.TO_UPDATE,
command_status=UpdateCommandStatus.IN_PROGRESS, command_status=UpdateStatus.IN_PROGRESS,
progress_info=UpdateProgressInfo.STARTING_PROCESS, progress_info=UpdateProgressInfo.STARTING_PROCESS,
progress_percentage=0, progress_percentage=0,
), ),
@ -139,7 +134,7 @@ async def test_update_times_out(
"""Test error during update.""" """Test error during update."""
mock_lamarzocco.get_firmware.return_value = UpdateDetails( mock_lamarzocco.get_firmware.return_value = UpdateDetails(
status=UpdateStatus.TO_UPDATE, status=UpdateStatus.TO_UPDATE,
command_status=UpdateCommandStatus.IN_PROGRESS, command_status=UpdateStatus.IN_PROGRESS,
progress_info=UpdateProgressInfo.STARTING_PROCESS, progress_info=UpdateProgressInfo.STARTING_PROCESS,
progress_percentage=0, progress_percentage=0,
) )