Mqtt discovery of a trigger

I am having problems with using mqtt discovery of a trigger. I have a device that is pretty simple: an ESP32 running on battery. You press the button, it wakes from sleep, sends an automation message (this is where I’m having an issue), its’ current battery voltage and charge state, then goes back to sleep.

Anyway, discovery of both the voltage and battery configuration messages over mqtt work fine, as does transmission of their values. However, for the life of me I can’t get the trigger to work.

The mqtt discovery is being sent to the mqtt topic “homeassistant/device_automation/PhillipBut/config” and the payload is

{
  "automation_type": "trigger",
  "type": "button_short_press",
  "subtype": "button_1",
  "payload": "trigger",
  "topic": "homeassistant/device_automation/PhillipBut/action",
  "device": {
    "identifiers": [
      "34o87t2c3qn4t2dn34oy347nxo1"
    ],
    "name": "Phillip's Room Button"
  }
}

It is being received and parsed by Home Assistant - the logs show that and no errors:

2026-08-17 11:40:41.053 DEBUG (MainThread) [homeassistant.components.mqtt.discovery] Process component discovery payload {'automation_type': 'trigger', 'type': 'button_short_press', 'subtype': 'button_1', 'payload': 'trigger', 'topic': 'homeassistant/device_automation/PhillipBut/action', 'device': {'identifiers': ['34o87t2c3qn4t2dn34oy347nxo1'], 'name': "Phillip's Room Button"}}

2026-08-17 11:40:41.053 DEBUG (MainThread) [homeassistant.components.mqtt.discovery] Component has already been discovered: device_automation PhillipBut, sending update

2026-08-17 11:40:41.053 DEBUG (MainThread) [homeassistant.components.mqtt.entity] Got update for Device trigger with hash: ('device_automation', 'PhillipBut') '{'automation_type': 'trigger', 'type': 'button_short_press', 'subtype': 'button_1', 'payload': 'trigger', 'topic': 'homeassistant/device_automation/PhillipBut/action', 'device': {'identifiers': ['34o87t2c3qn4t2dn34oy347nxo1'], 'name': "Phillip's Room Button"}}'

2026-08-17 11:40:41.053 DEBUG (MainThread) [homeassistant.components.mqtt.discovery] Pending discovery for ('device_automation', 'PhillipBut'): deque([])

2026-08-17 11:40:41.053 DEBUG (MainThread) [homeassistant.components.mqtt.entity] Device trigger ('device_automation', 'PhillipBut') no changes

Am I misunderstanding the purpose of the trigger, or what it actually is? The intent is to send a message when the device wakes up, which will trigger an automation in HA to toggle the state of some switch devices. If I create an automation, and add a trigger, the device is showing but only the battery voltage and charge state are listed as options - ditto in the device screen itself.

Any help would be greatly appreciated - I’m stuck at this point.

Phil

It was suggested to me that I should be sending the payload “trigger” to topic “homeassistant/device_automation/PhillipBut/action”. Tried that, same outcome.

I gave up on the automation, and used an “event” instead. Maybe that’s what I was supposed to use but the documentation pushes the other way.

In case anyone ever even reads this, or less likely cares, here are the discovery topics and payloads and the event payload:

Discovery topic: homeassistant/event/PhillipBut/config
Discovery payload:

{
  "name": "Trigger Button",
  "state_topic": "homeassistant/event/PhillipBut/state",
  "event_types": [
    "press"
  ],
  "unique_id": "34o87t2c3qn4t2dn34oy347nxo1_Event",
  "device": {
    "identifiers": [
      "34o87t2c3qn4t2dn34oy347nxo1"
    ],
    "name": "Phillip's Room Button"
  }
}

Event topic: homeassistant/event/PhillipBut/state
Event Payload: { "event_type": "press" }