From ed115f49dfd4963d86c3be29f21af86c45ca40a2 Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Tue, 17 Dec 2024 15:07:00 +0000 Subject: [PATCH] merge missing data --- aioshelly/rpc_device/device.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aioshelly/rpc_device/device.py b/aioshelly/rpc_device/device.py index 509db08f..8cae2bb2 100644 --- a/aioshelly/rpc_device/device.py +++ b/aioshelly/rpc_device/device.py @@ -557,5 +557,11 @@ async def _retrieve_blutrv_components(self, components: dict[str, Any]) -> None: ("BluTrv.GetRemoteStatus", {"id": _key[1]}), ] results = await self.call_rpc_multiple(calls) - self._config.update({component["key"]: results[0]["config"]["trv:0"]}) + + cfg: dict[str, Any] = results[0]["config"]["trv:0"] + # addr and name must be added from Shelly.GetComponents call + # model_id can't be retrieved, remote device call (TRV.GetConfig) needed + cfg.update({"addr": component["config"]["addr"]}) + cfg.update({"name": component["config"]["name"]}) + self._config.update({component["key"]: cfg}) self._status.update({component["key"]: results[1]["status"]["trv:0"]})