mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
Command uses flash fullname instead of custom, to save on heap
This commit is contained in:
@@ -37,18 +37,18 @@ void AnalogSensor::start() {
|
||||
EMSdevice::DeviceType::ANALOGSENSOR,
|
||||
F_(info),
|
||||
[&](const char * value, const int8_t id, JsonObject & output) { return command_info(value, id, output); },
|
||||
uuid::read_flash_string(F_(info_cmd)));
|
||||
F_(info_cmd));
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::ANALOGSENSOR,
|
||||
F_(setvalue),
|
||||
[&](const char * value, const int8_t id) { return command_setvalue(value, id); },
|
||||
"set io value", // TODO this needs translating
|
||||
F("set io value"), // TODO this needs translating
|
||||
CommandFlag::ADMIN_ONLY);
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::ANALOGSENSOR,
|
||||
F_(commands),
|
||||
[&](const char * value, const int8_t id, JsonObject & output) { return command_commands(value, id, output); },
|
||||
uuid::read_flash_string(F_(commands_cmd)));
|
||||
F_(commands_cmd));
|
||||
|
||||
Mqtt::subscribe(EMSdevice::DeviceType::ANALOGSENSOR, "analogsensor/#", nullptr); // use empty function callback
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user