mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix dashboard/disabled analog sensors
This commit is contained in:
@@ -400,8 +400,8 @@ void WebDataService::dashboard_data(AsyncWebServerRequest * request) {
|
||||
}
|
||||
}
|
||||
|
||||
// add analog sensors
|
||||
if (EMSESP::analog_enabled() && EMSESP::analogsensor_.have_sensors()) {
|
||||
// add analog sensors, count excludes disabled entries
|
||||
if (EMSESP::analog_enabled() && EMSESP::analogsensor_.count_entities(false)) {
|
||||
JsonObject obj = root.add<JsonObject>();
|
||||
obj["id"] = EMSdevice::DeviceTypeUniqueID::ANALOGSENSOR_UID; // it's unique id
|
||||
obj["t"] = EMSdevice::DeviceType::ANALOGSENSOR; // device type number
|
||||
|
||||
Reference in New Issue
Block a user