mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
fix command name for custom entities
This commit is contained in:
@@ -129,9 +129,9 @@ StateUpdateResult WebCustomEntity::update(JsonObject root, WebCustomEntity & web
|
|||||||
if (entityItem.writeable && !entityItem.name.empty()) {
|
if (entityItem.writeable && !entityItem.name.empty()) {
|
||||||
Command::add(
|
Command::add(
|
||||||
EMSdevice::DeviceType::CUSTOM,
|
EMSdevice::DeviceType::CUSTOM,
|
||||||
entityItem.name.c_str(),
|
webCustomEntity.customEntityItems.back().name.c_str(),
|
||||||
[entityItem](const char * value, const int8_t id) {
|
[webCustomEntity](const char * value, const int8_t id) {
|
||||||
return EMSESP::webCustomEntityService.command_setvalue(value, id, entityItem.name.c_str());
|
return EMSESP::webCustomEntityService.command_setvalue(value, id, webCustomEntity.customEntityItems.back().name.c_str());
|
||||||
},
|
},
|
||||||
FL_(entity_cmd),
|
FL_(entity_cmd),
|
||||||
CommandFlag::ADMIN_ONLY);
|
CommandFlag::ADMIN_ONLY);
|
||||||
|
|||||||
Reference in New Issue
Block a user