// Output true if detected is detected.
detected.setTypeEquals(BaseType.BOOLEAN);
// Identify the command to detect.
command = new StringParameter(this, "command");
command.addChoice("ON");
command.addChoice("OFF");
command.addChoice("ALL_LIGHTS_ON");
command.addChoice("ALL_LIGHTS_OFF");
command.addChoice("ALL_UNITS_OFF");
command.setExpression("ON");
// Parameters.
houseCode = new StringParameter(this, "houseCode");
houseCode.setExpression("A");
unitCode = new Parameter(this, "unitCode");
unitCode.setTypeEquals(BaseType.INT);
unitCode.setExpression("1");