show entity count in device list, remove type

This commit is contained in:
Proddy
2023-10-17 22:55:47 +02:00
parent f9a176e09c
commit a1bb49359f
6 changed files with 31 additions and 18 deletions

View File

@@ -243,7 +243,7 @@ bool DeviceValue::hasValue() const {
has_value = Helpers::hasValue(*(uint32_t *)(value_p));
break;
case DeviceValueType::CMD:
has_value = false; // commands don't have values!
has_value = true; // we count command as an actual entity
break;
default:
break;

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.6.3-dev.3"
#define EMSESP_APP_VERSION "3.6.3-dev.4"

View File

@@ -88,6 +88,7 @@ void WebDataService::core_data(AsyncWebServerRequest * request) {
obj["d"] = emsdevice->device_id(); // deviceid
obj["p"] = emsdevice->product_id(); // productid
obj["v"] = emsdevice->version(); // version
obj["e"] = emsdevice->count_entities(); // number of entities
}
}
@@ -102,6 +103,7 @@ void WebDataService::core_data(AsyncWebServerRequest * request) {
obj["d"] = 0; // deviceid
obj["p"] = 0; // productid
obj["v"] = 0; // version
obj["e"] = EMSESP::webCustomEntityService.count_entities(); // number of custom entities
}
root["connected"] = EMSESP::bus_status() != 2;