diff --git a/homeassistant/components/shelly/strings.json b/homeassistant/components/shelly/strings.json index 9e3b0be9525..6be47bb9408 100644 --- a/homeassistant/components/shelly/strings.json +++ b/homeassistant/components/shelly/strings.json @@ -592,6 +592,11 @@ "beta_firmware": { "name": "Beta firmware" } + }, + "valve": { + "gas_valve": { + "name": "Valve" + } } }, "exceptions": { diff --git a/homeassistant/components/shelly/valve.py b/homeassistant/components/shelly/valve.py index 572cd5e08d4..c964142d656 100644 --- a/homeassistant/components/shelly/valve.py +++ b/homeassistant/components/shelly/valve.py @@ -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}, diff --git a/tests/components/shelly/test_valve.py b/tests/components/shelly/test_valve.py index 301de83c2d8..44e7ac4df48 100644 --- a/tests/components/shelly/test_valve.py +++ b/tests/components/shelly/test_valve.py @@ -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