mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add missing Shelly Cover sensors bugfix (#71831)
Switching Shelly Plus 2PM from switch to cover mode results in missing sensors for Power, Voltage, Energy and Temperature. These parameters are still available in the API, but need to be accessed via "cover" key instead of "switch" key. This change adds the missing sensors.
This commit is contained in:
parent
617b0d04dc
commit
8549af3855
@ -297,6 +297,9 @@ def get_rpc_key_instances(keys_dict: dict[str, Any], key: str) -> list[str]:
|
||||
if key in keys_dict:
|
||||
return [key]
|
||||
|
||||
if key == "switch" and "cover:0" in keys_dict:
|
||||
key = "cover"
|
||||
|
||||
keys_list: list[str] = []
|
||||
for i in range(MAX_RPC_KEY_INSTANCES):
|
||||
key_inst = f"{key}:{i}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user