diff --git a/interface/src/project/DashboardData.tsx b/interface/src/project/DashboardData.tsx index e4154f18b..ac3b2dbdc 100644 --- a/interface/src/project/DashboardData.tsx +++ b/interface/src/project/DashboardData.tsx @@ -84,6 +84,7 @@ const DashboardData: FC = () => { const [coreData, setCoreData] = useState({ connected: true, devices: [], + s_n: '', active_sensors: 0, analog_enabled: false }); @@ -721,7 +722,7 @@ const DashboardData: FC = () => { - Sensors + {coreData.s_n} {LL.ATTACHED_SENSORS()} {coreData.active_sensors} diff --git a/interface/src/project/types.ts b/interface/src/project/types.ts index 02703a1f6..aa7230ed6 100644 --- a/interface/src/project/types.ts +++ b/interface/src/project/types.ts @@ -102,6 +102,7 @@ export interface SensorData { export interface CoreData { connected: boolean; devices: Device[]; + s_n: string; active_sensors: number; analog_enabled: boolean; } diff --git a/src/locale_translations.h b/src/locale_translations.h index aaa16871e..324d8f1fd 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -41,11 +41,12 @@ MAKE_PSTR_LIST(solar_device, "Solar Module", "Solarmodul", "Solar Module") MAKE_PSTR_LIST(connect_device, "Connect Module", "Verbindungsmodul", "Connect Module") MAKE_PSTR_LIST(mixer_device, "Mixer Module", "Mischermodul", "Mixer Module") MAKE_PSTR_LIST(controller_device, "Controller Module", "Kontrollmodul", "Controller Module") -MAKE_PSTR_LIST(switch_device, "Switch Module","Schaltmodul","Switch Module") -MAKE_PSTR_LIST(gateway_device, "Gateway Module","Gateway Modul","Gateway Module") -MAKE_PSTR_LIST(alert_device, "Alert Module","Alarmmodul","Alert Module") -MAKE_PSTR_LIST(pump_device, "Pump Module","Pumpenmodul","Pump Module") -MAKE_PSTR_LIST(heatsource_device, "Heatsource","Heizquelle","Heatsource") +MAKE_PSTR_LIST(switch_device, "Switch Module", "Schaltmodul", "Switch Module") +MAKE_PSTR_LIST(gateway_device, "Gateway Module", "Gateway Modul", "Gateway Module") +MAKE_PSTR_LIST(alert_device, "Alert Module", "Alarmmodul", "Alert Module") +MAKE_PSTR_LIST(pump_device, "Pump Module", "Pumpenmodul", "Pump Module") +MAKE_PSTR_LIST(heatsource_device, "Heatsource", "Heizquelle", "Heatsource") +MAKE_PSTR_LIST(sensors_device, "Sensors", "Sensoren", "Sensoren", "Sensorer", "czujniki", "Sensorer", "Capteurs") // commands MAKE_PSTR_LIST(info_cmd, "lists all values", "Liste aller Werte") diff --git a/src/web/WebDataService.cpp b/src/web/WebDataService.cpp index 5331bd09f..1c6b98c3c 100644 --- a/src/web/WebDataService.cpp +++ b/src/web/WebDataService.cpp @@ -93,6 +93,7 @@ void WebDataService::core_data(AsyncWebServerRequest * request) { } // sensors stuff + root["s_n"] = Helpers::translated_word(FL_(sensors_device)); root["active_sensors"] = EMSESP::dallassensor_.no_sensors() + (EMSESP::analogsensor_.analog_enabled() ? EMSESP::analogsensor_.no_sensors() : 0); root["analog_enabled"] = EMSESP::analogsensor_.analog_enabled(); root["connected"] = EMSESP::bus_status() != 2;