Revised standard event types for button event entities
The standard event types for button event entities are revised. PRESS_END now only means that the button was released, the new SINGLE_PRESS and MULTI_PRESS types describe the presses the device counted, and MULTI_PRESS_ONGOING, MULTI_PRESS_END, and ATTR_MULTI_PRESS_COUNT are deprecated.
See the architecture discussion for the full background.
The types now come in two layers. The physical types describe the button going down and up. The gesture types describe what the device concluded from the presses.
| Event type | Status | Layer | Meaning |
|---|---|---|---|
SINGLE_PRESS |
New | Gesture | The device concluded that exactly one short press happened. |
MULTI_PRESS |
New | Gesture | The device finished counting a series of two or more presses. |
PRESS_END |
Changed | Physical | The button was released after a press the device did not classify as long. It no longer means a counted single press. |
MULTI_PRESS has the number of presses in the press_count attribute (the ATTR_PRESS_COUNT constant). Only list it in event_types if you also list SINGLE_PRESS.
| Deprecated | Use instead |
|---|---|
ATTR_MULTI_PRESS_COUNT |
ATTR_PRESS_COUNT |
ButtonEventType.MULTI_PRESS_END |
ButtonEventType.MULTI_PRESS |
ButtonEventType.MULTI_PRESS_ONGOING |
An integration-specific event type |
Using them logs a warning, and they are removed in Home Assistant 2027.5.0.
- If your integration fires
PRESS_ENDfor a single press the device reports after counting it, switch toSINGLE_PRESS. - Replace the deprecated types and constant with the ones in the table above.
- Switching changes the event types and attributes your users see, so let them know.
For full details, see the event entity documentation.