Z2M - IKEA Tradfri 5 button remote (double and triple clicks)

This blueprint only adds the option to double and triple click on each of the five buttons. The delay between the clicks is customizable.

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

blueprint:

  name: Z2M - IKEA five button remote (with double and triple clicks)

  description: 'Control lights with an IKEA five button remote (the round ones).

    Every button is fully customizable and can be double and triple clicked.

    In order to do so I added a delay to check if the button is pressed again or not.

    However, there is the option to trigger an action as soon as the buttons are pressed.

    This can be useful for degugging purposes (checking if and when the first and second click are effectively heard)

    '

  domain: automation

  input:

    remote:

      name: Remote

      description: IKEA remote to use

      selector:

        entity:

          domain: sensor

    interval:

      name: Max Interval between Clicks

      description: Maximum time interval between two clicks. Corresponds to the delay from the last click to the triggering of the action

      default: 0.5

      selector:

        number:

          min: 0

          max: 10

          unit_of_measurement: "seconds"

          step: 0.1

          mode: box

    button_center_x1:

      name: Center button - single click

      description: Action to run on single center button click

      default: []

      selector:

        action: {}

    button_center_x1_immediate:

      name: Center button - single click (immediate response)

      description: Action to run as soon as the center button is clicked, without waiting if there's a second click or not

      default: []

      selector:

        action: {}

    button_center_x2:

      name: Center button - double click

      description: Action to run on double center button click

      default: []

      selector:

        action: {}

    button_center_x2_immediate:

      name: Center button - double click (immediate response)

      description: Action to run as soon as the center button is clicked the second time, without waiting if there's a third click or not

      default: []

      selector:

        action: {}

    button_center_x3:

      name: Center button - triple click

      description: Action to run on triple center button click

      default: []

      selector:

        action: {}

    button_left_x1:

      name: Left button - single click

      description: Action to run on single left button click

      default: []

      selector:

        action: {}

    button_left_x1_immediate:

      name: Left button - single click (immediate response)

      description: Action to run as soon as the left button is clicked, without waiting if there's a second click or not

      default: []

      selector:

        action: {}

    button_left_x2:

      name: Left button - double click

      description: Action to run on double left button click

      default: []

      selector:

        action: {}

    button_left_x2_immediate:

      name: Left button - double click (immediate response)

      description: Action to run as soon as the left button is clicked the second time, without waiting if there's a third click or not

      default: []

      selector:

        action: {}

    button_left_x3:

      name: Left button - triple click

      description: Action to run on triple left button click

      default: []

      selector:

        action: {}

    button_left_hold:

      name: Left button - hold

      description: Action to run on left button hold

      default: []

      selector:

        action: {}

    button_left_release:

      name: Left button - release

      description: Action to run on left button release

      default: []

      selector:

        action: {}

    button_right_x1:

      name: Right button - single click

      description: Action to run on single right button click

      default: []

      selector:

        action: {}

    button_right_x1_immediate:

      name: Right button - single click (immediate response)

      description: Action to run as soon as the right button is clicked, without waiting if there's a second click or not

      default: []

      selector:

        action: {}

    button_right_x2:

      name: Right button - double click

      description: Action to run on double right button click

      default: []

      selector:

        action: {}

    button_right_x2_immediate:

      name: Right button - double click (immediate response)

      description: Action to run as soon as the right button is clicked the second time, without waiting if there's a third click or not

      default: []

      selector:

        action: {}

    button_right_x3:

      name: Right button - triple click

      description: Action to run on triple right button click

      default: []

      selector:

        action: {}

    button_right_hold:

      name: Right button - hold

      description: Action to run on right button hold

      default: []

      selector:

        action: {}

    button_right_release:

      name: Right button - release

      description: Action to run on right button release

      default: []

      selector:

        action: {}

    button_up_x1:

      name: Up button - single click

      description: Action to run on single up button click

      default: []

      selector:

        action: {}

    button_up_x1_immediate:

      name: Up button - single click (immediate response)

      description: Action to run as soon as the up button is clicked, without waiting if there's a second click or not

      default: []

      selector:

        action: {}

    button_up_x2:

      name: Up button - double click

      description: Action to run on double up button click

      default: []

      selector:

        action: {}

    button_up_x2_immediate:

      name: Up button - double click (immediate response)

      description: Action to run as soon as the up button is clicked the second time, without waiting if there's a second click or not

      default: []

      selector:

        action: {}

    button_up_x3:

      name: Up button - triple click

      description: Action to run on triple up button click

      default: []

      selector:

        action: {}

    button_up_hold:

      name: Up button - hold

      description: Action to run on up button hold

      default: []

      selector:

        action: {}

    button_up_release:

      name: Up button - release

      description: Action to run on up button release

      default: []

      selector:

        action: {}

    button_down_x1:

      name: Down button - single click

      description: Action to run on single down button click

      default: []

      selector:

        action: {}

    button_down_x1_immediate:

      name: Down button - single click (immediate response)

      description: Action to run as soon as the down button is clicked, without waiting if there's a second click or not

      default: []

      selector:

        action: {}

    button_down_x2:

      name: Down button - double click

      description: Action to run on double down button click

      default: []

      selector:

        action: {}

    button_down_x2_immediate:

      name: Down button - double click (immediate response)

      description: Action to run as soon as the down button is clicked the second time, without waiting if there's a third click or not

      default: []

      selector:

        action: {}

    button_down_x3:

      name: Down button - triple click

      description: Action to run on triple down button click

      default: []

      selector:

        action: {}

    button_down_hold:

      name: Down button - hold

      description: Action to run on down button hold

      default: []

      selector:

        action: {}

    button_down_release:

      name: Down button - release

      description: Action to run on down button release

      default: []

      selector:

        action: {}

mode: single

max_exceeded: silent

variables:

  time: " {{ as_timestamp(now()) }} "

  interval: !input "interval"

  remote: !input "remote"

trigger:

  - platform: state

    entity_id: !input "remote"

    attribute: action

    not_to: ""

action:

  - variables:  

      command: " {{ trigger.to_state.attributes.action }} "

  - choose:

    - conditions:

      - "{{ command == 'toggle' }}"

      sequence:

        - choose: []

          default: !input "button_center_x1_immediate"

        - wait_for_trigger:

            - platform: state

              entity_id: !input "remote"

              attribute: action

              to: "toggle"

          timeout: '{{interval}}'

          continue_on_timeout: true

        - if:

          - condition: template

            value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

          then: !input "button_center_x1"

          else:

            - variables:

                time: " {{ as_timestamp(now()) }} "

            - choose: []

              default: !input "button_center_x2_immediate"

            - wait_for_trigger:

              - platform: state

                entity_id: !input "remote"

                attribute: action

                to: "toggle"

              timeout: '{{interval}}'

              continue_on_timeout: true

            - if:

              - condition: template

                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

              then: !input "button_center_x2"

              else: !input "button_center_x3"

    - conditions:

        - "{{ command == 'brightness_up_click' }}"

      sequence:

        - choose: []

          default: !input "button_up_x1_immediate"

        - wait_for_trigger:

            - platform: state

              entity_id: !input "remote"

              attribute: action

              to: "brightness_up_click"

          timeout: '{{interval}}'

          continue_on_timeout: true

        - if:

          - condition: template

            value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

          then: !input "button_up_x1"

          else:

            - variables:

                time: " {{ as_timestamp(now()) }} "

            - choose: []

              default: !input "button_up_x2_immediate"

            - wait_for_trigger:

              - platform: state

                entity_id: !input "remote"

                attribute: action

                to: "brightness_up_click"

              timeout: '{{interval}}'

              continue_on_timeout: true

            - if:

              - condition: template

                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

              then: !input "button_up_x2"

              else: !input "button_up_x3"

    - conditions:

        - "{{ command == 'brightness_up_hold' }}"

      sequence: !input button_up_hold

    - conditions:

        - "{{ command == 'brightness_up_release' }}"

      sequence: !input button_up_release

    - conditions:

        - "{{ command == 'brightness_down_click' }}"

      sequence:

        - choose: []

          default: !input "button_down_x1_immediate"

        - wait_for_trigger:

            - platform: state

              entity_id: !input "remote"

              attribute: action

              to: "brightness_down_click"

          timeout: '{{interval}}'

          continue_on_timeout: true

        - if:

            - condition: template

              value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

          then: !input "button_down_x1"

          else:

            - variables:

                time: " {{ as_timestamp(now()) }} "

            - choose: []

              default: !input "button_down_x2_immediate"

            - wait_for_trigger:

              - platform: state

                entity_id: !input "remote"

                attribute: action

                to: "brightness_down_click"

              timeout: '{{interval}}'

              continue_on_timeout: true

            - if:

              - condition: template

                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

              then: !input "button_down_x2"

              else: !input "button_down_x3"

    - conditions:

        - "{{ command == 'brightness_down_hold' }}"

      sequence: !input button_down_hold

    - conditions:

        - "{{ command == 'brightness_down_release' }}"

      sequence: !input button_down_release

    - conditions:

        - "{{ command == 'arrow_left_click' }}"

      sequence:

        - choose: []

          default: !input "button_left_x1_immediate"

        - wait_for_trigger:

            - platform: state

              entity_id: !input "remote"

              attribute: action

              to: "arrow_left_click"

          timeout: '{{interval}}'

          continue_on_timeout: true

        - if:

            - condition: template

              value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

          then: !input "button_left_x1"

          else:

            - variables:

                time: " {{ as_timestamp(now()) }} "

            - choose: []

              default: !input "button_left_x2_immediate"

            - wait_for_trigger:

              - platform: state

                entity_id: !input "remote"

                attribute: action

                to: "arrow_left_click"

              timeout: '{{interval}}'

              continue_on_timeout: true

            - if:

              - condition: template

                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

              then: !input "button_left_x2"

              else: !input "button_left_x3"

    - conditions:

        - "{{ command == 'arrow_left_hold' }}"

      sequence: !input "button_left_hold"

    - conditions:

        - "{{ command == 'arrow_left_release' }}"

      sequence: !input "button_left_release"

    - conditions:

        - "{{ command == 'arrow_right_click' }}"

      sequence:

        - choose: []

          default: !input "button_right_x1_immediate"

        - wait_for_trigger:

            - platform: state

              entity_id: !input "remote"

              attribute: action

              to: "arrow_right_click"

          timeout: '{{interval}}'

          continue_on_timeout: true

        - if:

            - condition: template

              value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

          then: !input "button_right_x1"

          else:

            - variables:

                time: " {{ as_timestamp(now()) }} "

            - choose: []

              default: !input "button_right_x2_immediate"

            - wait_for_trigger:

              - platform: state

                entity_id: !input "remote"

                attribute: action

                to: "arrow_right_click"

              timeout: '{{interval}}'

              continue_on_timeout: true

            - if:

              - condition: template

                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"

              then: !input "button_right_x2"

              else: !input "button_right_x3"

    - conditions:

        - "{{ command == 'arrow_right_hold' }}"

      sequence: !input "button_right_hold"

    - conditions:

        - "{{ command == 'arrow_right_release' }}"

      sequence: !input "button_right_release"

This didn’t work for me since I didn’t seem to have a device/entity for the remote that wasn’t the action itself.

Removing the attribute: action from wait_for_trigger and setting the remote to <tradfri_remote_name>_action worked for me.

I had a similar problem, and this was one part of the solution for me.

I also had to change the command action variable to command: " {{ trigger.to_state.state }} ".

@calkeo @zhaoz
I am relatively new to Zigbee2Mqtt and Home Assistant. Could you maybe explain to me in more detail what I need to do to make it work? :slight_smile:

With the “file editor” add-on you can browse to the folder “blueprints/automation/malorezzanzo64/z2m-ikea-tradfri-5-button-remote-double-and-triple-clicks.yaml” and correct the above mentioned changes. This corrected version is working, because as also @calkeo mentioned, a sensor is been used, which already contains the action directly and not as a nested attribute, as seen here:

Here is the my corrected version:

blueprint:
  name: Z2M - IKEA five button remote (with double and triple clicks)
  description: 'Control lights with an IKEA five button remote (the round ones).
    Every button is fully customizable and can be double and triple clicked.
    In order to do so I added a delay to check if the button is pressed again or not.
    However, there is the option to trigger an action as soon as the buttons are pressed.
    This can be useful for degugging purposes (checking if and when the first and second click are effectively heard)
    '
  domain: automation
  input:
    remote:
      name: Remote
      description: IKEA remote to use
      selector:
        entity:
          domain: sensor
    interval:
      name: Max Interval between Clicks
      description: Maximum time interval between two clicks. Corresponds to the delay from the last click to the triggering of the action
      default: 0.5
      selector:
        number:
          min: 0
          max: 10
          unit_of_measurement: "seconds"
          step: 0.1
          mode: box
    button_center_x1:
      name: Center button - single click
      description: Action to run on single center button click
      default: []
      selector:
        action: {}
    button_center_x1_immediate:
      name: Center button - single click (immediate response)
      description: Action to run as soon as the center button is clicked, without waiting if there's a second click or not
      default: []
      selector:
        action: {}
    button_center_x2:
      name: Center button - double click
      description: Action to run on double center button click
      default: []
      selector:
        action: {}
    button_center_x2_immediate:
      name: Center button - double click (immediate response)
      description: Action to run as soon as the center button is clicked the second time, without waiting if there's a third click or not
      default: []
      selector:
        action: {}
    button_center_x3:
      name: Center button - triple click
      description: Action to run on triple center button click
      default: []
      selector:
        action: {}
    button_left_x1:
      name: Left button - single click
      description: Action to run on single left button click
      default: []
      selector:
        action: {}
    button_left_x1_immediate:
      name: Left button - single click (immediate response)
      description: Action to run as soon as the left button is clicked, without waiting if there's a second click or not
      default: []
      selector:
        action: {}
    button_left_x2:
      name: Left button - double click
      description: Action to run on double left button click
      default: []
      selector:
        action: {}
    button_left_x2_immediate:
      name: Left button - double click (immediate response)
      description: Action to run as soon as the left button is clicked the second time, without waiting if there's a third click or not
      default: []
      selector:
        action: {}
    button_left_x3:
      name: Left button - triple click
      description: Action to run on triple left button click
      default: []
      selector:
        action: {}
    button_left_hold:
      name: Left button - hold
      description: Action to run on left button hold
      default: []
      selector:
        action: {}
    button_left_release:
      name: Left button - release
      description: Action to run on left button release
      default: []
      selector:
        action: {}
    button_right_x1:
      name: Right button - single click
      description: Action to run on single right button click
      default: []
      selector:
        action: {}
    button_right_x1_immediate:
      name: Right button - single click (immediate response)
      description: Action to run as soon as the right button is clicked, without waiting if there's a second click or not
      default: []
      selector:
        action: {}
    button_right_x2:
      name: Right button - double click
      description: Action to run on double right button click
      default: []
      selector:
        action: {}
    button_right_x2_immediate:
      name: Right button - double click (immediate response)
      description: Action to run as soon as the right button is clicked the second time, without waiting if there's a third click or not
      default: []
      selector:
        action: {}
    button_right_x3:
      name: Right button - triple click
      description: Action to run on triple right button click
      default: []
      selector:
        action: {}
    button_right_hold:
      name: Right button - hold
      description: Action to run on right button hold
      default: []
      selector:
        action: {}
    button_right_release:
      name: Right button - release
      description: Action to run on right button release
      default: []
      selector:
        action: {}
    button_up_x1:
      name: Up button - single click
      description: Action to run on single up button click
      default: []
      selector:
        action: {}
    button_up_x1_immediate:
      name: Up button - single click (immediate response)
      description: Action to run as soon as the up button is clicked, without waiting if there's a second click or not
      default: []
      selector:
        action: {}
    button_up_x2:
      name: Up button - double click
      description: Action to run on double up button click
      default: []
      selector:
        action: {}
    button_up_x2_immediate:
      name: Up button - double click (immediate response)
      description: Action to run as soon as the up button is clicked the second time, without waiting if there's a second click or not
      default: []
      selector:
        action: {}
    button_up_x3:
      name: Up button - triple click
      description: Action to run on triple up button click
      default: []
      selector:
        action: {}
    button_up_hold:
      name: Up button - hold
      description: Action to run on up button hold
      default: []
      selector:
        action: {}
    button_up_release:
      name: Up button - release
      description: Action to run on up button release
      default: []
      selector:
        action: {}
    button_down_x1:
      name: Down button - single click
      description: Action to run on single down button click
      default: []
      selector:
        action: {}
    button_down_x1_immediate:
      name: Down button - single click (immediate response)
      description: Action to run as soon as the down button is clicked, without waiting if there's a second click or not
      default: []
      selector:
        action: {}
    button_down_x2:
      name: Down button - double click
      description: Action to run on double down button click
      default: []
      selector:
        action: {}
    button_down_x2_immediate:
      name: Down button - double click (immediate response)
      description: Action to run as soon as the down button is clicked the second time, without waiting if there's a third click or not
      default: []
      selector:
        action: {}
    button_down_x3:
      name: Down button - triple click
      description: Action to run on triple down button click
      default: []
      selector:
        action: {}
    button_down_hold:
      name: Down button - hold
      description: Action to run on down button hold
      default: []
      selector:
        action: {}
    button_down_release:
      name: Down button - release
      description: Action to run on down button release
      default: []
      selector:
        action: {}
mode: single
max_exceeded: silent
variables:
  time: " {{ as_timestamp(now()) }} "
  interval: !input "interval"
  remote: !input "remote"
trigger:
  - platform: state
    entity_id: !input "remote"
    
    not_to: ""
action:
  - variables:  
      command: " {{ trigger.to_state.state }} "
  - choose:
    - conditions:
      - "{{ command == 'toggle' }}"
      sequence:
        - choose: []
          default: !input "button_center_x1_immediate"
        - wait_for_trigger:
            - platform: state
              entity_id: !input "remote"
              to: "toggle"
          timeout: '{{interval}}'
          continue_on_timeout: true
        - if:
          - condition: template
            value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
          then: !input "button_center_x1"
          else:
            - variables:
                time: " {{ as_timestamp(now()) }} "
            - choose: []
              default: !input "button_center_x2_immediate"
            - wait_for_trigger:
              - platform: state
                entity_id: !input "remote"
                to: "toggle"
              timeout: '{{interval}}'
              continue_on_timeout: true
            - if:
              - condition: template
                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
              then: !input "button_center_x2"
              else: !input "button_center_x3"
    - conditions:
        - "{{ command == 'brightness_up_click' }}"
      sequence:
        - choose: []
          default: !input "button_up_x1_immediate"
        - wait_for_trigger:
            - platform: state
              entity_id: !input "remote"
              to: "brightness_up_click"
          timeout: '{{interval}}'
          continue_on_timeout: true
        - if:
          - condition: template
            value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
          then: !input "button_up_x1"
          else:
            - variables:
                time: " {{ as_timestamp(now()) }} "
            - choose: []
              default: !input "button_up_x2_immediate"
            - wait_for_trigger:
              - platform: state
                entity_id: !input "remote"
                
                to: "brightness_up_click"
              timeout: '{{interval}}'
              continue_on_timeout: true
            - if:
              - condition: template
                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
              then: !input "button_up_x2"
              else: !input "button_up_x3"
    - conditions:
        - "{{ command == 'brightness_up_hold' }}"
      sequence: !input button_up_hold
    - conditions:
        - "{{ command == 'brightness_up_release' }}"
      sequence: !input button_up_release
    - conditions:
        - "{{ command == 'brightness_down_click' }}"
      sequence:
        - choose: []
          default: !input "button_down_x1_immediate"
        - wait_for_trigger:
            - platform: state
              entity_id: !input "remote"
              to: "brightness_down_click"
          timeout: '{{interval}}'
          continue_on_timeout: true
        - if:
            - condition: template
              value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
          then: !input "button_down_x1"
          else:
            - variables:
                time: " {{ as_timestamp(now()) }} "
            - choose: []
              default: !input "button_down_x2_immediate"
            - wait_for_trigger:
              - platform: state
                entity_id: !input "remote"
                to: "brightness_down_click"
              timeout: '{{interval}}'
              continue_on_timeout: true
            - if:
              - condition: template
                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
              then: !input "button_down_x2"
              else: !input "button_down_x3"
    - conditions:
        - "{{ command == 'brightness_down_hold' }}"
      sequence: !input button_down_hold
    - conditions:
        - "{{ command == 'brightness_down_release' }}"
      sequence: !input button_down_release
    - conditions:
        - "{{ command == 'arrow_left_click' }}"
      sequence:
        - choose: []
          default: !input "button_left_x1_immediate"
        - wait_for_trigger:
            - platform: state
              entity_id: !input "remote"
              to: "arrow_left_click"
          timeout: '{{interval}}'
          continue_on_timeout: true
        - if:
            - condition: template
              value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
          then: !input "button_left_x1"
          else:
            - variables:
                time: " {{ as_timestamp(now()) }} "
            - choose: []
              default: !input "button_left_x2_immediate"
            - wait_for_trigger:
              - platform: state
                entity_id: !input "remote"
                to: "arrow_left_click"
              timeout: '{{interval}}'
              continue_on_timeout: true
            - if:
              - condition: template
                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
              then: !input "button_left_x2"
              else: !input "button_left_x3"
    - conditions:
        - "{{ command == 'arrow_left_hold' }}"
      sequence: !input "button_left_hold"
    - conditions:
        - "{{ command == 'arrow_left_release' }}"
      sequence: !input "button_left_release"
    - conditions:
        - "{{ command == 'arrow_right_click' }}"
      sequence:
        - choose: []
          default: !input "button_right_x1_immediate"
        - wait_for_trigger:
            - platform: state
              entity_id: !input "remote"
              to: "arrow_right_click"
          timeout: '{{interval}}'
          continue_on_timeout: true
        - if:
            - condition: template
              value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
          then: !input "button_right_x1"
          else:
            - variables:
                time: " {{ as_timestamp(now()) }} "
            - choose: []
              default: !input "button_right_x2_immediate"
            - wait_for_trigger:
              - platform: state
                entity_id: !input "remote"
                to: "arrow_right_click"
              timeout: '{{interval}}'
              continue_on_timeout: true
            - if:
              - condition: template
                value_template: "{{(as_timestamp(now()) - time ) >= interval }}"
              then: !input "button_right_x2"
              else: !input "button_right_x3"
    - conditions:
        - "{{ command == 'arrow_right_hold' }}"
      sequence: !input "button_right_hold"
    - conditions:
        - "{{ command == 'arrow_right_release' }}"
      sequence: !input "button_right_release"
2 Likes

Thx so much for this blueprint! It’s a lifesaver but, assuming you’re using this with some Tradfri bulbs, I just have a question on how you paired them and maintained direct control between the remote and the bulbs. Or is this blueprint intended to be a workaround for that because it’s not technically possible (in addition to having extra functionality for double tap etc of course) ?

I’ve been trying to make sense of the Z2M documentation of this remote as it relates to combining it directly with Tradfri bulbs at the same time and am failing to understand whether it can still bind directly to the bulbs whilst also having it paired to Z2M with full control over brightness and colour.

I’ve actually got 2 bathrooms with 2 quasi identical setups:

  • Each bathroom has a remote and 4 bulbs.

  • The 4 bulbs of each bathroom are grouped together in Z2M under Bathroom1 lights and Bathroom2 lights.

  • Everything is paired to HA through Z2M.

  • I have upgraded one of the remotes to the latest firmware and the other one is still on the original firmware.

  • For bathroom1 (old FW) I have also paired the remote directly to the bulbs. This lets me control the lights fully and directly without passing through Z2M which maintains the preset transitions which are nice. However, I can now no longer control this Bathroom group of lights through HA as it will now only allow me to control individual bulbs.

  • For Bathroom2 (new FW) I haven’t paired the remote directly with the bulbs but I can use your blueprint to mimic the behaviour of Bathroom1 whilst maintaining control of the lightgroup via HA. Downside of this is that the brightness increase/decrease and colour change is not as smooth as with direct communication between the remote and the bulbs. As well as the fact that, for the colour change, I have to pre-program scenes in Z2M first and then use the left/right arrows to cycle through these. The problem with that is that those scenes will not take into account the currently set brightness.

So questions are: is there a way to reinstate group control from HA/Z2M for Bathroom 1 without giving up direct control? Or is there a way, via your blueprint, to cycle through the colours for the group of bulbs without having to call on specific scenes?

If anyone has any experience with this, would love to hear how you’ve solved it. It could just be that I’ve not understood the Z2M docs correctly and it’s perfectly doable, but I haven’t really played around with the more technical aspects of Z2M so would be great to hear it in laymans terms :wink:

PS: This worked for me back when I still on Hubitat before I changed over to Home Assistant, except for the fact the remote was no longer able to change colour, only brightness of the bulb group

Ok so I’ve managed to sort out my situation for Bathroom 1 with a remote that still has the old firmware, that’s now fully functional and I can use your blueprint to enhance the remote to have some additional features, great!! Thx again.

I am now kicking myself in the ass bigtime as I’ve found out that I shouldn’t have upgraded the firmware on the other remote for bathroom2 as it breaks some of the functionality of the earlier firmwares :face_with_symbols_over_mouth:. Should’ve done some more digging before getting started but hey, I am where I am now and your blueprint will go a long way to working around the issue where I can use scenes to do colour temp control.

So my only question now is, is there a way to make the brightness relative to the current setting? By this I mean, if the bulbs are lit at, say 50% in warm white and I’ve captured a scene that allows me to change to cool white instead, but the brightness for that scene was captured at 100%, is there a way that your blueprint allows to keep the brightness as is and only invoke the colour temp change of the scene?

Otherwise there’s going to be a lot of manual brightness changes being made every time after a scene is called for a colour temp change
OR
I’m going to have to capture so many scenes with various brightnesses at various colour temps that it’s going to be annoying to cycle through them through button clicks.

EDIT: Nvm, think I answered my own question. I guess I could do a lot of conditional stuff in your blueprint to make sure that if the current brightness is X and colour temp is Y, then on a left button press it goes to a scene close enough to X brighness but with Z colour temp and on a right button press it goes to a cene close enough to X brighness but with yet another colour temp. That’s going to require capturing a lot of scenes and a lot of conditional statements but that’s what I get for being stupid enough for updating the remote firmware without checking first :rofl:
Sorry for wasting the time of anyone who’s read this! :innocent:

Heads up: This blueprint will stop working with Zigbee2MQTT v2.0, scheduled to be released early next year. This is since it relies on “legacy triggers”. See Zigbee2MQTT 2.0.0 breaking changes · Koenkk/zigbee2mqtt · Discussion #24198 · GitHub

By setting:

advanced:
  homeassistant_legacy_triggers: false

in your Z2M configuration.yaml file you can test the new behavior already. (Meaning: this blueprint will break).

I hope someone can update it before that happens. I’ll try to get to it otherwise, but I have a lot on my slate currently.