Notification not receive when mode change AWAY/HOME


#1

Hello to all

i want to receive notification when i change a mode to away and home mode …i have the push notification option in Good bye mode ,i am back mode and its activated but notifications not received …

thanks


(Võ Thanh Minh) #2

Maybe use code

def installed() {
subscribe(location, “mode”, modeChangeHandler)
}

def modeChangeHandler(evt) {

if (evt.value==“Home”) { sendPush(“your msg1”)}
if (evt.value==“Away”) { sendPush(“your msg2”)}
if (evt.value==“Night”) { sendPush(“your msg3”)}
}
:sunglasses: