diff --git a/front/src/config/i18n/de.json b/front/src/config/i18n/de.json index 2ef3b832c0..f41db2910e 100644 --- a/front/src/config/i18n/de.json +++ b/front/src/config/i18n/de.json @@ -2898,6 +2898,13 @@ "one": "Ja" } }, + "input": { + "binary": { + "other": "Kein Wert empfangen", + "zero": "Aus", + "one": "An" + } + }, "risk": { "integer": { "no-risk": "Kein Risiko", @@ -3204,6 +3211,10 @@ "shortCategoryName": "Risiko", "integer": "Risikostufe" }, + "input": { + "shortCategoryName": "Eingang", + "binary": "Status des Eingangs" + }, "unknown": { "shortCategoryName": "Unbekannt", "unknown": "Unbekannt" diff --git a/front/src/config/i18n/en.json b/front/src/config/i18n/en.json index 05c245aa73..77dc498e7f 100644 --- a/front/src/config/i18n/en.json +++ b/front/src/config/i18n/en.json @@ -2898,6 +2898,13 @@ "one": "Yes" } }, + "input": { + "binary": { + "other": "No value received", + "zero": "Off", + "one": "On" + } + }, "risk": { "integer": { "no-risk": "No Risk", @@ -3204,6 +3211,10 @@ "shortCategoryName": "Risk", "integer": "Risk Level" }, + "input": { + "shortCategoryName": "Input", + "binary": "State of input" + }, "unknown": { "shortCategoryName": "Unknown", "unknown": "Unknown" diff --git a/front/src/config/i18n/fr.json b/front/src/config/i18n/fr.json index a23d5b0bac..9b7f9151e0 100644 --- a/front/src/config/i18n/fr.json +++ b/front/src/config/i18n/fr.json @@ -2898,6 +2898,13 @@ "one": "Oui" } }, + "input": { + "binary": { + "other": "Aucune valeur reçue", + "zero": "Off", + "one": "On" + } + }, "risk": { "integer": { "no-risk": "Pas de risque", @@ -3204,6 +3211,10 @@ "shortCategoryName": "Risque", "integer": "Niveau de risque" }, + "input": { + "shortCategoryName": "Entrée", + "binary": "Etat de l'entrée" + }, "unknown": { "shortCategoryName": "Inconnu", "unknown": "Inconnu" diff --git a/front/src/utils/consts.js b/front/src/utils/consts.js index 2f117262bb..3df6aa1de0 100644 --- a/front/src/utils/consts.js +++ b/front/src/utils/consts.js @@ -345,5 +345,8 @@ export const DeviceFeatureCategoriesIcon = { }, [DEVICE_FEATURE_CATEGORIES.RISK]: { [DEVICE_FEATURE_TYPES.RISK.INTEGER]: 'alert-circle' + }, + [DEVICE_FEATURE_CATEGORIES.INPUT]: { + [DEVICE_FEATURE_TYPES.INPUT.BINARY]: 'arrow-right' } }; diff --git a/server/services/zigbee2mqtt/exposes/binaryType.js b/server/services/zigbee2mqtt/exposes/binaryType.js index 66fd76cf0f..397783ff5b 100644 --- a/server/services/zigbee2mqtt/exposes/binaryType.js +++ b/server/services/zigbee2mqtt/exposes/binaryType.js @@ -90,6 +90,12 @@ const names = { type: DEVICE_FEATURE_TYPES.SENSOR.BINARY, }, }, + input: { + feature: { + category: DEVICE_FEATURE_CATEGORIES.INPUT, + type: DEVICE_FEATURE_TYPES.INPUT.BINARY, + }, + }, }; module.exports = { diff --git a/server/utils/constants.js b/server/utils/constants.js index d669799326..59c142c256 100644 --- a/server/utils/constants.js +++ b/server/utils/constants.js @@ -490,6 +490,7 @@ const DEVICE_FEATURE_CATEGORIES = { VOC_INDEX_SENSOR: 'voc-index-sensor', VOLUME_SENSOR: 'volume-sensor', TEXT: 'text', + INPUT: 'input', }; const DEVICE_FEATURE_TYPES = { @@ -678,6 +679,9 @@ const DEVICE_FEATURE_TYPES = { RISK: { INTEGER: 'integer', }, + INPUT: { + BINARY: 'binary', + }, }; const DEVICE_FEATURE_UNITS = {