MQTT (Zigbee2MQTT) actions are disappearing from HA

Hi,

I am using Zigbee2MQTT with the MQTT integration in HA to get all my zigbee devices into HA. Those devices have actions, for single / double / long pushes on buttons for examples. For an unknown reason, these actions tend to disappear completely from HA after a few days if I’m not using them:


Here, most of my actions disappeared. This device has 4 buttons with 3 actions for each.

When I do one of these actions, the actions re-appears. And then disappear again in a few days if I didn’t use it. This is a problem because the 1st usage after a disappearance makes it re-appear but doesn’t trigger the automation that is linked to it. Which means I have to do the action 2 times if I want HA to do what I want.

I don’t know if this comes from Z2M, Mqtt or HA. But I think it comes from HA because the device stays in Z2M. Is there a setting to activate or additionnal configuration to do in one of those services ?

Thanks in advance for any help, have a great day

1 Like

Hi, would anybody have an idea ? Thanks in advance for your help

Can you post the automation in yaml ?

Of course, here it is:

alias: Plafond
description: ""
trigger:
  - platform: device
    domain: mqtt
    device_id: 4771678d9af6151e4d88dfc0e841fd42
    type: action
    subtype: 1_single
    discovery_id: 0x70ac08fffe70559b action_1_single
  - platform: device
    domain: mqtt
    device_id: 4b71ce013811639f2e95d911a0c57ce4
    type: action
    subtype: 1_single
    discovery_id: 0xa4c13848c99e93cb action_1_single
condition: []
action:
  - type: toggle
    device_id: aec9521188aa3ee1beb780e42677e036
    entity_id: light.plafond
    domain: light
mode: single

Same problem, and I’m really getting fed up with Home Assistant.

There’s always something that doesn’t work. And even things that used to work suddenly don’t work anymore. It’s really tiring.

I use a Hue Dimmer Switch to control my bedside lamps. And suddenly it no longer works.

Zigbee2MQTT sends the actions on-press, off-press, up-press and down-press which are correctly retrieved by Home Assistant… But HA doesn’t do anything with it.

When I go to the configured automation, I see that all the *-press actions have disappeared… All that’s left are the *-hold actions…

And the configuration actions are marked as “Unknown trigger” in UI.

Here is the trigger configuration as YAML:

trigger:
  - platform: device
    domain: mqtt
    device_id: 3ce2ffe0a7e76fbb5328ee6cc7f29695
    type: action
    subtype: up-press
    discovery_id: 0x0017880104f51147 action_up-press
    id: dim-up
  - platform: device
    domain: mqtt
    device_id: 3ce2ffe0a7e76fbb5328ee6cc7f29695
    type: action
    subtype: down-press
    discovery_id: 0x0017880104f51147 action_down-press
    id: dim-down
  - platform: device
    domain: mqtt
    device_id: 3ce2ffe0a7e76fbb5328ee6cc7f29695
    type: action
    subtype: on-press
    discovery_id: 0x0017880104f51147 action_on-press
    id: "on"
  - platform: device
    domain: mqtt
    device_id: 3ce2ffe0a7e76fbb5328ee6cc7f29695
    type: action
    subtype: off-press
    discovery_id: 0x0017880104f51147 action_off-press
    id: "off"