-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Two messages on Contact sensor state change instead of one #9846
Comments
@rbswift could you provide the debug log of this? See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging. |
Sure no problem. This example is with
|
What is logged before: |
Nothing really immediately before except the service startup I think...
|
I'm wondering if this might be related to the |
Yes, see #9519 , this problem should already be fixed in the dev branch (and tomorrows new release) |
Thanks closing as duplicate of #9519 |
What happened
After upgrading, contact sensors now send two messages for each state change: one for the previous state and one for the new state.
What did you expect to happen
Only send a message for the new state. Sending the old state breaks things that are triggered on that event. i.e. Door open event trigger when a door is actually closed. If consumers need the old state always available it can be set to retained. It seems inappropriate to send it when precisely the opposite is in fact what has occurred.
How to reproduce it (minimal and precise)
SONOFF SNZB-04 contact sensor:
Debug info
Zigbee2MQTT version: 1.22.0 commit: df0543d
Coordinator type zStack12
Frontend version 0.6.30
Adapter hardware: CC2531
Adapter firmware version: 20201127
The text was updated successfully, but these errors were encountered: