Triggers from HE to Alexa are now very simple for users in countries that support the Alexa Skill.
Use this code from @cwwilson08 together with an Alexa Routine. On HE, you create a rule that turns on this virtual switch as the action. In the Alexa routine, this virtual device is recognized as a motion sensor. So you set the routine to speak a custom phrase when motion is detected.
metadata {
definition (name: "Virtual motion with Switch", namespace: "cw", author: "cwwilson08") {
capability "Sensor"
capability "Motion Sensor"
capability "Switch"
}
}
def on() {
sendEvent(name: "motion", value: "active")
sendEvent(name: "switch", value: "on")
runIn(12, off)
}
def off() {
sendEvent(name: "motion", value: "inactive")
sendEvent(name: "switch", value: "off")
}
def installed() {
}
Temperature is more difficult. If the device is not supported by the Alexa Skill, then getting temp at every increment isn't going to be feasible. However, as @Ryan780 suggested, you can certainly get specific levels reported by triggering virtual switches. I do a similar thing for the status of my washer and dryer (i.e. which is running, or both running, or neither running). There's a slight delay in getting the status, so I added the response "Checking, hang on" so the inquirer doesn't ask again before the status can be returned.
