attributes for all entities

This commit is contained in:
MichaelDvP
2026-07-15 14:00:03 +02:00
parent a80ec9cf7e
commit 5397d5d33a
3 changed files with 10 additions and 11 deletions
+2 -2
View File
@@ -421,9 +421,9 @@ void WebCustomEntityService::get_value_json(JsonObject output, CustomEntityItem
output["fullname"] = (const char *)entity.name;
output["storage"] = entity.ram == 1 ? "ram" : entity.ram == 2 ? "nvs" : "ems";
output["type"] = entity.value_type == DeviceValueType::BOOL ? "boolean" : entity.value_type == DeviceValueType::STRING ? "string" : F_(number);
// output["readable"] = true;
output["readable"] = true;
output["writeable"] = entity.writeable;
// output["visible"] = true;
output["visible"] = true;
if (entity.ram == 0) {
output["device_id"] = Helpers::hextoa(entity.device_id);