test for NO_VALUE in prep for Michael's change

This commit is contained in:
proddy
2025-03-15 13:01:29 +01:00
parent 594e10dbe1
commit 373895b36a

View File

@@ -383,8 +383,8 @@ std::string commands(std::string & expr, bool quotes = true) {
auto return_code = emsesp::Command::process(cmd_s.c_str(), true, input, output);
// check for no value (entity is valid but has no value set)
if (return_code == emsesp::CommandRet::NO_VALUE) {
return expr = ""; // just ignore for now
if (return_code != emsesp::CommandRet::OK && return_code != emsesp::CommandRet::NO_VALUE) {
return expr = "";
}
if (output["api_data"].is<std::string>()) {