From 97e2727e37bace19924261f0cf0c4eea7e26bbe2 Mon Sep 17 00:00:00 2001 From: William Deren Date: Mon, 9 Dec 2024 22:06:14 +0100 Subject: [PATCH] add new enum pressed to click button --- front/src/config/i18n/de.json | 3 ++- front/src/config/i18n/en.json | 3 ++- front/src/config/i18n/fr.json | 3 ++- server/services/zigbee2mqtt/exposes/enumType.js | 2 ++ server/utils/constants.js | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/front/src/config/i18n/de.json b/front/src/config/i18n/de.json index 5699ffef2a..5f5603d75e 100644 --- a/front/src/config/i18n/de.json +++ b/front/src/config/i18n/de.json @@ -2926,7 +2926,8 @@ "56": "Helligkeit Auf-Taste Loslassen", "57": "Helligkeit Ab-Taste gedrückt", "58": "Helligkeit Ab-Taste gehalten", - "59": "Helligkeit Ab-Taste Loslassen" + "59": "Helligkeit Ab-Taste Loslassen", + "60": "Gedrückt" } }, "heater": { diff --git a/front/src/config/i18n/en.json b/front/src/config/i18n/en.json index 79fdb14478..eab6c239ea 100644 --- a/front/src/config/i18n/en.json +++ b/front/src/config/i18n/en.json @@ -2926,7 +2926,8 @@ "56": "Brightness Up Release", "57": "Brightness Down Click", "58": "Brightness Down Hold", - "59": "Brightness Down Release" + "59": "Brightness Down Release", + "60": "Pressed" } }, "heater": { diff --git a/front/src/config/i18n/fr.json b/front/src/config/i18n/fr.json index 0ba3a52b4a..cc857c2d09 100644 --- a/front/src/config/i18n/fr.json +++ b/front/src/config/i18n/fr.json @@ -2926,7 +2926,8 @@ "56": "Luminosité Plus Relâchée", "57": "Luminosité Moins Clic", "58": "Luminosité Moins Maintenu", - "59": "Luminosité Moins Relâchée" + "59": "Luminosité Moins Relâchée", + "60": "Pressé" } }, "heater": { diff --git a/server/services/zigbee2mqtt/exposes/enumType.js b/server/services/zigbee2mqtt/exposes/enumType.js index d133356904..f5c07b508e 100644 --- a/server/services/zigbee2mqtt/exposes/enumType.js +++ b/server/services/zigbee2mqtt/exposes/enumType.js @@ -87,6 +87,8 @@ addMapping('action', BUTTON_STATUS.BRIGHTNESS_DOWN_CLICK, 'brightness_down_click addMapping('action', BUTTON_STATUS.BRIGHTNESS_DOWN_HOLD, 'brightness_down_hold'); addMapping('action', BUTTON_STATUS.BRIGHTNESS_DOWN_RELEASE, 'brightness_down_release'); +addMapping('action', BUTTON_STATUS.PRESSED, 'pressed'); + addMapping('state', COVER_STATE.OPEN, 'OPEN'); addMapping('state', COVER_STATE.CLOSE, 'CLOSE'); addMapping('state', COVER_STATE.STOP, 'STOP'); diff --git a/server/utils/constants.js b/server/utils/constants.js index a185c249e6..3b3908636a 100644 --- a/server/utils/constants.js +++ b/server/utils/constants.js @@ -63,6 +63,7 @@ const BUTTON_STATUS = { BRIGHTNESS_DOWN_CLICK: 57, BRIGHTNESS_DOWN_HOLD: 58, BRIGHTNESS_DOWN_RELEASE: 59, + PRESSED: 60, }; const COVER_STATE = {