mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-21 05:10:50 +00:00
Merge pull request #326 from Yaima/master
Implemented toggle() for locks
This commit is contained in:
@@ -246,6 +246,9 @@ def toggle(devices) {
|
|||||||
else if (devices*.currentValue('lock').contains('locked')) {
|
else if (devices*.currentValue('lock').contains('locked')) {
|
||||||
devices.unlock()
|
devices.unlock()
|
||||||
}
|
}
|
||||||
|
else if (devices*.currentValue('lock').contains('unlocked')) {
|
||||||
|
devices.lock()
|
||||||
|
}
|
||||||
else if (devices*.currentValue('alarm').contains('off')) {
|
else if (devices*.currentValue('alarm').contains('off')) {
|
||||||
devices.siren()
|
devices.siren()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user