mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Make ready time sensors unavailable instead in lamarzocco (#147985)
This commit is contained in:
parent
12b90f3c8e
commit
e592e565c0
@ -56,6 +56,13 @@ ENTITIES: tuple[LaMarzoccoSensorEntityDescription, ...] = (
|
||||
CoffeeBoiler, config[WidgetType.CM_COFFEE_BOILER]
|
||||
).ready_start_time
|
||||
),
|
||||
available_fn=(
|
||||
lambda coordinator: cast(
|
||||
CoffeeBoiler,
|
||||
coordinator.device.dashboard.config[WidgetType.CM_COFFEE_BOILER],
|
||||
).ready_start_time
|
||||
is not None
|
||||
),
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
LaMarzoccoSensorEntityDescription(
|
||||
@ -67,11 +74,18 @@ ENTITIES: tuple[LaMarzoccoSensorEntityDescription, ...] = (
|
||||
SteamBoilerLevel, config[WidgetType.CM_STEAM_BOILER_LEVEL]
|
||||
).ready_start_time
|
||||
),
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
supported_fn=(
|
||||
lambda coordinator: coordinator.device.dashboard.model_name
|
||||
in (ModelName.LINEA_MICRA, ModelName.LINEA_MINI_R)
|
||||
),
|
||||
available_fn=(
|
||||
lambda coordinator: cast(
|
||||
SteamBoilerLevel,
|
||||
coordinator.device.dashboard.config[WidgetType.CM_STEAM_BOILER_LEVEL],
|
||||
).ready_start_time
|
||||
is not None
|
||||
),
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
LaMarzoccoSensorEntityDescription(
|
||||
key="brewing_start_time",
|
||||
|
@ -94,7 +94,7 @@
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'unknown',
|
||||
'state': 'unavailable',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[sensor.gs012345_last_cleaning_time-entry]
|
||||
|
Loading…
x
Reference in New Issue
Block a user