Hello,
have read about items and manipulating with them in rules https://www.openhab.org/docs/configuration/rules-dsl.html#manipulating-item-states
but have not found i simple function.
Can i switch the switch without a rule like this?
rule "Change Switch"
when
Item SocketItemController received command
then
if (SocketItem.state == ON) {
SocketItem.sendCommand(OFF)
} else {
SocketItem.sendCommand(ON)
}
end
i mean without this part of it
if (SocketItem.state == ON) {
SocketItem.sendCommand(OFF)
} else {
SocketItem.sendCommand(ON)
}
using something to change it like
SocketItem.changeState()
The background: i want to turn of and off the switch with only one button on remote controller.
Thanks a lot!