Hi All
i have been playing with a driver for an alarm interface and cannot seem to get RM to trigger on a custom attribute if i select changed in the trigger.
To test this i created the cut down driver below
metadata {
definition (name: "Attribute Test", namespace: "entire", author: "Entire") {
capability "Presence Sensor"
attribute "alarmState", "enum", ["unset", "set", "active", "confirmed"]
command "alarmSet"
command "alarmUnset"
command "alarmActive"
command "alarmConfirmed"
}
}
def alarmSet() {
log.info "Alarm now set"
sendEvent(name: "alarmState", value: "set", descriptionText: "Alarm is set")
}
def alarmUnset() {
log.info "Alarm now unset"
sendEvent(name: "alarmState", value: "unset", descriptionText: "Alarm is unset")
}
def alarmActive() {
log.info "Alarm now active"
sendEvent(name: "alarmState", value: "active", descriptionText: "Alarm is active")
}
def alarmConfirmed() {
log.info "Alarm now set"
sendEvent(name: "alarmState", value: "confirmed", descriptionText: "Alarm is confirmed")
}
created a device with this driver called "Attribute Test" and the following rule
I can then set the alarmState to any of the 4 values but it never triggers the rule.
If i change the rule to trigger from the individually values then it triggers correctly.
Has anyone seen this before, is there a bug in the way it handles custom attributes or am i doing something wrong ?
Edit: sorry forgot say i am using version 2.1.6.118
Cheers