mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove steam temp sensor for Linea Mini (#119423)
This commit is contained in:
parent
fd83b9a7c6
commit
4e121fcbe8
@ -3,7 +3,7 @@
|
|||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from lmcloud.const import BoilerType, PhysicalKey
|
from lmcloud.const import BoilerType, MachineModel, PhysicalKey
|
||||||
from lmcloud.lm_machine import LaMarzoccoMachine
|
from lmcloud.lm_machine import LaMarzoccoMachine
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
@ -80,6 +80,8 @@ ENTITIES: tuple[LaMarzoccoSensorEntityDescription, ...] = (
|
|||||||
value_fn=lambda device: device.config.boilers[
|
value_fn=lambda device: device.config.boilers[
|
||||||
BoilerType.STEAM
|
BoilerType.STEAM
|
||||||
].current_temperature,
|
].current_temperature,
|
||||||
|
supported_fn=lambda coordinator: coordinator.device.model
|
||||||
|
!= MachineModel.LINEA_MINI,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from unittest.mock import MagicMock
|
from unittest.mock import MagicMock
|
||||||
|
|
||||||
|
from lmcloud.const import MachineModel
|
||||||
import pytest
|
import pytest
|
||||||
from syrupy import SnapshotAssertion
|
from syrupy import SnapshotAssertion
|
||||||
|
|
||||||
@ -71,3 +72,17 @@ async def test_shot_timer_unavailable(
|
|||||||
state = hass.states.get(f"sensor.{mock_lamarzocco.serial_number}_shot_timer")
|
state = hass.states.get(f"sensor.{mock_lamarzocco.serial_number}_shot_timer")
|
||||||
assert state
|
assert state
|
||||||
assert state.state == STATE_UNAVAILABLE
|
assert state.state == STATE_UNAVAILABLE
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("device_fixture", [MachineModel.LINEA_MINI])
|
||||||
|
async def test_no_steam_linea_mini(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
mock_lamarzocco: MagicMock,
|
||||||
|
mock_config_entry: MockConfigEntry,
|
||||||
|
) -> None:
|
||||||
|
"""Ensure Linea Mini has no steam temp."""
|
||||||
|
await async_init_integration(hass, mock_config_entry)
|
||||||
|
|
||||||
|
serial_number = mock_lamarzocco.serial_number
|
||||||
|
state = hass.states.get(f"sensor.{serial_number}_current_temp_steam")
|
||||||
|
assert state is None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user