From 85190aa9dd8e35c92515b477c1392b38149de5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Sun, 16 Oct 2022 21:36:14 +0200 Subject: [PATCH] Update hardware list and mode hardware ID to fw_version --- custom_components/plejd/light.py | 4 ++-- custom_components/plejd/pyplejd/plejd_device.py | 9 +++------ custom_components/plejd/switch.py | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/custom_components/plejd/light.py b/custom_components/plejd/light.py index 8f398da..2909ba1 100644 --- a/custom_components/plejd/light.py +++ b/custom_components/plejd/light.py @@ -48,10 +48,10 @@ class PlejdLight(LightEntity, CoordinatorEntity): "identifiers": {(DOMAIN, self.device.BLE_address)}, "name": self.device.name, "manufacturer": "Plejd", - "model": f"{self.device.model} ({self.device.hardwareId})", + "model": {self.device.model}, #"connections": ???, "suggested_area": self.device.room, - "sw_version": self.device.firmware, + "sw_version": f"{self.device.firmware} ({self.device.hardwareId})", } @property diff --git a/custom_components/plejd/pyplejd/plejd_device.py b/custom_components/plejd/pyplejd/plejd_device.py index 0283d4e..0b613e1 100644 --- a/custom_components/plejd/pyplejd/plejd_device.py +++ b/custom_components/plejd/pyplejd/plejd_device.py @@ -19,18 +19,15 @@ HARDWARE_TYPES = { "6": Device("WPH-01", SWITCH, False), "7": Device("REL-01", SWITCH, False), "8": Device("SPR-01", SWITCH, False), - "9": Device("-unknown-", LIGHT, False), "10": Device("WRT-01", SWITCH, False), "11": Device("DIM-01", LIGHT, True), - "12": Device("-unknown-", LIGHT, False), "13": Device("Generic", LIGHT, False), "14": Device("DIM-01", LIGHT, True), - "15": Device("-unknown-", LIGHT, False), - "16": Device("-unknown-", LIGHT, False), - "17": Device("REL-01", SWITCH, False), + "15": Device("DIM-02", LIGHT, True), + "17": Device("REL-01-2P", SWITCH, False), "18": Device("REL-02", SWITCH, False), - "19": Device("-unknown-", LIGHT, False), "20": Device("SPR-01", SWITCH, False), + "36": Device("LED-75", LIGHT, True), } class PlejdDevice: diff --git a/custom_components/plejd/switch.py b/custom_components/plejd/switch.py index 7e6bb19..bd16b18 100644 --- a/custom_components/plejd/switch.py +++ b/custom_components/plejd/switch.py @@ -48,10 +48,10 @@ class PlejdSwitch(SwitchEntity, CoordinatorEntity): "identifiers": {(DOMAIN, self.device.BLE_address)}, "name": self.device.name, "manufacturer": "Plejd", - "model": f"{self.device.model} ({self.device.hardwareId})", + "model": self.device.model, #"connections": ???, "suggested_area": self.device.room, - "sw_version": self.device.firmware, + "sw_version": f"{self.device.firmware} ({self.device.hardwareId})", } @property