mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Handle missing widget in lamarzocco (#147047)
This commit is contained in:
parent
81257f9d57
commit
5e31b5ac4f
@ -58,6 +58,10 @@ ENTITIES: tuple[LaMarzoccoNumberEntityDescription, ...] = (
|
|||||||
CoffeeBoiler, machine.dashboard.config[WidgetType.CM_COFFEE_BOILER]
|
CoffeeBoiler, machine.dashboard.config[WidgetType.CM_COFFEE_BOILER]
|
||||||
).target_temperature
|
).target_temperature
|
||||||
),
|
),
|
||||||
|
available_fn=(
|
||||||
|
lambda coordinator: WidgetType.CM_COFFEE_BOILER
|
||||||
|
in coordinator.device.dashboard.config
|
||||||
|
),
|
||||||
),
|
),
|
||||||
LaMarzoccoNumberEntityDescription(
|
LaMarzoccoNumberEntityDescription(
|
||||||
key="smart_standby_time",
|
key="smart_standby_time",
|
||||||
@ -221,7 +225,7 @@ class LaMarzoccoNumberEntity(LaMarzoccoEntity, NumberEntity):
|
|||||||
entity_description: LaMarzoccoNumberEntityDescription
|
entity_description: LaMarzoccoNumberEntityDescription
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self) -> float:
|
def native_value(self) -> float | int:
|
||||||
"""Return the current value."""
|
"""Return the current value."""
|
||||||
return self.entity_description.native_value_fn(self.coordinator.device)
|
return self.entity_description.native_value_fn(self.coordinator.device)
|
||||||
|
|
||||||
|
@ -57,6 +57,10 @@ ENTITIES: tuple[LaMarzoccoSensorEntityDescription, ...] = (
|
|||||||
).ready_start_time
|
).ready_start_time
|
||||||
),
|
),
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
available_fn=(
|
||||||
|
lambda coordinator: WidgetType.CM_COFFEE_BOILER
|
||||||
|
in coordinator.device.dashboard.config
|
||||||
|
),
|
||||||
),
|
),
|
||||||
LaMarzoccoSensorEntityDescription(
|
LaMarzoccoSensorEntityDescription(
|
||||||
key="steam_boiler_ready_time",
|
key="steam_boiler_ready_time",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user