ZHA - Linkind 1-Key Remote Control - ZBT-DIMSwitch-D0001

This is a Blueprint for automating the Linkind 1-Key Remote Control (ZBT-DIMSwitch-D0001), a Zigbee remote control which, as the name suggests, has a single button that supports short and long button presses.

I had seen reports of this button working with ZHA, so I decided to give it a try. It has been working flawlessly for me for a couple of weeks now using a manual automation with zha_event triggers, so I created this Blueprint and am sharing in case it is useful for others. Thanks to @makeitworktech, @bowentz and @freshcoast for Blueprint-related inspiration.

I purchased the remote control as part of a kit that also included a Zigbee plug (Amazon link), but the remote control is also available as a stand-alone purchase (Amazon link). Unfortunately, both are out of stock currently, at least on Amazon.

I welcome any suggestions for improving this Blueprint.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: ZHA - Linkind 1-Key Remote Control
  description: Execute action(s) on short button press and/or long button press.
  domain: automation
  input:
    linkind_remote:
      name: Linkind 1-Key Remote Control
      selector:
        device:
          integration: zha
          manufacturer: lk
          model: ZBT-DIMSwitch-D0001
    button_short_press:
      name: Short Button Press
      description: Action(s) to run on short button press.
      default: []
      selector:
        action: {}
    button_long_press:
      name: Long Button Press
      description: Action(s) to run on long button press.
      default: []
      selector:
        action: {}
  source_url: https://community.home-assistant.io/t/zha-linkind-1-key-remote-control-zbt-dimswitch-d0001/383521
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'linkind_remote'
action:
- variables:
    button_cluster_id: '{{ trigger.event.data.cluster_id }}'
    button_command: '{{ trigger.event.data.command }}'
- choose:
  - conditions:
    - '{{ button_cluster_id == 6 }}'
    - '{{ button_command in [''on'', ''off''] }}'
    sequence: !input 'button_short_press'
  - conditions:
    - '{{ button_cluster_id == 8 }}'
    - '{{ button_command == ''move'' }}'
    sequence: !input 'button_long_press'
2 Likes

Thanks for this blueprint. I have had these sitting in a drawer for a year and could never get them to work. (They used to be $6.72 from Amazon…) I can’t get it to toggle for some reason, so I’m using press/on and long press/off. In any case, they’re not useless anymore. Thanks again!!

I tried this blueprint with one Linkind Button activating one Linkind Light, I then found that all the other Linkind buttons I had added to HA activated the light (i.e. the same automation) even though they had not been specifically set to do so. This meant for example, that another button that I had set to perform a different action through a non blueprint automation, also activated the automation in addition to it’s other function. In addition, buttons to which I had not yet added an automation, also activated the one set up via this blueprint. Obviously not the desired behavior, Any ideas on how to fix this ?

Hmmm, that’s clearly not ideal. You are of course correct that the trigger should listen only for events from the device_id associated with the selected remote.

trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'linkind_remote'

Unfortunately, I only have one of these remotes, so I cannot test multiple remotes on my end.

When I listen for zha_event data in Developer Tools, a button press fires an event that appears to include the device_id associated with the correct device, so I am not sure why the automation is being triggered by multiple devices.

The device input and event trigger mechanics in this Blueprint are the same as in other Zigbee button Blueprints on the exchange, and basically the same as a Blueprint that I have been using successfully with multiple Z-Wave remotes for months. Perhaps there is a quirk with this particular button and/or ZHA?

If anyone has suggestions, I would very much like to fix this Blueprint so that it works properly in a setup with multiple buttons of the same model.

Unless I’m missing something I Seem to be having an issue where i can’t get the dim function to work. Can you help me. I created a input number helper but i’m sure i messed something up