Migrating TS0044 Button Automations to New Zigbee2MQTT Event System
With recent changes in Zigbee2MQTT, many users of the TS0044 4-button scene switch have found that their existing automations and blueprints have stopped working. This article explains the changes and provides guidance on how to migrate your automations to the new system.
What is TS0044 button I described in detail here: https://pro-it.rocks/ultimate-solution-to-controll-all-with-this-smart-switch/
You can but this model here:
What Changed?
In Zigbee2MQTT 2.0, there have been significant changes to how button actions are handled:
- The old action sensors (
sensor.*_action
entities) are now disabled by default - A new event-based system has been introduced, creating
event.*
entities instead - Legacy blueprints that relied on the old
sensor.*_action
entities no longer work as expected
How to Fix Your TS0044 Buttons
Step 1: Enable the New Event System
First, you need to enable the new event system in Zigbee2MQTT. Go to Zigbee2MQTT settings and enable:
- "Home Assistant discovery topic" (should be enabled by default)
- "Home Assistant experimental event entities"
After enabling these settings, restart Zigbee2MQTT.
Step 2: Find Your New Event Entity
After the restart, check Developer Tools → States in Home Assistant. Look for an entity that starts with event.
followed by your device name (e.g., event.living_room_switch_action
).
The new event entity will show available actions in its attributes, typically including:
1_single
,1_double
,hold
2_single
,2_double
3_single
,3_double
4_single
,4_double
Step 3: Create New Automation
Since the old blueprints no longer work, you'll need to create a new automation. Here's a template that you can adapt:
alias: TS0044 Button Control
description: "Automation for TS0044 4-button remote"
trigger:
- platform: state
entity_id: event.your_button_name_action
not_from: unavailable
actions:
- choose:
# Button 1 actions
- conditions:
- condition: template
value_template: "{{ trigger.to_state.attributes.event_type == '1_single' }}"
sequence:
- service: light.toggle
target:
entity_id: light.your_light
# Add more button actions as needed
Example Button Actions
Your automation can handle different types of button presses:
- Single press:
event_type == '1_single'
- Double press:
event_type == '1_double'
- Long press:
event_type == 'hold' and trigger.to_state.attributes.button == '1'
Important Notes
- Don't Use Trigger Conditions: In the trigger section, only specify the entity_id and
not_from: unavailable
. Adding other trigger conditions may prevent buttons from working correctly. - Testing: After creating the automation, test each button press type (single, double, long press) and verify the actions are working as expected.
- Legacy Support: If you absolutely need the old behavior, you can temporarily enable "Home Assistant legacy action sensors" in Zigbee2MQTT settings, but it's recommended to migrate to the new system.
Troubleshooting
If your buttons aren't working:
- Check if the event entity exists in Developer Tools → States
- Verify the event_type values in the attributes when pressing buttons
- Ensure your automation conditions match the exact values from the event attributes
Conclusion
While this change might be disruptive initially, the new event-based system provides a more robust and maintainable way to handle button actions. By following this guide, you should be able to get your TS0044 buttons working again with the new system.
Support This Blog — Because Heroes Deserve Recognition!
Whether it’s a one-time tip or a subscription, your support keeps this blog alive and kicking. Thank you for being awesome!