mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
show entity count in device list, remove type
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.6.3-dev.3"
|
||||
#define EMSESP_APP_VERSION "3.6.3-dev.4"
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user