I’m the one who wrote this functionality for this module, and I didn’t exactly design it to be able to send a notification for every state change. I designed it to look for a specific state and send a notification when the state matches something you’re looking for.
For example, if you want something to happen when your smart lock is in the unlocked state.
That being said, I just looked at the code again, and I don’t think it would be too difficult to modify it to notify on every state change if stateVal is empty.
Give me some time and I’ll see what I can do to make this happen for you.
I assume you would want the notification to return the current state of the sensor?