From 201fb8fe4b7624a0f4aa5c7d04ca92e923e51b05 Mon Sep 17 00:00:00 2001 From: Xavier Moreno Date: Sat, 1 Jan 2022 18:31:35 +0100 Subject: [PATCH] fix(device): fix z2m mapping for IM6001-BTP01 related to #397 --- RELEASE_NOTES.md | 11 ++++++----- apps/controllerx/cx_devices/smartthings.py | 4 ++-- docs/_data/controllers/IM6001-BTP01.yml | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0189ada3..46097fd5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,14 +6,13 @@ _This minor change does not contain any breaking changes._ _Note: Remember to restart the AppDaemon addon/server after updating to a new version._ PRERELEASE_NOTE + -- Add `previous_state` attribute to restrict when an action is performed depending on the previous state of the entity. This is just applicable for `state` and `z2m` (with not MQTT) integrations. [#366] -- Add `cover_duration` attribute. Duration of the cover to open and/or close in seconds, so `toggle_open` and `toggle_close` can stop the cover if the cover is still moving. This is recommended to be used when the cover does not report `opening` and `closing` states, otherwise, it is not necessary. [#368] - - + +- [IM6001-BTP01](https://xaviml.github.io/controllerx/controllers/IM6001-BTP01) - fix z2m mapping + diff --git a/apps/controllerx/cx_devices/smartthings.py b/apps/controllerx/cx_devices/smartthings.py index ebccf7de..eaffa855 100644 --- a/apps/controllerx/cx_devices/smartthings.py +++ b/apps/controllerx/cx_devices/smartthings.py @@ -10,8 +10,8 @@ class SmartThingsButtonLightController(LightController): def get_z2m_actions_mapping(self) -> DefaultActionsMapping: return { - "single_click": Light.TOGGLE, - "double_click": Light.ON_FULL_BRIGHTNESS, + "single": Light.TOGGLE, + "double": Light.ON_FULL_BRIGHTNESS, "hold": Light.SET_HALF_BRIGHTNESS, } diff --git a/docs/_data/controllers/IM6001-BTP01.yml b/docs/_data/controllers/IM6001-BTP01.yml index 3dfe6c8a..8f4f7e19 100644 --- a/docs/_data/controllers/IM6001-BTP01.yml +++ b/docs/_data/controllers/IM6001-BTP01.yml @@ -20,8 +20,8 @@ integrations: - name: Zigbee2MQTT codename: z2m actions: - - "single_click → 1 click" - - "double_click → 2 clicks" + - "single → 1 click" + - "double → 2 clicks" - "hold → Hold the button" - name: deCONZ codename: deconz