Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Off unlocks. but unlocking does Switch Off.. #25

Open
TheFatherMind opened this issue Jan 2, 2023 · 1 comment
Open

Switch Off unlocks. but unlocking does Switch Off.. #25

TheFatherMind opened this issue Jan 2, 2023 · 1 comment

Comments

@TheFatherMind
Copy link

I had to add
sendEvent(name:"switch",value:"on")
to void lock.. and also unlock...

because unlocking does not switch off which makes referring to the switch portion of it useless if someone uses the lock side.

void lock(){
    String descriptionText = "${device.displayName} was locked"
    if (txtEnable) log.info "${descriptionText}"
    sendEvent(name:"lock",value:"locked",descriptionText: descriptionText, type:"digital")
    sendEvent(name:"switch",value:"on")
}
@dug415
Copy link

dug415 commented Jan 23, 2023

void lock(){
String descriptionText = "${device.displayName} was locked"
if (txtEnable) log.info "${descriptionText}"
sendEvent(name:"lock",value:"locked",descriptionText: descriptionText, type:"digital")
sendEvent(name:"switch",value:"on")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants