From e394dd7067a4b69250c247e139c4c7552d497f9a Mon Sep 17 00:00:00 2001 From: JuniorInsta <117637536+JuniorInsta@users.noreply.github.com> Date: Mon, 25 Sep 2023 18:18:12 +0200 Subject: [PATCH] Added NEXENTRO Blinds Actuator Fingerprints (#971) --- .../SmartThings/zigbee-window-treatment/fingerprints.yml | 5 +++++ .../src/invert-lift-percentage/init.lua | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/SmartThings/zigbee-window-treatment/fingerprints.yml b/drivers/SmartThings/zigbee-window-treatment/fingerprints.yml index 9a4e57af23..12536b215d 100644 --- a/drivers/SmartThings/zigbee-window-treatment/fingerprints.yml +++ b/drivers/SmartThings/zigbee-window-treatment/fingerprints.yml @@ -103,6 +103,11 @@ zigbeeManufacturer: manufacturer: Smartwings model: WM25/L-Z deviceProfileName: window-treatment-battery + - id: "Insta GmbH/Blinds Actuator" + deviceLabel: NEXENTRO Blinds Actuator + manufacturer: Insta GmbH + model: NEXENTRO Blinds Actuator + deviceProfileName: window-treatment-profile zigbeeGeneric: - id: "genericShade" diff --git a/drivers/SmartThings/zigbee-window-treatment/src/invert-lift-percentage/init.lua b/drivers/SmartThings/zigbee-window-treatment/src/invert-lift-percentage/init.lua index e3d751cee0..338e1faaf3 100644 --- a/drivers/SmartThings/zigbee-window-treatment/src/invert-lift-percentage/init.lua +++ b/drivers/SmartThings/zigbee-window-treatment/src/invert-lift-percentage/init.lua @@ -23,7 +23,10 @@ local function current_position_attr_handler(driver, device, value, zb_rx) local level = 100 - value.value local current_level = device:get_latest_state("main", capabilities.windowShadeLevel.ID, capabilities.windowShadeLevel.shadeLevel.NAME) local windowShade = capabilities.windowShade.windowShade - if level == 0 then + if level == -155 then -- unknown position + device:emit_event(windowShade.unknown()) + device:emit_event(capabilities.windowShadeLevel.shadeLevel(100)) + elseif level == 0 then device:emit_event(windowShade.closed()) device:emit_event(capabilities.windowShadeLevel.shadeLevel(0)) elseif level == 100 then @@ -95,7 +98,8 @@ local ikea_window_treatment = { }, can_handle = function(opts, driver, device, ...) return device:get_manufacturer() == "IKEA of Sweden" or - device:get_manufacturer() == "Smartwings" + device:get_manufacturer() == "Smartwings" or + device:get_manufacturer() == "Insta GmbH" end }