don't show gateways

This commit is contained in:
proddy
2026-07-12 22:02:14 +02:00
parent 7721993937
commit 0ff0ff7d6c
2 changed files with 3 additions and 2 deletions

View File

@@ -25,3 +25,4 @@ For more details go to [emsesp.org](https://emsesp.org/).
- network fallback to AP only after start [#3090](https://github.com/emsesp/EMS-ESP32/issues/3090)
- replaced Web async-validator with custom validator and toast with native snackbar to reduce bundle size
- Dewtemperature for Easycontrol calculated by ems-esp [3135](https://github.com/emsesp/EMS-ESP32/issues/3135)
- Gateway and Connect devices are not shown in the Devices page [3126](https://github.com/emsesp/EMS-ESP32/discussions/3126)

View File

@@ -64,8 +64,8 @@ void WebDataService::core_data(AsyncWebServerRequest * request) {
// list is already sorted by device type
JsonArray devices = root["devices"].to<JsonArray>();
for (const auto & emsdevice : EMSESP::emsdevices) {
// ignore controller
if (emsdevice && (emsdevice->device_type() != EMSdevice::DeviceType::CONTROLLER || emsdevice->count_entities() > 0)) {
// ignore controller and gateway
if (emsdevice && (emsdevice->device_type() != EMSdevice::DeviceType::CONTROLLER && emsdevice->device_type() != EMSdevice::DeviceType::GATEWAY && emsdevice->count_entities() > 0)) {
JsonObject obj = devices.add<JsonObject>();
obj["id"] = emsdevice->unique_id(); // a unique id
obj["tn"] = emsdevice->device_type_2_device_name_translated(); // translated device type name