Skip to content

Commit ca35102

Browse files
authored
Remove name for Shelly gas valve (gen1) entity (home-assistant#157490)
1 parent 1a1b50e commit ca35102

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

homeassistant/components/shelly/strings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,11 @@
592592
"beta_firmware": {
593593
"name": "Beta firmware"
594594
}
595+
},
596+
"valve": {
597+
"gas_valve": {
598+
"name": "Valve"
599+
}
595600
}
596601
},
597602
"exceptions": {

homeassistant/components/shelly/valve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class RpcValveDescription(RpcEntityDescription, ValveEntityDescription):
4949
BLOCK_VALVES: dict[tuple[str, str], BlockValveDescription] = {
5050
("valve", "valve"): BlockValveDescription(
5151
key="valve|valve",
52-
name="Valve",
52+
translation_key="gas_valve",
5353
available=lambda block: block.valve not in ("failure", "checking"),
5454
removal_condition=lambda _, block: block.valve in ("not_connected", "unknown"),
5555
models={MODEL_GAS},

tests/components/shelly/test_valve.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ async def test_block_device_gas_valve(
5050

5151
assert (entry := entity_registry.async_get(entity_id))
5252
assert entry.unique_id == "123456789ABC-valve_0-valve"
53+
assert entry.name is None
54+
assert entry.translation_key == "gas_valve"
5355

5456
assert (state := hass.states.get(entity_id))
5557
assert state.state == ValveState.CLOSED

0 commit comments

Comments
 (0)