mirror of
https://github.com/home-assistant/core.git
synced 2025-06-25 15:37:11 +00:00
Fix Shelly Plus i4 KeyError (#65604)
This commit is contained in:
parent
b2f0882e67
commit
5e577058bb
@ -264,7 +264,8 @@ def get_model_name(info: dict[str, Any]) -> str:
|
||||
|
||||
def get_rpc_channel_name(device: RpcDevice, key: str) -> str:
|
||||
"""Get name based on device and channel name."""
|
||||
key = key.replace("input", "switch")
|
||||
if device.config.get("switch:0"):
|
||||
key = key.replace("input", "switch")
|
||||
device_name = get_rpc_device_name(device)
|
||||
entity_name: str | None = device.config[key].get("name", device_name)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user