section("Select switches named after Hello Home phrases") {
input "switches", "capability.switch", title: "Switches", multiple: true
}
+ section("Change to this mode") {
+ input "newMode", "mode", title: "Mode?"
+ }
}
}
if (phrase) {
location.helloHome.execute(phrase.label)
}
- def mode = location.modes.find { it.name == s.displayName }
- if (mode) {
- setLocationMode(mode)
+ // This looks like a bug because device's displayName has nothing to do with modes
+ //def mode = location.modes.find { it.name == s.displayName }
+ if (newMode) {
+ setLocationMode(newMode)
}
}