I also added a Lite version for devices that only need Switch, Contact, Motion, or Presence (ie for Alexa, IFTTT, and other integrations). It is a lot more light weight and efficient for devices that don't need all of the capabilities listed above. Recommend using this device driver for devices that don't need all of the capabilities.
//Can be used to integrate other systems/devices into Hubitat via 3rd party platforms like IFTTT, Alexa, Webhooks, etc
//Alexa Routines need to use Contact Sensors or Motion Sensors for their Triggers
//so if you need Alexa integration, make sure you enable the Contact or Motion Sensor functions in the preferences
//Note adding some capabilities like Lock or Door Control may limit where it can be used due to security
//Idea from Mike Maxwell's SmartThings uDTH: https://community.smartthings.com/t/release-universal-virtual-device-type-and-translator/47836
//If you need more than just SWITCH, CONTACT, MOTION, and/or PRESENCE, use my Virtual Switch uDTH Super device driver for that device instead.
//Force State Update preference will send an event everytime you manually push a form button or app tries to do something with the device. Ie. If the device is already On, and an app tries to turn it On, it will send a On/Open/Motion/Present event.
metadata {
definition (name: "Virtual Switch uDTH Lite", namespace: "sab0276", author: "Scott Barton") {
capability "Sensor"
capability "Actuator"
capability "Configuration"
//capability "Refresh"
capability "Switch" //"on", "off"
capability "Contact Sensor" //"open", "closed"
capability "Motion Sensor" //"active", "inactive"
capability "Presence Sensor" //"present", "not present"
}
This file has been truncated. show original
5 Likes