Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
seaside1 authored May 4, 2022
1 parent 9b72cd7 commit 4541827
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,9 @@ Use case: Use forName to create and item and send commands and get status
@JRuleWhen(item=_MyTestSwitch.ITEM, trigger=_MyTestSwitch.TRIGGER_CHANGED_TO_ON)
public void testForName(JRuleEvent event) {
JRuleSwitchItem switchItem = JRuleSwitchItem.forName("MyOtherTestSwitch");
switchItem.sendCommand(OFF);
if (switchItem.getStatus == ON) {
switchItem.sendCommand(OFF);
switchItem.sendItemCommand(OFF);
if (switchItem.getItemStatus == ON) {
switchItem.sendItemCommand(OFF);
}
}
}
Expand Down

0 comments on commit 4541827

Please sign in to comment.