«
Rule languages supports extensions to OnOffType
logger.info("OnOffType inspected: #{ON.inspect}")
logger.info("OnOffType is on: #{<state>.on?}")
logger.info("OnOffType is off: #{<state>.off?}")
state | on | off | |
---|---|---|---|
ON | true | false | |
OFF | false | true |
type | name | state |
---|---|---|
Switch | Switch1 | <state> |
case Switch1
when ON then logger.info('Switch1 is on')
when OFF then logger.info('Switch1 is off')
else logger.info('Switch1 is unknown')
end
state | result | |
---|---|---|
ON | on | |
OFF | off |