From 57069ec48b3673a89a037cee429745e9db912231 Mon Sep 17 00:00:00 2001 From: William Deren Date: Fri, 18 Oct 2024 22:27:07 +0200 Subject: [PATCH] fix relay feature --- front/src/config/i18n/de.json | 2 +- front/src/config/i18n/en.json | 2 +- front/src/config/i18n/fr.json | 2 +- front/src/utils/consts.js | 2 +- server/services/zigbee2mqtt/exposes/numericType.js | 2 +- server/utils/constants.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/front/src/config/i18n/de.json b/front/src/config/i18n/de.json index 26e5f007ce..e1ca4d40e2 100644 --- a/front/src/config/i18n/de.json +++ b/front/src/config/i18n/de.json @@ -3080,6 +3080,7 @@ }, "teleinformation": { "shortCategoryName": "Teleinformation", + "binary": "Schalter", "east": "Gesamte gelieferte aktive Leistung (EAST)", "eait": "Gesamte eingespeiste aktive Leistung (EAIT)", "easf01": "Gesamte gelieferte aktive Leistung (EASF01)", @@ -3120,7 +3121,6 @@ "sinsti": "Sofortige eingespeiste Scheinleistung (SINSTI)", "smaxin": "Max. eingespeiste Scheinleistung n (SMAXIN)", "smaxin_1": "Max. eingespeiste Scheinleistung n-1 (SMAXIN-1)", - "relais": "Relais", "smaxn": "Gipfelgelieferte Scheinleistung 1 (SMAXN)", "smaxn2": "Gipfelgelieferte Scheinleistung 2 (SMAXN2)", "smaxn3": "Gipfelgelieferte Scheinleistung 3 (SMAXN3)", diff --git a/front/src/config/i18n/en.json b/front/src/config/i18n/en.json index 71e2de59db..4e5e1a28e5 100644 --- a/front/src/config/i18n/en.json +++ b/front/src/config/i18n/en.json @@ -3080,6 +3080,7 @@ }, "teleinformation": { "shortCategoryName": "Teleinformation", + "binary": "Switch", "east": "Total active power delivered (EAST)", "eait": "Total active power injected (EAIT)", "easf01": "Total active power delivered (EASF01)", @@ -3120,7 +3121,6 @@ "sinsti": "Instantaneous injected apparent power (SINSTI)", "smaxin": "Max. injected apparent power n (SMAXIN)", "smaxin_1": "Max. injected apparent power n-1 (SMAXIN-1)", - "relais": "Relay", "smaxn": "Peak delivered apparent power 1 (SMAXN)", "smaxn2": "Peak delivered apparent power 2 (SMAXN2)", "smaxn3": "Peak delivered apparent power 3 (SMAXN3)", diff --git a/front/src/config/i18n/fr.json b/front/src/config/i18n/fr.json index 684c9f2b2c..1cbeeaf3e5 100644 --- a/front/src/config/i18n/fr.json +++ b/front/src/config/i18n/fr.json @@ -3080,6 +3080,7 @@ }, "teleinformation": { "shortCategoryName": "Téléinformation", + "binary": "Relais", "east": "Puissance active totale délivrée (EAST)", "eait": "Puissance active totale injectée (EAIT)", "easf01": "Puissance active totale délivrée (EASF01)", @@ -3120,7 +3121,6 @@ "sinsti": "Puissance apparente instantanée injectée (SINSTI)", "smaxin": "Puissance apparente max. injectée n (SMAXIN)", "smaxin_1": "Puissance apparente max. injectée n-1 (SMAXIN-1)", - "relais": "Relais", "smaxn": "Puissance apparente délivrée de crête 1 (SMAXN)", "smaxn2": "Puissance apparente délivrée de crête 2 (SMAXN2)", "smaxn3": "Puissance apparente délivrée de crête 3 (SMAXN3)", diff --git a/front/src/utils/consts.js b/front/src/utils/consts.js index 47ad8cf838..6e2bdf8603 100644 --- a/front/src/utils/consts.js +++ b/front/src/utils/consts.js @@ -278,6 +278,7 @@ export const DeviceFeatureCategoriesIcon = { [DEVICE_FEATURE_TYPES.ENERGY_SENSOR.INDEX]: 'zap' }, [DEVICE_FEATURE_CATEGORIES.TELEINFORMATION]: { + [DEVICE_FEATURE_TYPES.TELEINFORMATION.BINARY]: 'power', [DEVICE_FEATURE_TYPES.TELEINFORMATION.EAST]: 'zap', [DEVICE_FEATURE_TYPES.TELEINFORMATION.EAIT]: 'zap', [DEVICE_FEATURE_TYPES.TELEINFORMATION.EASF01]: 'zap', @@ -318,7 +319,6 @@ export const DeviceFeatureCategoriesIcon = { [DEVICE_FEATURE_TYPES.TELEINFORMATION.SINSTI]: 'zap', [DEVICE_FEATURE_TYPES.TELEINFORMATION.SMAXIN]: 'zap', [DEVICE_FEATURE_TYPES.TELEINFORMATION.SMAXIN_1]: 'zap', - [DEVICE_FEATURE_TYPES.TELEINFORMATION.RELAIS]: 'zap', [DEVICE_FEATURE_TYPES.TELEINFORMATION.SMAXN]: 'zap', [DEVICE_FEATURE_TYPES.TELEINFORMATION.SMAXN2]: 'zap', [DEVICE_FEATURE_TYPES.TELEINFORMATION.SMAXN3]: 'zap', diff --git a/server/services/zigbee2mqtt/exposes/numericType.js b/server/services/zigbee2mqtt/exposes/numericType.js index 89e9959d4a..d3498fa0cb 100644 --- a/server/services/zigbee2mqtt/exposes/numericType.js +++ b/server/services/zigbee2mqtt/exposes/numericType.js @@ -583,7 +583,7 @@ module.exports = { RELAIS: { feature: { category: DEVICE_FEATURE_CATEGORIES.TELEINFORMATION, - type: DEVICE_FEATURE_TYPES.TELEINFORMATION.RELAIS, + type: DEVICE_FEATURE_TYPES.TELEINFORMATION.BINARY, }, }, SMAXN: { diff --git a/server/utils/constants.js b/server/utils/constants.js index b8fd6a6de0..22e1fd6b82 100644 --- a/server/utils/constants.js +++ b/server/utils/constants.js @@ -608,6 +608,7 @@ const DEVICE_FEATURE_TYPES = { DAILY_CONSUMPTION: 'daily-consumption', }, TELEINFORMATION: { + BINARY: 'binary', EAST: 'east', EAIT: 'eait', EASF01: 'easf01', @@ -648,7 +649,6 @@ const DEVICE_FEATURE_TYPES = { SINSTI: 'sinsti', SMAXIN: 'smaxin', SMAXIN_1: 'smaxin_1', - RELAIS: 'relais', SMAXN: 'smaxn', SMAXN2: 'smaxn2', SMAXN3: 'smaxn3',