Skip to content

Commit

Permalink
Zigbee2mqtt: Add philips hue dimmer switch 324131092621 (#2009)
Browse files Browse the repository at this point in the history
  • Loading branch information
William-De71 authored Jan 29, 2024
1 parent 49c8237 commit a428cd5
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 3 deletions.
10 changes: 9 additions & 1 deletion front/src/config/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2546,7 +2546,15 @@
"35": "Notfall",
"36": "Alarm ausschalten",
"37": "Alarm für Tageszonen scharf schalten",
"38": "Alarm für alle Zonen scharf schalten"
"38": "Alarm für alle Zonen scharf schalten",
"39": "An-Taste gedrückt",
"40": "An-Taste gehalten",
"41": "Auf-Taste gedrückt",
"42": "Auf-Taste gehalten",
"43": "Ab-Taste gedrückt",
"44": "Ab-Taste gehalten",
"45": "Aus-Taste gedrückt",
"46": "Aus-Taste gehalten"
}
},
"opening-sensor": {
Expand Down
10 changes: 9 additions & 1 deletion front/src/config/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,15 @@
"35": "Emergency",
"36": "Disarm",
"37": "Arm day zones",
"38": "Arm all zones"
"38": "Arm all zones",
"39": "On press",
"40": "On hold",
"41": "Up press",
"42": "Up hold",
"43": "Down press",
"44": "Down hold",
"45": "Off press",
"46": "Off hold"
}
},
"opening-sensor": {
Expand Down
10 changes: 9 additions & 1 deletion front/src/config/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2550,7 +2550,15 @@
"35": "Urgence",
"36": "Désarmer alarme",
"37": "Armer zones jour",
"38": "Armer alarme"
"38": "Armer alarme",
"39": "Bouton On pressé",
"40": "Bouton On maintenu",
"41": "Bouton Plus pressé",
"42": "Bouton Plus maintenu",
"43": "Bouton Moins pressé",
"44": "Bouton Moins maintenu",
"45": "Bouton Off pressé",
"46": "Bouton Off maintenu"
}
},
"opening-sensor": {
Expand Down
9 changes: 9 additions & 0 deletions server/services/zigbee2mqtt/exposes/enumType.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ addMapping('action', BUTTON_STATUS.DISARM, 'disarm');
addMapping('action', BUTTON_STATUS.ARM_DAY_ZONES, 'arm_day_zones');
addMapping('action', BUTTON_STATUS.ARM_ALL_ZONES, 'arm_all_zones');

addMapping('action', BUTTON_STATUS.ON_PRESS, 'on-press');
addMapping('action', BUTTON_STATUS.ON_HOLD, 'on-hold');
addMapping('action', BUTTON_STATUS.UP_PRESS, 'up-press');
addMapping('action', BUTTON_STATUS.UP_HOLD, 'up-hold');
addMapping('action', BUTTON_STATUS.DOWN_PRESS, 'down-press');
addMapping('action', BUTTON_STATUS.DOWN_HOLD, 'down-hold');
addMapping('action', BUTTON_STATUS.OFF_PRESS, 'off-press');
addMapping('action', BUTTON_STATUS.OFF_HOLD, 'off-hold');

addMapping('state', COVER_STATE.OPEN, 'OPEN');
addMapping('state', COVER_STATE.CLOSE, 'CLOSE');
addMapping('state', COVER_STATE.STOP, 'STOP');
Expand Down
7 changes: 7 additions & 0 deletions server/services/zigbee2mqtt/exposes/numericType.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ module.exports = {
max: 10000,
},
names: {
duration: {
feature: {
category: DEVICE_FEATURE_CATEGORIES.DURATION,
type: DEVICE_FEATURE_TYPES.DURATION.DECIMAL,
unit: DEVICE_FEATURE_UNITS.SECONDS,
},
},
battery: {
feature: {
category: DEVICE_FEATURE_CATEGORIES.BATTERY,
Expand Down
8 changes: 8 additions & 0 deletions server/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ const BUTTON_STATUS = {
DISARM: 36,
ARM_DAY_ZONES: 37,
ARM_ALL_ZONES: 38,
ON_PRESS: 39,
ON_HOLD: 40,
UP_PRESS: 41,
UP_HOLD: 42,
DOWN_PRESS: 43,
DOWN_HOLD: 44,
OFF_PRESS: 45,
OFF_HOLD: 46,
};

const COVER_STATE = {
Expand Down

0 comments on commit a428cd5

Please sign in to comment.