mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix Shelly RPC key instances handling (#86479)
Fix Shelly key instances handling
This commit is contained in:
parent
c1332f68b3
commit
e15aaf2853
@ -344,12 +344,12 @@ def get_rpc_key_instances(keys_dict: dict[str, Any], key: str) -> list[str]:
|
||||
if key == "switch" and "cover:0" in keys_dict:
|
||||
key = "cover"
|
||||
|
||||
return [k for k in keys_dict if k.startswith(key)]
|
||||
return [k for k in keys_dict if k.startswith(f"{key}:")]
|
||||
|
||||
|
||||
def get_rpc_key_ids(keys_dict: dict[str, Any], key: str) -> list[int]:
|
||||
"""Return list of key ids for RPC device from a dict."""
|
||||
return [int(k.split(":")[1]) for k in keys_dict if k.startswith(key)]
|
||||
return [int(k.split(":")[1]) for k in keys_dict if k.startswith(f"{key}:")]
|
||||
|
||||
|
||||
def is_rpc_momentary_input(
|
||||
|
Loading…
x
Reference in New Issue
Block a user