2020-09-21 01:58:32 +02:00
|
|
|
/**
|
|
|
|
*
|
2022-01-06 18:14:47 +01:00
|
|
|
* Copyright (c) 2010-2022 Contributors to the openHAB project
|
2020-09-21 01:58:32 +02:00
|
|
|
*
|
|
|
|
* See the NOTICE file(s) distributed with this work for additional
|
|
|
|
* information.
|
|
|
|
*
|
|
|
|
* This program and the accompanying materials are made available under the
|
|
|
|
* terms of the Eclipse Public License 2.0 which is available at
|
|
|
|
* http://www.eclipse.org/legal/epl-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* OpenHAB rules for velux binding:
|
|
|
|
* This rule simulates the push button behaviour.
|
|
|
|
*
|
|
|
|
* @author Guenther Schreiner - Initial contribution
|
|
|
|
*/
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
//
|
|
|
|
// vim: syntax=Xtend vim: noai:ts=4:sw=4
|
|
|
|
//
|
|
|
|
// end-of-rules/velux.rules
|
|
|
|
//
|