Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.36k stars 1.62k forks source link

Missing Device Actions in HA #22506

Open jamesonuk opened 1 month ago

jamesonuk commented 1 month ago

What happened?

After restarting Z2M and HA I am missing some device actions that existed previously and are used in automations.

I can see the issue but not identify where this is not working. The action topic appears to be working fine image

but the HA device_automation topic is not image

This is a three button switch (https://www.zigbee2mqtt.io/devices/QBKG25LM.html#aqara-qbkg25lm) and I have automations built around "single_left" and "single_centre" actions but these just don't show up here and hence don't appear in HA. My understanding was that they would appear once first seen but whist clicking the buttons are generating the appropriate action topic but not the device_automation one.

If I manually publish a message to homeassistant/device_automation/0x54ef4410009737dd/action_single_left/config with payload

{
  "automation_type": "trigger",
  "device": {
    "identifiers": [
      "zigbee2mqtt_0x54ef4410009737dd"
    ],
    "manufacturer": "Aqara",
    "model": "Smart wall switch D1 (no neutral, triple rocker) (QBKG25LM)",
    "name": "Kitchen Light Switch",
    "via_device": "zigbee2mqtt_bridge_0x00212effff070ec3"
  },
  "origin": {
    "name": "Zigbee2MQTT",
    "sw": "1.37.0",
    "url": "https://www.zigbee2mqtt.io"
  },
  "payload": "single_left",
  "subtype": "single_left",
  "topic": "zigbee2mqtt/Kitchen Light Switch/action",
  "type": "action"
}

then it appears in HA.

I have also experience this on some Hue Wall Switch Modules (the only other switches I am using)

What did you expect to happen?

Actions would get passed to HA

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.37.0

Adapter firmware version

0x26780700

Adapter

Conbee II

Setup

Docker

Debug log

No response

jamesonuk commented 1 month ago

Now I am really confused.... I just added a new Hue Wall Swich Module and this is what I get image no device automation messages at all even though actions are being fired and recorded image but the triggers are showing up in HA.... image

but the docs suggest this should only show up with an MQTT device trigger message.... https://www.home-assistant.io/integrations/device_trigger.mqtt/

I also realised I have a Sonoff SNZB-01P button and this also stopped working and I can see the action messages flowing fine but there are no device_automation messages and no actual button press actions show up in HA (should have single, double and long) image

tehvicke commented 1 month ago

Happened to me too a ~week ago. Five seemingly random lights lost it's action - however some other entities (update_available, power_on_behaviour) from those same units are still reachable in HA.

The groups containing the entities are also not reachable in HA, which makes me think it's a Z2M issue.

tehvicke commented 1 month ago

Happened to me too a ~week ago. Five seemingly random lights lost it's action - however some other entities (update_available, power_on_behaviour) from those same units are still reachable in HA.

The groups containing the entities are also not reachable in HA, which makes me think it's a Z2M issue.

This was resolved by restoring to a previous version.

akinomeroglu commented 1 month ago

Hi,

I can repeat this bug with latest development release. sha256:58c7c45534f275f1b68caa1354f99bfdb2734f95de6e9576d1e59d12b49e37d5. When I revert to latest it started to work again in HA automations.