mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Deprecate Shelly state attributes (#140791)
This commit is contained in:
parent
4176776d70
commit
a170e32852
@ -130,6 +130,7 @@ SENSORS: dict[tuple[str, str], BlockBinarySensorDescription] = {
|
||||
device_class=BinarySensorDeviceClass.GAS,
|
||||
translation_key="gas",
|
||||
value=lambda value: value in ["mild", "heavy"],
|
||||
# Deprecated, remove in 2025.10
|
||||
extra_state_attributes=lambda block: {"detected": block.gas},
|
||||
),
|
||||
("sensor", "smoke"): BlockBinarySensorDescription(
|
||||
|
@ -358,6 +358,7 @@ SENSORS: dict[tuple[str, str], BlockSensorDescription] = {
|
||||
translation_key="lamp_life",
|
||||
value=get_shelly_air_lamp_life,
|
||||
suggested_display_precision=1,
|
||||
# Deprecated, remove in 2025.10
|
||||
extra_state_attributes=lambda block: {
|
||||
"Operational hours": round(cast(int, block.totalWorkTime) / 3600, 1)
|
||||
},
|
||||
@ -378,6 +379,7 @@ SENSORS: dict[tuple[str, str], BlockSensorDescription] = {
|
||||
options=["warmup", "normal", "fault"],
|
||||
translation_key="operation",
|
||||
value=lambda value: None if value == "unknown" else value,
|
||||
# Deprecated, remove in 2025.10
|
||||
extra_state_attributes=lambda block: {"self_test": block.selfTest},
|
||||
),
|
||||
("valve", "valve"): BlockSensorDescription(
|
||||
|
Loading…
x
Reference in New Issue
Block a user