Skip to content

Commit

Permalink
add new expose Volume
Browse files Browse the repository at this point in the history
  • Loading branch information
William-De71 committed Apr 1, 2024
1 parent 38401f3 commit 559d86b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions front/src/components/boxs/device-in-room/DeviceRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const ROW_TYPE_BY_FEATURE_TYPE = {
[DEVICE_FEATURE_TYPES.AIR_CONDITIONING.TARGET_TEMPERATURE]: ThermostatDeviceFeature,
[DEVICE_FEATURE_TYPES.SIREN.LMH_VOLUME]: LMHVolumeDeviceFeature,
[DEVICE_FEATURE_TYPES.SIREN.MELODY]: NumberDeviceFeature,
[DEVICE_FEATURE_TYPES.SIREN.VOLUME]: MultiLevelDeviceFeature,
[DEVICE_FEATURE_TYPES.DURATION.DECIMAL]: MultiLevelDeviceFeature
};

Expand Down
4 changes: 2 additions & 2 deletions front/src/config/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2882,8 +2882,8 @@
"binary": "Détection sabotage (Oui/Non)"
},
"ac-connected": {
"shortCategoryName": "Connecté Prise de courant",
"binary": "Conneté Prise de courant (Oui/Non)"
"shortCategoryName": "Prise de courant connecté",
"binary": "Prise de courant connecté (Oui/Non)"
},
"television": {
"shortCategoryName": "Télévision",
Expand Down
1 change: 1 addition & 0 deletions front/src/utils/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ export const DeviceFeatureCategoriesIcon = {
[DEVICE_FEATURE_CATEGORIES.SIREN]: {
[DEVICE_FEATURE_TYPES.SIREN.BINARY]: 'bell',
[DEVICE_FEATURE_TYPES.SIREN.LMH_VOLUME]: 'volume-1',
[DEVICE_FEATURE_TYPES.SIREN.VOLUME]: 'volume',
[DEVICE_FEATURE_TYPES.SIREN.MELODY]: 'music'
},
[DEVICE_FEATURE_CATEGORIES.TAMPER]: {
Expand Down
6 changes: 6 additions & 0 deletions server/services/zigbee2mqtt/exposes/numericType.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ module.exports = {
unit: DEVICE_FEATURE_UNITS.VOLT,
},
},
volume: {
feature: {
category: DEVICE_FEATURE_CATEGORIES.SIREN,
type: DEVICE_FEATURE_TYPES.SIREN.VOLUME,
},
},
// Lixee TIC Device
BASE: {
feature: {
Expand Down
1 change: 1 addition & 0 deletions server/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ const DEVICE_FEATURE_TYPES = {
SIREN: {
BINARY: 'binary',
LMH_VOLUME: 'volume',
VOLUME: 'volume',
MELODY: 'melody',
},
CHILD_LOCK: {
Expand Down

0 comments on commit 559d86b

Please sign in to comment.