ejermac
(Edwin Jr Ermac)
August 17, 2020, 3:26am
6
So I got an alexa, I use a virtual contact sensor with switch and use a routine to turn my Magiqtouch on and off - you can automate it in alexa too btw, depending on the temperature etc. :
Need a FAQ for the simplest version of this: a virtual on/off switch. Maybe even two FAQs, one for why you would want one with use case examples and one step by step how to for creating one in ST.
Thanks!
2023 Update
Since groovy will be going away soon, so will groovy virtual switches.
See the new FAQ for on the replacements:
FAQ: Creating Virtual Devices Without the IDE
/**
* Copyright 2015 SmartThings
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
*
*/
metadata {
definition (name: "Simulated Alexa Switch", namespace: "bjpierron", author: "bjpierron") {
capability "Switch"
capability "Sensor"
capability "Actuator"
capability "Contact Sensor"
This file has been truncated. show original
Use that sensor to automate the on / off process in the routine