Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuya TS004F Action event "hold" is missing #25772

Open
Mordevolt opened this issue Jan 12, 2025 · 3 comments
Open

Tuya TS004F Action event "hold" is missing #25772

Mordevolt opened this issue Jan 12, 2025 · 3 comments
Labels
problem Something isn't working

Comments

@Mordevolt
Copy link

What happened?

In Z2M 2.0, only "hold" actions are send to the event entity.
It is not producing event for hold action correctly.

What did you expect to happen?

In HA only legacy sensor detects "4_hold", new event sensor detects just "hold", without button reference:
image

How to reproduce it (minimal and precise)

Even in list for all available events it is just plain "hold", without reference to exact button:
image
seems like not all Action (enum) exposed in HA correctly

Zigbee2MQTT version

2.0.0

Adapter firmware version

20240710

Adapter

zStack3x0

Setup

Homeassistant OS

Debug log

info 2025-01-11 14:40:00z2m:mqtt: MQTT publish: topic 'homeassistant/device_automation/0x84fd27fffe803813/action_4_hold/config', payload '{"automation_type":"trigger","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x84fd27fffe803813"],"manufacturer":"Tuya","model":"Wireless switch with 4 buttons","model_id":"TS004F","name":"4 Button Switch","via_device":"zigbee2mqtt_bridge_0x00124b0024bfc9c6"},"origin":{"name":"Zigbee2MQTT","sw":"2.0.0","url":"https://www.zigbee2mqtt.io"},"payload":"4_hold","subtype":"4_hold","topic":"zigbee2mqtt/4 Button Switch/action","type":"action"}'
info 2025-01-11 14:40:01z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/4 Button Switch/action', payload '4_hold'

@Mordevolt Mordevolt added the problem Something isn't working label Jan 12, 2025
@Mordevolt Mordevolt changed the title Tuya TS004F Action "hold" is missing Tuya TS004F Action event "hold" is missing Jan 12, 2025
@tdvtdv
Copy link

tdvtdv commented Jan 15, 2025

Same problem for TS0044

@TurnrDev
Copy link

I can't even get hold events to show in Z2M nor HA

@mundschenk-at
Copy link
Contributor

The issue is that 4_hold matches a regular expression that splits the event payload into the actual action happening (hold) and a separate attribute button, but that regex does not consider the actions single and double. This is something that will be addressed when event entities are reworked after #25061 has been decided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants