mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-11 07:32:11 +01:00
16 lines
367 B
Markdown
16 lines
367 B
Markdown
|
```java
|
||
|
// This rule simulates a push button behaviour.
|
||
|
rule "PushButton of group gV"
|
||
|
when
|
||
|
Item gV changed
|
||
|
then
|
||
|
// waiting a second.
|
||
|
Thread::sleep(1000)
|
||
|
// Foreach-Switch-is-ON
|
||
|
gV.allMembers.filter( s | s.state == ON).forEach[i|
|
||
|
// switching OFF
|
||
|
i.sendCommand(OFF)
|
||
|
]
|
||
|
end
|
||
|
```
|