Skip to content

Commit

Permalink
Add IKEA Styrbar button (#1851)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Aug 25, 2023
1 parent 8145bb3 commit 03b4d08
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
8 changes: 7 additions & 1 deletion front/src/config/i18n/en.json
Expand Up @@ -2152,7 +2152,13 @@
"8": "Off",
"9": "Brightness down",
"10": "Brightness up",
"11": "Brightness stop"
"11": "Brightness stop",
"12": "Left arrow click",
"13": "Right arrow click",
"14": "Left arrow held",
"15": "Right arrow held",
"16": "Left arrow release",
"17": "Right arrow release"
}
},
"opening-sensor": {
Expand Down
8 changes: 7 additions & 1 deletion front/src/config/i18n/fr.json
Expand Up @@ -2153,7 +2153,13 @@
"8": "Off",
"9": "Réduire luminosité",
"10": "Augmenter luminosité",
"11": "Stopper luminosité"
"11": "Stopper luminosité",
"12": "Flèche gauche clic",
"13": "Flèche droite clic",
"14": "Flèche gauche maintenue",
"15": "Flèche droite maintenue",
"16": "Flèche gauche relâchée",
"17": "Flèche droite relâchée"
}
},
"opening-sensor": {
Expand Down
6 changes: 6 additions & 0 deletions server/services/zigbee2mqtt/exposes/enumType.js
Expand Up @@ -27,6 +27,12 @@ addMapping('action', BUTTON_STATUS.OFF, 'off');
addMapping('action', BUTTON_STATUS.BRIGHTNESS_MOVE_DOWN, 'brightness_move_down');
addMapping('action', BUTTON_STATUS.BRIGHTNESS_MOVE_UP, 'brightness_move_up');
addMapping('action', BUTTON_STATUS.BRIGHTNESS_STOP, 'brightness_stop');
addMapping('action', BUTTON_STATUS.ARROW_LEFT_CLICK, 'arrow_left_click');
addMapping('action', BUTTON_STATUS.ARROW_RIGHT_CLICK, 'arrow_right_click');
addMapping('action', BUTTON_STATUS.ARROW_LEFT_HOLD, 'arrow_left_hold');
addMapping('action', BUTTON_STATUS.ARROW_RIGHT_HOLD, 'arrow_right_hold');
addMapping('action', BUTTON_STATUS.ARROW_LEFT_RELEASE, 'arrow_left_release');
addMapping('action', BUTTON_STATUS.ARROW_RIGHT_RELEASE, 'arrow_right_release');

addMapping('state', COVER_STATE.OPEN, 'OPEN');
addMapping('state', COVER_STATE.CLOSE, 'CLOSE');
Expand Down
6 changes: 6 additions & 0 deletions server/utils/constants.js
Expand Up @@ -15,6 +15,12 @@ const BUTTON_STATUS = {
BRIGHTNESS_MOVE_DOWN: 9,
BRIGHTNESS_MOVE_UP: 10,
BRIGHTNESS_STOP: 11,
ARROW_LEFT_CLICK: 12,
ARROW_RIGHT_CLICK: 13,
ARROW_LEFT_HOLD: 14,
ARROW_RIGHT_HOLD: 15,
ARROW_LEFT_RELEASE: 16,
ARROW_RIGHT_RELEASE: 17,
};

const COVER_STATE = {
Expand Down

0 comments on commit 03b4d08

Please sign in to comment.