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

Add button support #47

Open
atlantden opened this issue Apr 1, 2023 · 6 comments
Open

Add button support #47

atlantden opened this issue Apr 1, 2023 · 6 comments

Comments

@atlantden
Copy link

We need support for Zigbee buttons in integration, such as 1-3 key switches and similar ones. Currently, it is not possible to add them correctly through a single entity, as, for example, the sensor does not change state with a sequential single press - the status remains the same. The status only changes when a different action is taken, such as making a double press after a single press, and so on.

@alexualbu
Copy link

I am actually looking to buy a zigbee remote / switch. Do you have them set-up as different entities right now? Can you post the DPs details, maybe from tuyaconsole?

@atlantden
Copy link
Author

I have the remote controls, but they are almost useless with LocalTuya because when I press the button again, no event occurs and the state does not change. The event and state changes only occur when using different button presses. For example, a second single click won't trigger an event in HA, only a double click after a single click will. This is the essence of the problem. I can provide a section of my configuration for the three-button remote control if needed.

#remote in the hall
  - parent_gateway: my_gateway_id # This tells it is a sub-device dependent on a parent gateway
    device_id: remote_cid (mac-address) # The cid of sub-device
    friendly_name: remote in the hall
    entities:
      - platform: sensor
        friendly_name: Button 1
        id: 1
      - platform: sensor
        friendly_name: Button 2
        id: 2
      - platform: sensor
        friendly_name: Button 3
        id: 3
      - platform: sensor
        friendly_name: Battery
        id: 10
        device_class: battery

@alexualbu
Copy link

@atlantden, i am looking for the DPs specification. Normally I would expect different DPs for the different actions (e.g. button 1 single press - dp 1, button 1 double press - dp 2 etc) because I am assuming the device is the one that interprets the action and sends the information. So can you provide the device specification from tuya developer console to confirm that?

@atlantden
Copy link
Author

It has one DP for the each button. button 1 - dp 1, button 2 - dp 2 But events are "single_click" "double_click" "long_press". Thees events thats i get in HA
I can't view DP in tuya console because they tell me - permission deny from some point when trying to view the device specification
but I know that there will be 1 DP for each button, so it was before

@alexualbu
Copy link

When you say events, where do you receive them in HA?
have you used this endpoint in the tuya console? there are a few and some give "permission deny" error.
image

@atlantden
Copy link
Author

Yes I use this endpoint. It used to show fine, now it has become so.
Yes, I'm talking about an event in HA. I get this event both through the integration of Local Tuya and through ZHA integration with Xiaomi Gate v3 . So I think this is the raw data that the button sends to the outside world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants