diff --git a/interface/package.json b/interface/package.json
index 51078e8e3..bcc223484 100644
--- a/interface/package.json
+++ b/interface/package.json
@@ -29,7 +29,7 @@
"@types/imagemin": "^8.0.3",
"@types/lodash-es": "^4.17.10",
"@types/node": "^20.8.10",
- "@types/react": "^18.2.33",
+ "@types/react": "^18.2.34",
"@types/react-dom": "^18.2.14",
"@types/react-router-dom": "^5.3.3",
"alova": "^2.13.1",
@@ -61,7 +61,7 @@
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-autofix": "^1.1.0",
"eslint-plugin-import": "^2.29.0",
- "eslint-plugin-jsx-a11y": "^6.7.1",
+ "eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "alpha",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts
index d2c340b93..09c8cc959 100644
--- a/interface/src/i18n/de/index.ts
+++ b/interface/src/i18n/de/index.ts
@@ -323,7 +323,14 @@ const de: Translation = {
WRITEABLE: 'Schreibbar',
SHOWING: 'Anzeigen von',
SEARCH: 'Suche',
- CERT: 'TLS Zertifikat (Freilassen um TLS zu deaktivieren)'
+ CERT: 'TLS Zertifikat (Freilassen um TLS zu deaktivieren)',
+ ON: 'An',
+ OFF: 'Aus',
+ POLARITY: 'Polarität',
+ ACTIVEHIGH: 'Aktiv Positiv',
+ ACTIVELOW: 'Aktiv Negativ',
+ UNCHANGED: 'Unverändert',
+ ALWAYS: 'Immer'
};
export default de;
diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts
index 10567ebb6..76b2db4dc 100644
--- a/interface/src/i18n/en/index.ts
+++ b/interface/src/i18n/en/index.ts
@@ -323,7 +323,14 @@ const en: Translation = {
WRITEABLE: 'Writeable',
SHOWING: 'Showing',
SEARCH: 'Search',
- CERT: 'TLS root certificate (leave blank to disable TLS)'
+ CERT: 'TLS root certificate (leave blank to disable TLS)',
+ ON: 'On',
+ OFF: 'Off',
+ POLARITY: 'Polarity',
+ ACTIVEHIGH: 'Active High',
+ ACTIVELOW: 'Active Low',
+ UNCHANGED: 'Unchanged',
+ ALWAYS: 'Always'
};
export default en;
diff --git a/interface/src/i18n/fr/index.ts b/interface/src/i18n/fr/index.ts
index 097efa8c2..f556dc261 100644
--- a/interface/src/i18n/fr/index.ts
+++ b/interface/src/i18n/fr/index.ts
@@ -323,7 +323,14 @@ const fr: Translation = {
WRITEABLE: 'Writeable', // TODO translate
SHOWING: 'Showing', // TODO translate
SEARCH: 'Search', // TODO translate
- CERT: 'TLS root certificate (leave blank to disable TLS)' // TODO translate
+ CERT: 'TLS root certificate (leave blank to disable TLS)', // TODO translate
+ ON: 'On', // TODO translate
+ OFF: 'Off', // TODO translate
+ POLARITY: 'Polarity', // TODO translate
+ ACTIVEHIGH: 'Active High', // TODO translate
+ ACTIVELOW: 'Active Low', // TODO translate
+ UNCHANGED: 'Unchanged', // TODO translate
+ ALWAYS: 'Always' // TODO translate
};
export default fr;
diff --git a/interface/src/i18n/it/index.ts b/interface/src/i18n/it/index.ts
index 71acefced..c303bcc00 100644
--- a/interface/src/i18n/it/index.ts
+++ b/interface/src/i18n/it/index.ts
@@ -325,7 +325,14 @@ const it: Translation = {
WRITEABLE: 'Scrivibile',
SHOWING: 'Visualizza',
SEARCH: 'Ricerca',
- CERT: 'TLS root certificate (leave blank to disable TLS)' // TODO translate
+ CERT: 'TLS root certificate (leave blank to disable TLS)', // TODO translate
+ ON: 'On', // TODO translate
+ OFF: 'Off', // TODO translate
+ POLARITY: 'Polarity', // TODO translate
+ ACTIVEHIGH: 'Active High', // TODO translate
+ ACTIVELOW: 'Active Low', // TODO translate
+ UNCHANGED: 'Unchanged', // TODO translate
+ ALWAYS: 'Always' // TODO translate
};
export default it;
diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts
index 1400870f7..b8c6eef7d 100644
--- a/interface/src/i18n/nl/index.ts
+++ b/interface/src/i18n/nl/index.ts
@@ -323,7 +323,14 @@ const nl: Translation = {
WRITEABLE: 'Beschrijfbare',
SHOWING: 'Tonen',
SEARCH: 'Zoek',
- CERT: 'TLS rootcertificaat (laat leeg om TLS uit te schakelen)'
+ CERT: 'TLS rootcertificaat (laat leeg om TLS uit te schakelen)',
+ ON: 'On', // TODO translate
+ OFF: 'Off', // TODO translate
+ POLARITY: 'Polarity', // TODO translate
+ ACTIVEHIGH: 'Active High', // TODO translate
+ ACTIVELOW: 'Active Low', // TODO translate
+ UNCHANGED: 'Unchanged', // TODO translate
+ ALWAYS: 'Always' // TODO translate
};
export default nl;
diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts
index 698714e3c..f660aa2d9 100644
--- a/interface/src/i18n/no/index.ts
+++ b/interface/src/i18n/no/index.ts
@@ -323,7 +323,14 @@ const no: Translation = {
WRITEABLE: 'Writeable', // TODO translate
SHOWING: 'Showing', // TODO translate
SEARCH: 'Search', // TODO translate
- CERT: 'TLS root certificate (leave blank to disable TLS)' // TODO translate
+ CERT: 'TLS root certificate (leave blank to disable TLS)', // TODO translate
+ ON: 'On', // TODO translate
+ OFF: 'Off', // TODO translate
+ POLARITY: 'Polarity', // TODO translate
+ ACTIVEHIGH: 'Active High', // TODO translate
+ ACTIVELOW: 'Active Low', // TODO translate
+ UNCHANGED: 'Unchanged', // TODO translate
+ ALWAYS: 'Always' // TODO translate
};
export default no;
diff --git a/interface/src/i18n/pl/index.ts b/interface/src/i18n/pl/index.ts
index 4404b7f53..63df4129d 100644
--- a/interface/src/i18n/pl/index.ts
+++ b/interface/src/i18n/pl/index.ts
@@ -323,7 +323,14 @@ const pl: BaseTranslation = {
WRITEABLE: 'zapisywalna',
SHOWING: 'Wyświetlane',
SEARCH: 'Szukaj',
- CERT: 'TLS root certificate (leave blank to disable TLS)' // TODO translate
+ CERT: 'TLS root certificate (leave blank to disable TLS)', // TODO translate
+ ON: 'On', // TODO translate
+ OFF: 'Off', // TODO translate
+ POLARITY: 'Polarity', // TODO translate
+ ACTIVEHIGH: 'Active High', // TODO translate
+ ACTIVELOW: 'Active Low', // TODO translate
+ UNCHANGED: 'Unchanged', // TODO translate
+ ALWAYS: 'Always' // TODO translate
};
export default pl;
diff --git a/interface/src/i18n/sv/index.ts b/interface/src/i18n/sv/index.ts
index f486955de..c1d2f0239 100644
--- a/interface/src/i18n/sv/index.ts
+++ b/interface/src/i18n/sv/index.ts
@@ -323,7 +323,14 @@ const sv: Translation = {
WRITEABLE: 'Writeable', // TODO translate
SHOWING: 'Showing', // TODO translate
SEARCH: 'Search', // TODO translate
- CERT: 'TLS root certificate (leave blank to disable TLS)' // TODO translate
+ CERT: 'TLS root certificate (leave blank to disable TLS)', // TODO translate
+ ON: 'On', // TODO translate
+ OFF: 'Off', // TODO translate
+ POLARITY: 'Polarity', // TODO translate
+ ACTIVEHIGH: 'Active High', // TODO translate
+ ACTIVELOW: 'Active Low', // TODO translate
+ UNCHANGED: 'Unchanged', // TODO translate
+ ALWAYS: 'Always' // TODO translate
};
export default sv;
diff --git a/interface/src/i18n/tr/index.ts b/interface/src/i18n/tr/index.ts
index f018b91ba..682c4648b 100644
--- a/interface/src/i18n/tr/index.ts
+++ b/interface/src/i18n/tr/index.ts
@@ -323,7 +323,14 @@ const tr: Translation = {
WRITEABLE: 'Writeable', // TODO translate
SHOWING: 'Showing', // TODO translate
SEARCH: 'Search', // TODO translate
- CERT: 'TLS root certificate (leave blank to disable TLS)' // TODO translate
+ CERT: 'TLS root certificate (leave blank to disable TLS)', // TODO translate
+ ON: 'On', // TODO translate
+ OFF: 'Off', // TODO translate
+ POLARITY: 'Polarity', // TODO translate
+ ACTIVEHIGH: 'Active High', // TODO translate
+ ACTIVELOW: 'Active Low', // TODO translate
+ UNCHANGED: 'Unchanged', // TODO translate
+ ALWAYS: 'Always' // TODO translate
};
export default tr;
diff --git a/interface/src/project/DashboardSensors.tsx b/interface/src/project/DashboardSensors.tsx
index 380587a9f..9fde6feae 100644
--- a/interface/src/project/DashboardSensors.tsx
+++ b/interface/src/project/DashboardSensors.tsx
@@ -16,7 +16,7 @@ import DashboardSensorsAnalogDialog from './DashboardSensorsAnalogDialog';
import DashboardSensorsTemperatureDialog from './DashboardSensorsTemperatureDialog';
import * as EMSESP from './api';
-import { DeviceValueUOM, DeviceValueUOM_s, AnalogTypeNames } from './types';
+import { DeviceValueUOM, DeviceValueUOM_s, AnalogTypeNames, AnalogType } from './types';
import { temperatureSensorItemValidation, analogSensorItemValidation } from './validators';
import type { TemperatureSensor, AnalogSensor } from './types';
import type { FC } from 'react';
@@ -38,7 +38,8 @@ const DashboardSensors: FC = () => {
initialData: {
ts: [],
as: [],
- analog_enabled: false
+ analog_enabled: false,
+ platform: 'ESP32'
}
});
@@ -391,7 +392,11 @@ const DashboardSensors: FC = () => {
{a.g} |
{a.n} |
{AnalogTypeNames[a.t]} |
- {a.t ? formatValue(a.v, a.u) : ''} |
+ {a.t === AnalogType.DIGITAL_OUT || a.t === AnalogType.DIGITAL_IN ? (
+ {a.v ? LL.ON() : LL.OFF()} |
+ ) : (
+ {a.t ? formatValue(a.v, a.u) : ''} |
+ )}
))}