mirror of
https://github.com/home-assistant/core.git
synced 2026-05-08 09:38:58 +01:00
Remove name for Shelly gas valve (gen1) entity (#157490)
This commit is contained in:
@@ -592,6 +592,11 @@
|
||||
"beta_firmware": {
|
||||
"name": "Beta firmware"
|
||||
}
|
||||
},
|
||||
"valve": {
|
||||
"gas_valve": {
|
||||
"name": "Valve"
|
||||
}
|
||||
}
|
||||
},
|
||||
"exceptions": {
|
||||
|
||||
@@ -49,7 +49,7 @@ class RpcValveDescription(RpcEntityDescription, ValveEntityDescription):
|
||||
BLOCK_VALVES: dict[tuple[str, str], BlockValveDescription] = {
|
||||
("valve", "valve"): BlockValveDescription(
|
||||
key="valve|valve",
|
||||
name="Valve",
|
||||
translation_key="gas_valve",
|
||||
available=lambda block: block.valve not in ("failure", "checking"),
|
||||
removal_condition=lambda _, block: block.valve in ("not_connected", "unknown"),
|
||||
models={MODEL_GAS},
|
||||
|
||||
@@ -50,6 +50,8 @@ async def test_block_device_gas_valve(
|
||||
|
||||
assert (entry := entity_registry.async_get(entity_id))
|
||||
assert entry.unique_id == "123456789ABC-valve_0-valve"
|
||||
assert entry.name is None
|
||||
assert entry.translation_key == "gas_valve"
|
||||
|
||||
assert (state := hass.states.get(entity_id))
|
||||
assert state.state == ValveState.CLOSED
|
||||
|
||||
Reference in New Issue
Block a user