Skip to content

Commit

Permalink
Update bundles/org.openhab.binding.tapocontrol/src/main/java/org/open…
Browse files Browse the repository at this point in the history
…hab/binding/tapocontrol/internal/devices/rf/smartswitch/TapoSmartSwitchHandler.java

Co-authored-by: lsiepel <[email protected]>
Signed-off-by: Manfred Krämer <[email protected]>
  • Loading branch information
mkmannmanny and lsiepel authored Dec 25, 2024
1 parent 0d1cb0b commit 4a69ea0
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ public void handleCommand(ChannelUID channelUID, Command command) {
/* perform actions */
if (command instanceof RefreshType) {
setDeviceData();
} else if (command instanceof OnOffType) {
if (command == OnOffType.ON) {
deviceInfo.setDeviceOn(true);
} else {
deviceInfo.setDeviceOn(false);
}
} else if (command instanceof OnOffType onOffCommand) {
deviceInfo.setDeviceOn(OnOffType.ON.equals(onOffCommand));

hub.sendCommandToChild(deviceInfo);
} else {
Expand Down

0 comments on commit 4a69ea0

Please sign in to comment.