MQTT HomeAssistant binding does not offer "action" channels anymore

Hello,

With my OH4 instance, I was able to create an item/channel link with the following properties:

"channelUID": "mqtt:homeassistant_zigbee2mqtt_5F0x00123a00234bab2a:6b3d5ad012:zigbee2mqtt_5F0x00123a00234bab2a:0x00123a00234bab2a_5Faction_5Fzigbee2mqtt#sensor",
"itemName": "Bouton_VMC__eWeLink_WB01_zigbee2mqtt_Bouton_VMC__eWeLink_WB01_action"

Now that I have migrated to OH5, the channel is no longer there and shown as an orphaned link which is where I got the above descriptions

I’m wondering why this is not working anymore as it’s still there in the homeassistant based MQTT topics, with this name: homeassistant/device_automation/0x00123a00234bab2a/action_single/config

The topic value is this JSON:

{
  "automation_type":"trigger",
  "device":{
    "hw_version":0,
    "identifiers":[
      "zigbee2mqtt_0x00123a00234bab2a"
    ],
    "manufacturer":"SONOFF",
    "model":"Wireless button",
    "model_id":"SNZB-01",
    "name":"Bouton VMC - eWeLink WB01",
    "via_device":"zigbee2mqtt_bridge_0x000d6f000dead1af"
  },
  "origin":{
    "name":"Zigbee2MQTT",
    "sw":"2.12.0",
    "url":"https://www.zigbee2mqtt.io"
  },
  "payload":"single",
  "subtype":"single",
  "topic":"zigbee2mqtt/Bouton VMC - eWeLink WB01/action",
  "type":"action"
}

There are two others with action_double and action_long and with the payload and subtype values adjusted accordingly.

And when I do a single press on the button, I receive the following topic: zigbee2mqtt/Bouton VMC - eWeLink WB01
Associated to this value:

{
  "action":"single",
  "battery":100,
  "last_seen":"2026-07-13T15:58:36+02:00",
  "linkquality":192,
  "voltage":3000
}

So clearly, at the MQTT level, it works fine, but I can’t figure out why it’s not offered by the HomeAssistant binding.

Not a user of this but recall somewhere between OH4.3 and OH5.2 the HA binding was separated from the MQTT and made separate. Possible reason. Check your store.

For OH 5.1, instead of a reverse engineered Java extension to the MQTT binding, the Home Assistant binding was split off into it’s own installable binding and changes to use GraalVM Python to use the actual Home Assistant library that they use instead of a reverse engeered version.

Yes, I read that in the changelog and so did install it after the migration.

But if it’s using an “official” port, why isn’t it taking into account the action channels anymore?
I can’t see why the library would not provide them, where should I file an issue?

openhab-addons

Perhaps what OH was doing with the action Channels wasn’t in line with what Home Assistant does with them.

:person_shrugging:

well, they were just string values upon which I could write a “on change” rule, so that was just fine with me.

Done here: [homeassistant] The binding does not offer "action" channels anymore · Issue #21168 · openhab/openhab-addons · GitHub

I think I misunderstood the original problem. I thought the Channels didn’t exist on the Thing. Now I’m wondering if the problem is you can’t link the Channels to an Item, and that is by design and not specific to the Home Assistant binding.

Actions turn into Event Channels which cannot be linked to an Item (without using the proper Profile). You would use a Channel Trigger on your rule, not an Item Changed trigger.

I can’t remember when this changed but IIRC it was mentioned in the breaking changes and it changed long before the Home Assistant binding was split off from the main MQTT binding.

I thought the problem was the Channel simply didn’t exist. But if you see the Channel on your Thing and the problem is you cannot link it to an Item, that’s by design. Event Channels represent ephemerial happenings without a state (e.g. a button was pressed). Because there is no state, it doesn’t make sense to link them to an Item whose entire purpose is to represent state.

These Channels trigger rules directly without going through an Item.

In a file based JS rule you’d use triggers.ChannelEventTrigger('astro:sun:local:rise#event', 'START');. In the UI you would use Thing Event and you can select the Thing and then select the Channel.

In your rule, you can retireve what event it was (i.e. the “string”) usign event.receivedEvent.

That’s the proper way to handle Event Channels. However, alternatively you can link them to an Item but you have to use the Trigger Event String Profile to convert the Event to a state update so the Item can see it.

Yes, that’s the situation.
In OH4, there was an “action” channel, that is no longer here in OH5 with the HomeAssistant addon.
Just to be sure, I checked in the “advanced” parameters, but still not there.

OK, if the Channel isn’t even there I can say it’s not a universal problem. All of my Things which should have Action Channels do.

version: 1
things:
  homeassistant:device:broker:zigbee2mqtt_5F0x282c02bfffe8f86f:
    bridge: mqtt:broker:broker
    label: Rich's Button
    config:
      topics:
        - event/0x282c02bfffe8f86f/action
        - sensor/0x282c02bfffe8f86f/battery
        - sensor/0x282c02bfffe8f86f/linkquality
        - update/0x282c02bfffe8f86f/update
      basetopic: homeassistant
    channels:
      action:
        type: trigger
        label: Action
        config:
          component: event
          nodeid: 0x282c02bfffe8f86f
          objectid:
            - action
          config:
            - "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"},{\"topic\":\"zigbee2mqtt/Rich's Button/availability\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"default_entity_id\":\"event.rich's_button_action\",\"device\":{\"hw_version\":0,\"identifiers\":[\"zigbee2mqtt_0x282c02bfffe8f86f\"],\"manufacturer\":\"Third Reality\",\"model\":\"Smart button\",\"model_id\":\"3RSB22BZ\",\"name\":\"Rich's Button\",\"sw_version\":\"v1.00.28\",\"via_device\":\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"},\"event_types\":[\"single\",\"double\",\"hold\",\"release\"],\"icon\":\"mdi:gesture-double-tap\",\"name\":\"Action\",\"object_id\":\"rich's_button_action\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"state_topic\":\"zigbee2mqtt/Rich's Button\",\"unique_id\":\"0x282c02bfffe8f86f_action_zigbee2mqtt\",\"value_template\":\"{% set patterns = [\\n{\\\"pattern\\\": '^(?P<button>(?:button_)?[a-z0-9]+)_(?P<action>(?:press|hold)(?:_release)?)$', \\\"groups\\\": [\\\"button\\\", \\\"action\\\"]},\\n{\\\"pattern\\\": '^(?P<action>recall|scene)_(?P<scene>[0-2][0-9]{0,2})$', \\\"groups\\\": [\\\"action\\\", \\\"scene\\\"]},\\n{\\\"pattern\\\": '^(?P<actionPrefix>region_)(?P<region>[1-9]|10)_(?P<action>enter|leave|occupied|unoccupied)$', \\\"groups\\\": [\\\"actionPrefix\\\", \\\"region\\\", \\\"action\\\"]},\\n{\\\"pattern\\\": '^(?P<action>dial_rotate)_(?P<direction>left|right)_(?P<speed>step|slow|fast)$', \\\"groups\\\": [\\\"action\\\", \\\"direction\\\", \\\"speed\\\"]},\\n{\\\"pattern\\\": '^(?P<action>brightness_step)(?:_(?P<direction>up|down))?$', \\\"groups\\\": [\\\"action\\\", \\\"direction\\\"]}\\n] %}\\n{% set action_value = value_json.action|default('') %}\\n{% set ns = namespace(r=[('action', action_value)]) %}\\n{% for p in patterns %}\\n  {% set m = action_value|regex_findall(p.pattern) %}\\n  {% if m[0] is undefined %}{% continue %}{% endif %}\\n  {% for key, value in zip(p.groups, m[0]) %}\\n    {% set ns.r = ns.r|rejectattr(0, 'eq', key)|list + [(key, value)] %}\\n  {% endfor %}\\n{% endfor %}\\n{% if (ns.r|selectattr(0, 'eq', 'actionPrefix')|first) is defined %}\\n  {% set ns.r = ns.r|rejectattr(0, 'eq', 'action')|list + [('action', ns.r|selectattr(0, 'eq', 'actionPrefix')|map(attribute=1)|first + ns.r|selectattr(0, 'eq', 'action')|map(attribute=1)|first)] %}\\n{% endif %}\\n{% set ns.r = ns.r + [('event_type', ns.r|selectattr(0, 'eq', 'action')|map(attribute=1)|first)] %}\\n{{dict.from_keys(ns.r|rejectattr(0, 'in', ('action', 'actionPrefix'))|reject('eq', ('event_type', None))|reject('eq', ('event_type', '')))|to_json}}\"}"
      linkquality:
        type: number-advanced
        label: Linkquality
        config:
          component: sensor
          nodeid: 0x282c02bfffe8f86f
          objectid:
            - linkquality
          config:
            - "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"},{\"topic\":\"zigbee2mqtt/Rich's Button/availability\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"default_entity_id\":\"sensor.rich's_button_linkquality\",\"device\":{\"hw_version\":0,\"identifiers\":[\"zigbee2mqtt_0x282c02bfffe8f86f\"],\"manufacturer\":\"Third Reality\",\"model\":\"Smart button\",\"model_id\":\"3RSB22BZ\",\"name\":\"Rich's Button\",\"sw_version\":\"v1.00.28\",\"via_device\":\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"},\"enabled_by_default\":false,\"entity_category\":\"diagnostic\",\"icon\":\"mdi:signal\",\"name\":\"Linkquality\",\"object_id\":\"rich's_button_linkquality\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"state_class\":\"measurement\",\"state_topic\":\"zigbee2mqtt/Rich's Button\",\"unique_id\":\"0x282c02bfffe8f86f_linkquality_zigbee2mqtt\",\"unit_of_measurement\":\"lqi\",\"value_template\":\"{{ value_json[\\\"linkquality\\\"] }}\"}"
      battery:
        type: number
        label: MQTT Sensor
        config:
          component: sensor
          nodeid: 0x282c02bfffe8f86f
          objectid:
            - battery
          config:
            - "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"},{\"topic\":\"zigbee2mqtt/Rich's Button/availability\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"default_entity_id\":\"sensor.rich's_button_battery\",\"device\":{\"hw_version\":0,\"identifiers\":[\"zigbee2mqtt_0x282c02bfffe8f86f\"],\"manufacturer\":\"Third Reality\",\"model\":\"Smart button\",\"model_id\":\"3RSB22BZ\",\"name\":\"Rich's Button\",\"sw_version\":\"v1.00.28\",\"via_device\":\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"},\"device_class\":\"battery\",\"enabled_by_default\":true,\"entity_category\":\"diagnostic\",\"object_id\":\"rich's_button_battery\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"state_class\":\"measurement\",\"state_topic\":\"zigbee2mqtt/Rich's Button\",\"unique_id\":\"0x282c02bfffe8f86f_battery_zigbee2mqtt\",\"unit_of_measurement\":\"%\",\"value_template\":\"{{ value_json[\\\"battery\\\"] }}\"}"

It wouldn’t be a parameter. It would be a separate Channel. I assume you mean you checked “Show Advanced” on the Channels tab here?

Note, because these Channels cannot be linked to an Item without the profile, those links that already exist will show as orphans. That does not necessarily mean the Channel doesn’t exist.

Except that yours here is an event when mine is a device_automation and this is why I think it’s not showing properly anymore.

Yes, exactly.

Yes, I understand that, but sadly, this is not the case here.

Hi,
Update your Z2M to 2.12.1
( [#32377] Home Assistant: mark legacy action sensors diagnostic)

For me, action was also missing in the MQTT broker in the path /homeassistant/
After the update, the information necessary for complete teach-in was available again.

Thanks for the hint, I was running 2.12.0 so I moved to 2.12.1
And something changed, I now have three more channels of type Trigger and named single, double and long respectively.

So, no longer any action channel, but at least I have the possible actions so I shall be able to adapt my links and bindings.

Ok, linking all three channels to the “action” item I had previously did the trick.

However, there is an inconsistency in MainUI: it’s only possible to link those kind of channels from the Thing channels view.

If one tries to use “Create point from thing” or edit an item to add a link to the channel, this kind of channel is not shown, even when using the “advanced” checkbox.

Take a look at the log. You don’t need an item.

To elaborate on @Tschetan’s answer, Things support a special type of Channel called an “Event Channel”. These Channels *cannot be linked to an Item. That’s why they don’t show up. They are not intended to be linked to an Item.

As I said above and @Tschetan quoted, these Channels represent ephmeral events like a button press. These Channels are used to trigger Rules directly instead of going through an Item.

Well, ok, but when I go the thing itself, I can do this:

And then when I add the item link, it’s forcing me to use the “Trigger event string” profile and then it works just fine, the item receives the value as was done before with the action channel.

So all I’m saying is that there is an inconsistency in MainUI with regards to Trigger channels. To me, it would be better if it was selectable everywhere, and I’d be sad if it was to disappear from where I was able to create the link.

Which is exactly what I said above.

But because these Channels represent an event and not a state, that’s an edge use case which should only be used in unusual circumstances.

Then the Event Channels would have no purpose. The whole point of them is for ephemerial events you don’t need to have an Item sitting around. And then have to add logic to clear the state of the Item because you are trying to represent an event with soemthing stateful. If you press a button and link that to a button, if you don’t clear out the button’s state after a short time, that Item will remained in the “pressed” state until another event comes in.

You are not supposed to create a Link between an Item and these Channels. So that’s not offered and selectable everywhere. But in those rare cases where you have to use an Item for some reason, there is the Trigger event string profile which, of course, can only be linked to a String Item.

Event Channels are not new. They’ve bee around since OH 2. But it seems Zigbee2MQTT is only recently treating Event Channels this way, or maybe the Home Assistant standard changed. I’m not sure which.

But in OH, Event Channels are not supposed to be linked to Items. They should trigger rules directly. But if you must, you can link an Event Channel to an Item. But you have to use the profile to do it.

MainUI is consistent with the way the deleopers intend Event Channels to be used.

Fair enough, all I want is for this possibility to remain because linking to an item is the only way that I know of to get the state persisted in InfluxDB.