This commit is contained in:
Ziver Koc 2021-08-30 01:47:49 +02:00
parent 1cbb44f714
commit d00a13bb50

View file

@ -70,7 +70,7 @@ public class OnOffTrait extends DeviceTrait {
public void execute(HalAbstractDevice device, ExecuteRequest.Inputs.Payload.Commands.Execution execution) {
if ("action.devices.commands.OnOff".equals(execution.command)) {
OnOffEventData eventData = new OnOffEventData();
if ("on".equals(execution.getParams().get("on")))
if ((boolean) execution.getParams().get("on"))
eventData.turnOn();
else
eventData.turnOff();