Skip to content

Commit

Permalink
Handle TSTRING/TBOOL compat for rules (eg. light and dimmers states)
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Oct 24, 2024
1 parent 87c3aa3 commit 44caffb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bin/calaos_server/Rules/ActionStd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ bool ActionStd::Execute()
bval = out->get_value_bool();
ovar = true;
}
else if (out && out->get_type() == TSTRING)
{
bval = out->get_value_bool();
ovar = true;
}
}

if (ovar)
Expand Down Expand Up @@ -130,6 +135,11 @@ bool ActionStd::Execute()
sval = out->get_command_string();
ovar = true;
}
else if (out && out->get_type() == TBOOL)
{
sval = out->get_value_bool() ? "true" : "false";
ovar = true;
}
}
tmp = params[outputs[i]->get_param("id")];

Expand Down

0 comments on commit 44caffb

Please sign in to comment.