From aad0aa27f048b41ef7849ed87b00cf885f2448ab Mon Sep 17 00:00:00 2001 From: Nik Klever Date: Sat, 25 Mar 2023 17:16:38 +0100 Subject: [PATCH] change self.devices to ZWaveMeData instances in get_devices change self.devices to ZWaveMeData instances in type 'get_devices', to be conform with other types --- zwave_me_ws/ZWaveMe.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zwave_me_ws/ZWaveMe.py b/zwave_me_ws/ZWaveMe.py index 8421f8d..55e8c5e 100644 --- a/zwave_me_ws/ZWaveMe.py +++ b/zwave_me_ws/ZWaveMe.py @@ -165,13 +165,13 @@ def on_message(self, _, utf): body = json.loads(dict_data["data"]["body"]) if "devices" in body["data"]: - self.devices = [ + self.devices = prepare_devices([ device for device in body["data"]["devices"] if device["deviceType"] in self.platforms - ] + ]) if self.on_device_create: - self.on_device_create(prepare_devices(self.devices)) + self.on_device_create(self.devices) elif dict_data["type"] == "get_device_info": if "data" not in dict_data or "body" not in dict_data["data"]: