🎮 ZHA, deCONZ, Zigbee2MQTT - IKEA E1766 TRÅDFRI Open/Close Remote Universal blueprint - all actions - control lights, media players and more with Hooks

This blueprint is part of the Awesome HA Blueprints project.
Read more about it on the related Community Forum topic. :rocket:

Updates will be published on the project’s GitHub repository.

:arrow_down: Get Started

Option 1: My Home Assistant

Click the badge to import this Blueprint (needs Home Assistant Core 2021.3 or higher)

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

Option 2: Direct Link

Copy this link if you want to import the blueprint in your installation.

:link: Blueprint URL

:page_facing_up: Description

IKEA E1766 TRÅDFRI Open/Close Remote

This blueprint provides universal support for running any custom action when a button is pressed on the provided IKEA E1766 TRÅDFRI Open/Close Remote. Supports controllers integrated with deCONZ, ZHA, Zigbee2MQTT. Just specify the integration used to connect the remote to Home Assistant when setting up the automation, and the blueprint will take care of all the rest.

The blueprint also adds support for virtual double button press events, which are not exposed by the controller itself.

Automations created with this blueprint can be connected with one or more Hooks supported by this controller.
Hooks allow to easily create controller-based automations for interacting with media players, lights, covers and more. See the list of Hooks available for this controller for additional details.

:closed_book: Full Documentation

Full documentation regarding requirements, inputs and more is available here.

Docs provide all the information you need to properly configure this blueprint on your instance.

:electric_plug: Available Hooks

:bulb: Light

This Hook blueprint allows to build a controller-based automation to control a light. Supports brightness and color control both for white temperature and rgb lights.

Light Hook docs

:loud_sound: Media Player

This Hook blueprint allows to build a controller-based automation to control a media player. Supports volume setting, play/pause and track selection.

Media Player Hook docs

:door: Cover

This Hook blueprint allows to build a controller-based automation to control a cover. Supports opening, closing and tilting the cover.

Cover Hook docs

:information_source: Changelog

Updated list of changes and improvements is available here.

Happy automating to everyone! :fire:

5 Likes

Here is an updated version which uses directly Z2M MQTT json action.
So it will work with upcoming Z2M 2.0.0.

blueprint:
  name: IKEA E1766 TRÅDFRI Open/Close Remote
  description:
    "Tested with IKEA E1766 TRÅDFRI Open/Close Remote.
    \n\n You can have different actions on short press (open/close) and on hold release (long press) aka stop. \n\n
    Make sure to manually create a separate Text Helper per dimmer
    device and define its entity in the automation. It's used to store the last controller
    event to filter possible empty events and handle 'button hold once' actions. "
  domain: automation
  input:
    mqtt_topic:
      name: MQTT Topic
      description: Topic of the IKEA E1766 Remote
      default: zigbee2mqtt/<device name>
    helper_last_controller_event:
      name: (Required) Helper - Last Controller Event
      description:
        Input Text used to store the last event fired by the controller.
        You will need to manually create a text input Helper entity for this.
      default: ""
      selector:
        entity:
          domain:
            - input_text
          multiple: false
    open:
      name: OPEN button press (once)
      description: Action to run
      default: []
      selector:
        action: {}
    open_hold_release:
      name: OPEN button hold release
      description: Action to run
      default: []
      selector:
        action: {}
    close:
      name: CLOSE button press (once)
      description: Action to run
      default: []
      selector:
        action: {}
    close_hold_release:
      name: CLOSE button hold release
      description: Action to run
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
  - platform: mqtt
    topic: !input mqtt_topic
condition:
  - condition: template
    value_template: "{{ trigger.payload_json.action != '' }}"
action:
  - variables:
      helper_last_controller_event: !input helper_last_controller_event
      command: "{{ trigger.payload_json.action }}"
      prev_command: "{{ states(helper_last_controller_event) }}"
  - service: input_text.set_value
    data:
      entity_id: !input helper_last_controller_event
      value: "{{ command }}"
  - choose:
      - conditions:
          - '{{ command == "open" }}'
        sequence: !input open
      - conditions:
          - '{{ command == "close" }}'
        sequence: !input close
  - choose:
      - conditions:
          - '{{ command == "stop" and prev_command == "open" }}'
        sequence: !input open_hold_release
      - conditions:
          - '{{ command == "stop" and prev_command == "close" }}'
        sequence: !input close_hold_release

Have fun
pOpY

1 Like