Change name of entity within WebUI #612

This commit is contained in:
Proddy
2022-09-09 17:04:31 +02:00
parent 9ae81779ff
commit 5845c37672
18 changed files with 100 additions and 72 deletions

View File

@@ -27,7 +27,7 @@
// POST
#define DEVICE_ENTITIES_PATH "/rest/deviceEntities"
#define MASKED_ENTITIES_PATH "/rest/maskedEntities"
#define CUSTOM_ENTITIES_PATH "/rest/customEntities"
#define RESET_CUSTOMIZATION_SERVICE_PATH "/rest/resetCustomizations"
namespace emsesp {
@@ -63,7 +63,7 @@ class EntityCustomization {
public:
uint8_t product_id; // device's product id
uint8_t device_id; // device's device id
std::vector<std::string> entity_ids; // array of entity ids with masks
std::vector<std::string> entity_ids; // array of entity ids with masks and optional custom fullname
};
class WebCustomization {
@@ -93,7 +93,7 @@ class WebCustomizationService : public StatefulService<WebCustomization> {
void devices(AsyncWebServerRequest * request);
// POST
void masked_entities(AsyncWebServerRequest * request, JsonVariant & json);
void custom_entities(AsyncWebServerRequest * request, JsonVariant & json);
void device_entities(AsyncWebServerRequest * request, JsonVariant & json);
void reset_customization(AsyncWebServerRequest * request);