diff --git a/homeassistant/components/lamarzocco/manifest.json b/homeassistant/components/lamarzocco/manifest.json index d948d46ef1f..44ca31427c0 100644 --- a/homeassistant/components/lamarzocco/manifest.json +++ b/homeassistant/components/lamarzocco/manifest.json @@ -37,5 +37,5 @@ "iot_class": "cloud_push", "loggers": ["pylamarzocco"], "quality_scale": "platinum", - "requirements": ["pylamarzocco==2.0.3"] + "requirements": ["pylamarzocco==2.0.4"] } diff --git a/homeassistant/components/lamarzocco/update.py b/homeassistant/components/lamarzocco/update.py index 632c66a8b66..33e64623256 100644 --- a/homeassistant/components/lamarzocco/update.py +++ b/homeassistant/components/lamarzocco/update.py @@ -4,7 +4,7 @@ import asyncio from dataclasses import dataclass from typing import Any -from pylamarzocco.const import FirmwareType, UpdateCommandStatus +from pylamarzocco.const import FirmwareType, UpdateStatus from pylamarzocco.exceptions import RequestNotSuccessful from homeassistant.components.update import ( @@ -125,7 +125,7 @@ class LaMarzoccoUpdateEntity(LaMarzoccoEntity, UpdateEntity): await self.coordinator.device.update_firmware() while ( 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: _raise_timeout_error() self._attr_update_percentage = update_progress.progress_percentage diff --git a/requirements_all.txt b/requirements_all.txt index abb5fe26fbf..bf451c260b7 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2093,7 +2093,7 @@ pykwb==0.0.8 pylacrosse==0.4 # homeassistant.components.lamarzocco -pylamarzocco==2.0.3 +pylamarzocco==2.0.4 # homeassistant.components.lastfm pylast==5.1.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 12ea7fe76c7..7c3579c178e 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1708,7 +1708,7 @@ pykrakenapi==0.1.8 pykulersky==0.5.8 # homeassistant.components.lamarzocco -pylamarzocco==2.0.3 +pylamarzocco==2.0.4 # homeassistant.components.lastfm pylast==5.1.0 diff --git a/tests/components/lamarzocco/test_update.py b/tests/components/lamarzocco/test_update.py index 46e466a3acc..99f85c21381 100644 --- a/tests/components/lamarzocco/test_update.py +++ b/tests/components/lamarzocco/test_update.py @@ -3,12 +3,7 @@ from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch -from pylamarzocco.const import ( - FirmwareType, - UpdateCommandStatus, - UpdateProgressInfo, - UpdateStatus, -) +from pylamarzocco.const import FirmwareType, UpdateProgressInfo, UpdateStatus from pylamarzocco.exceptions import RequestNotSuccessful from pylamarzocco.models import UpdateDetails import pytest @@ -61,7 +56,7 @@ async def test_update_process( mock_lamarzocco.get_firmware.side_effect = [ UpdateDetails( status=UpdateStatus.TO_UPDATE, - command_status=UpdateCommandStatus.IN_PROGRESS, + command_status=UpdateStatus.IN_PROGRESS, progress_info=UpdateProgressInfo.STARTING_PROCESS, progress_percentage=0, ), @@ -139,7 +134,7 @@ async def test_update_times_out( """Test error during update.""" mock_lamarzocco.get_firmware.return_value = UpdateDetails( status=UpdateStatus.TO_UPDATE, - command_status=UpdateCommandStatus.IN_PROGRESS, + command_status=UpdateStatus.IN_PROGRESS, progress_info=UpdateProgressInfo.STARTING_PROCESS, progress_percentage=0, )