Sonoff SNZB-04P strangeness

I have previously used, without problems, Sonoff SNZB-04 (no P suffix) door window switches with ZHA and a SkyConnect dongle.

I bought some SNZB-04P devices and they have a tamper switch in addition to the magnetic sensor. They show up in HA via ZHA with two identically-named open/close entities. One opens and closes based on the state of the magnetic sensor but the second does not change state and it does not seem that the tamper switch causes any change in the log.

It seems to me that the two switches should have different names and the second one should reflect the state of the tamper switch (plunger).

Has anyone else experienced anything like this?

Same here, except the switches do have different names. I’d imagine the added functionality is available with Z2MQTT, but not at the moment with ZHA.

Exact the same here: I have a SNZB-04P with two “opening” sensors, one controlled by the reed sensor, and the other one is always “Closed” no matter what.

I also checked the logs and monitored zha_events for any traces, but clearly the tamper proof switch doesn’t show up. That’s a bummer; I was hoping I’d get a two-for-one sensor.

Hey, I had the same issue, so I started writing a ZHA Quirk in order to fix this. It worked on my Home Assistant server, and I now have a new tamper_proof_status entity. But when I decided to create a PR with this code I realized someone wrote a fix already (not merged yet, seems OK though) : Add Sonoff SNZB-04P device support with custom clusters by mguaylam · Pull Request #3665 · zigpy/zha-device-handlers · GitHub

If you want to add it manually to your Home Assistant even before it’s merged, it’s easy :

  1. Create a /config/custom_zha_quirks folder
  2. Add the new file from the PR link
  3. Add the following configuration to your configuration.yaml :
zha:
  custom_quirks_path: /config/custom_zha_quirks
  1. Delete the SNZB-04P device
  2. Restart Home Assistant
  3. Add the device again

It will still take a while to be added, but you’ll have a new tamper entity :slight_smile:

Do you happen to know how to fix this duplicated open/close entities?