Zigbee2Mqtt IKEA button not working

I have the IKEA Fyrtur blinds that come with an open/close Tradfri button. I just switched from ZHA to Z2M and had to re-pair all my devices. My button is connected and I can see it send open/close commands.

I have tried three different blueprints (such as those here) and none work, while only this one at least activates a trace.

I just want the two buttons to do something. Anything, really. I have three blueprint automations set up to toggle lights and it won’t even do that.

My trace for the working one says:

Step Details:

Executed: October 13, 2023 at 3:41:15 PM
Result:

result: false entities: []

Step Config:

condition: template
value_template: '{{ command != ''''}}'

And that’s all I get. I did try forcing it to queue 10 rather than single, but that made no difference.

Your first one is for ZHA and won’t work with Z2M. The second one isn’t for that button.

Try this:

blueprint:
  name: Cover control with Tradfri open/close remote
  description: |
    Control a cover with an Ikea Tradfri open/close button remote over ZHA

    Short press on ☼ button will open the cover.
    Short press on ☰ button will close the cover.
    Long press on ☼ or ☰  will stop the cover.
  domain: automation
  input:
    remote:
      name: Remote
      description: "IKEA open/close remote to use"
      selector:
        entity:
          integration: mqtt
          domain: sensor
    cover:
      name: Cover
      description: The cover to control
      selector:
        target:
          entity:
            domain: cover
trigger:
  - platform: state
    entity_id: !input remote
action:
  - variables:  
      command: " {{ trigger.to_state.state }} "
  - choose:
    - conditions:
      - '{{ command == "open" }}'
      sequence:
      - service: cover.open_cover
        target: !input cover
    - conditions:
      - '{{ command == "close" }}'
      sequence:
      - service: cover.close_cover
        target: !input cover
    - conditions:
      - '{{ command in ("stop", "stop_opening", "stop_closing") }}'
      sequence:
      - service: cover.stop_cover
        target: !input cover
mode: single

Sorry for the dumb question, but how do I “import” a blueprint manually? If I paste your code into an automation, it doesn’t stick.

Here it is hosted in GitHub so you can just import it.

1 Like

Finally! Thank you, this worked with no extra effort on my part. My button is finally back to its original working status before I ditched ZHA.

Can that blueprint be modified to do things other than control a specific cover?

Actually, I just found a blueprint that would’ve saved us both some time.

1 Like

A lot messier but that does also seem to work for me. Thanks!