deCONZ - Aqara D1 Wireless Remote Switch (1 Button) - lumi.remote.b186acn01 (WXKG03LM )

My third blueprint, first one not used by myself but asked for by @altbau9944 in deCONZ - Aqara D1 Wireless Remote Switch (2 Button) - lumi.remote.b286acn02 (WXKG07LM).

Button events supported:

  • Single press
  • Double press
  • Long press

Blueprint screenshot (empty example)

Blueprint to import:

blueprint:
  name: deCONZ - Aqara D1 Wireless Remote Switch (1 Button)
  description: "Supported actions: single, double and long press."
  domain: automation
  source_url: https://community.home-assistant.io/t/deconz-aqara-d1-wireless-remote-switch-1-button-lumi-remote-b186acn01-wxkg03lm/274421
  # GUI elements
  input:
    remote:
      name: Remote
      description: Aqara D1 remote to use
      selector:
        device:
          integration: deconz
          manufacturer: LUMI
          model: lumi.remote.b186acn01

    button_single_press:
      name: Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_double_press:
      name: Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_hold_in:
      name: Long press
      description: Action on long press button
      default: []
      selector:
        action: {}
# End GUI elements

# If press detected before end of action restart script
mode: restart
max_exceeded: silent

trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      device_id: !input "remote"
action:
  - variables:
      event: "{{ trigger.event.data.event }}"
  - choose:
      # Automation
      - conditions:
          - "{{ event == 1002 }}"
        sequence: !input "button_single_press"
      - conditions:
          - "{{ event == 1004 }}"
        sequence: !input "button_double_press"
      - conditions:
          - "{{ event == 1001 }}"
        sequence: !input "button_hold_in"

History:

  • 2021-01-29 19:30: First release
  • 2021-01-29 19:35: Blueprint content: fixed label names in blueprint
  • 2021-01-29 19:40: Blueprint content: fixed source URL in blueprint, added blueprint GUI screenshot
  • 2021-01-30 15:55: Added tags for thread
1 Like

@altbau9944 please test it and give some feedback.

I´m not quite sure if the button events match the actual button press actions, assuming you possibly posted a wrong mapping in deCONZ - Aqara D1 Wireless Remote Switch (2 Button) - lumi.remote.b286acn02 (WXKG07LM).

Maybe single press and long press is mixed up, can fix it within minutes.

@ e-raser

Good Morning…

works like charm.

I’ll do some additional test in the future!

Thanks for your support.

Cheers Altbau

1 Like

Great to hear, thanks for feedback. Have fun with it :slight_smile:

Hi e-raser,

this blueprint stops working. I’ve installed the blueprint again, with no success.
I think this happend after the last update, on Sunday morning.

Do you have any idea what the problem might be?

Cheers
Altbau

Unfortunately no. But it’s quite unlikely the problem is blueprint related.

Did you check if button events are correctly sent to HA using the „deconz_event“ listener in development tools?

There‘s been an update to the deCONZ addon recently, maybe you want to check if this update matches the time you encountered problems.

Thanks for this blueprint!

I get the following error in my logs:

Logger: homeassistant.components.automation
Source: components/automation/__init__.py:638
Integration: Automation (documentation, issues)
First occurred: 17:07:33 (1 occurrences)
Last logged: 17:07:33

Blueprint deCONZ - Aqara D1 Wireless Remote Switch (1 Button) generated invalid automation with inputs OrderedDict([('remote', '3991ca60d311181b5f36cab90fd79791'), ('button_single_press', [OrderedDict([('choose', [OrderedDict([('conditions', [OrderedDict([('condition', 'state'), ('entity_id', 'switch.smart_plug_15'), ('state', 'on')])]), ('sequence', [OrderedDict([('service', '')])])])]), ('default', [])])])]): Service does not match format <domain>.<name> for dictionary value @ data['action'][1]['choose'][0]['sequence'][0]['choose'][0]['sequence'][0]['service']. Got None`

Any ideas?
Also the switch seems to have a long delay (2 seconds) before the action happens. Does anyone else find it takes a while for this switch to perform the action?

TIA
Craig

As stated in the OP I‘m not using this blueprint because I don’t have the hardware - and therefore can’t test things.

But I use the same blueprint for the two button switch - which works day by day (and immediately).

Thanks, I appreciate you don’t have the device. I have no idea where to start in resolving the error! :cry:

Maybe @altbau9944 can give an update cause in deCONZ - Aqara D1 Wireless Remote Switch (1 Button) - lumi.remote.b186acn01 (WXKG03LM ) - #5 by altbau9944 he already mentioned an issue with this blueprint.