Pump pyliebherrhomeapi to 0.4.0 (#165973)

This commit is contained in:
mettolen
2026-03-20 16:02:49 +01:00
committed by GitHub
parent fdd2db6f23
commit 229e1ee26b
5 changed files with 18 additions and 13 deletions
@@ -8,7 +8,7 @@
"iot_class": "cloud_polling",
"loggers": ["pyliebherrhomeapi"],
"quality_scale": "silver",
"requirements": ["pyliebherrhomeapi==0.3.0"],
"requirements": ["pyliebherrhomeapi==0.4.0"],
"zeroconf": [
{
"name": "liebherr*",
+5 -5
View File
@@ -199,15 +199,15 @@ class LiebherrSelectEntity(LiebherrEntity, SelectEntity):
def _select_control(self) -> SelectControl | None:
"""Get the select control for this entity."""
for control in self.coordinator.data.controls:
if not isinstance(
control,
IceMakerControl | HydroBreezeControl | BioFreshPlusControl,
):
continue
if (
isinstance(control, self.entity_description.control_type)
and control.zone_id == self._zone_id
):
if TYPE_CHECKING:
assert isinstance(
control,
IceMakerControl | HydroBreezeControl | BioFreshPlusControl,
)
return control
return None
+1 -1
View File
@@ -2251,7 +2251,7 @@ pylgnetcast==0.3.9
pylibrespot-java==0.1.1
# homeassistant.components.liebherr
pyliebherrhomeapi==0.3.0
pyliebherrhomeapi==0.4.0
# homeassistant.components.litejet
pylitejet==0.6.3
+1 -1
View File
@@ -1925,7 +1925,7 @@ pylgnetcast==0.3.9
pylibrespot-java==0.1.1
# homeassistant.components.liebherr
pyliebherrhomeapi==0.3.0
pyliebherrhomeapi==0.4.0
# homeassistant.components.litejet
pylitejet==0.6.3
+10 -5
View File
@@ -1,6 +1,7 @@
"""Test the Liebherr select platform."""
import copy
import dataclasses
from datetime import timedelta
from typing import Any
from unittest.mock import MagicMock, patch
@@ -281,11 +282,15 @@ async def test_select_current_option_none_mode(
assert state.state == "low"
# Simulate update where mode is None
state_with_none_mode = copy.deepcopy(MOCK_DEVICE_STATE)
for control in state_with_none_mode.controls:
if isinstance(control, HydroBreezeControl):
control.current_mode = None
break
none_mode_controls = [
dataclasses.replace(control, current_mode=None)
if isinstance(control, HydroBreezeControl)
else control
for control in MOCK_DEVICE_STATE.controls
]
state_with_none_mode = dataclasses.replace(
MOCK_DEVICE_STATE, controls=none_mode_controls
)
mock_liebherr_client.get_device_state.side_effect = lambda *a, **kw: copy.deepcopy(
state_with_none_mode