mirror of
https://github.com/home-assistant/core.git
synced 2026-08-24 10:13:52 -05:00
Pump pyliebherrhomeapi to 0.4.0 (#165973)
This commit is contained in:
@@ -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*",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -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
|
||||
|
||||
Generated
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user