Müller Licht tint remote

Tags: #<Tag:0x00007fc408069360> #<Tag:0x00007fc408069270> #<Tag:0x00007fc408069158> #<Tag:0x00007fc408069040> #<Tag:0x00007fc408068f28>

Forked from @Bram_Kragten 5 Button IKEA Remote blueprint.

Easily select the lights you want to control using the remote. Supports on/off, brightness, colour temp and RGB. Also, easily allocate a scene to each scene button on the remote.

Notes:
You need to add one of the lights you’ve selected to the ‘Colour Temperature Reference’. This overcomes a current shortcoming in blueprints and syncs all other lights colour temp to the chosen reference light.

You must select a scene for each button for the automation to work. Blueprints don’t seem to allow optional inputs yet.

Blueprint

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.

Or import this Blueprint by using the forum topic URL:

blueprint:
  name: Muller Licht Remote
  description: Control lights with a Muller Licht Tint RGB Remote
  domain: automation
  input:
    remote:
      name: Remote
      description: Muller Licht Tint remote to use
      selector:
        device:
          integration: deconz
          manufacturer: MLI
          model: ZBT-Remote-ALL-RGBW
    target_light:
      name: Light(s)
      description: The light(s) to control
      selector:
        target:
          entity:
            domain: light
    colour_ref:
      name: Colour Temperature Refence
      description: The light to use as a colour temp reference
      selector:
        entity:
          domain: light
    working_scene:
      name: Working Scene
      description: The scene to be triggered when the Working Light button is pressed
      selector:
        entity:
          domain: scene
    sunset_scene:
      name: Sunset Scene
      description: The scene to be triggered when the Sunset button is pressed
      selector:
        entity:
          domain: scene
    party_scene:
      name: Party Scene
      description: The scene to be triggered when the Party button is pressed
      selector:
        entity:
          domain: scene
    night_scene:
      name: Night Scene
      description: The scene to be triggered when the Night button is pressed
      selector:
        entity:
          domain: scene
    campfire_scene:
      name: Campfire Scene
      description: The scene to be triggered when the Campfire button is pressed
      selector:
        entity:
          domain: scene
    romantic_scene:
      name: Romantic Scene
      description: The scene to be triggered when the Romantic button is pressed
      selector:
        entity:
          domain: scene
    force_brightness:
      name: Force turn on brightness
      description: 'Force the brightness to the set level below, when the "on" button on the remote is pushed and lights turn on.'
      default: false
      selector:
        boolean: {}
    brightness:
      name: Brightness
      description: Brightness of the light(s) when turning on
      default: 50
      selector:
        number:
          min: 0.0
          max: 100.0
          mode: slider
          step: 1.0
          unit_of_measurement: "%"
    step_value:
      name: Brightness increment/decrement percent
      description: Set the step percent value for brightness and color warmth
      default: 10
      selector:
        number:
          min: 1.0
          max: 20.0
          mode: slider
          step: 1.0
          unit_of_measurement: "%"
mode: restart
max_exceeded: silent
variables:
  force_brightness: !input "force_brightness"
  step_value: !input "step_value"
  colour_ref: !input "colour_ref"
trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      device_id: !input "remote"
action:
  - variables:
      event: "{{ trigger.event.data.event }}"
  - choose:
      - conditions:
          - "{{ event == 1002 }}"
        sequence:
          - choose:
              - conditions: "{{ force_brightness }}"
                sequence:
                  - service: light.toggle
                    target: !input target_light
                    data:
                      brightness_pct: !input "brightness"
            default:
              - service: light.toggle
                target: !input target_light
      - conditions:
          - "{{ event == 2002 }}"
        sequence:
          - service: light.turn_on
            target: !input target_light
            data:
              brightness_step_pct: "{{ step_value }}"
              transition: 1
      - conditions:
          - "{{ event == 3002 }}"
        sequence:
          - service: light.turn_on
            target: !input target_light
            data:
              brightness_step_pct: "-{{ step_value }}"
              transition: 1
      - conditions:
          - "{{ event == 4002 }}"
        sequence:
          - service: light.turn_on
            target: !input target_light
            data:
              color_temp: "{{state_attr(colour_ref, 'color_temp')|int + 60}}"
      - conditions:
          - "{{ event == 5002 }}"
        sequence:
          - service: light.turn_on
            target: !input target_light
            data:
              color_temp: "{{state_attr(colour_ref, 'color_temp')|int - 60}}"
      - conditions:
          - "{{ event == 6002 }}"
        sequence:
          - service: light.turn_on
            target: !input target_light
            data:
              xy_color:
                - "{{ trigger.event.data.xy.0 }}"
                - "{{ trigger.event.data.xy.1 }}"
      - conditions:
          - "{{ event == 7002 }}"
        sequence:
          - service: homeassistant.turn_on
            entity_id: !input working_scene
      - conditions:
          - "{{ event == 8002 }}"
        sequence:
          - service: homeassistant.turn_on
            entity_id: !input sunset_scene
      - conditions:
          - "{{ event == 9002 }}"
        sequence:
          - service: homeassistant.turn_on
            entity_id: !input party_scene
      - conditions:
          - "{{ event == 10002 }}"
        sequence:
          - service: homeassistant.turn_on
            entity_id: !input night_scene
      - conditions:
          - "{{ event == 11002 }}"
        sequence:
          - service: homeassistant.turn_on
            entity_id: !input campfire_scene
      - conditions:
          - "{{ event == 12002 }}"
        sequence:
          - service: homeassistant.turn_on
            entity_id: !input romantic_scene

thanks for this! I have some problems importing the button in deconz- are you using that or something else?

I’m using Deconz with Conbee II on RPi4. Added to switches section:

1 Like

It’s possible to make this blueprint works with zigbee2mqtt?

2 Likes

I’ve managed to adapt the blueprint for the ZHA Integration.

However, none of the scene buttons triggers any event (at least none that I notice).
Do you have any advice for me how I can detect the occuring events?

This is the adapted blueprint I am currently using with the Livarno Lux lights from LIDL

blueprint:
  name: Muller Licht Remote
  description: Control lights with a Muller Licht Tint RGB Remote
  domain: automation
  input:
    remote:
      name: Remote
      description: Muller Licht Tint remote to use
      selector:
        device:
          integration: zha
          manufacturer: MLI
          model: ZBT-Remote-ALL-RGBW
    target_light:
      name: Light(s)
      description: The light(s) to control
      selector:
        target:
          entity:
            domain: light
    colour_ref:
      name: Colour Temperature Refence
      description: The light to use as a colour temp reference
      selector:
        entity:
          domain: light
    working_scene:
      name: Working Scene
      description: The scene to be triggered when the Working Light button is pressed
      selector:
        entity:
          domain: scene
    sunset_scene:
      name: Sunset Scene
      description: The scene to be triggered when the Sunset button is pressed
      selector:
        entity:
          domain: scene
    party_scene:
      name: Party Scene
      description: The scene to be triggered when the Party button is pressed
      selector:
        entity:
          domain: scene
    night_scene:
      name: Night Scene
      description: The scene to be triggered when the Night button is pressed
      selector:
        entity:
          domain: scene
    campfire_scene:
      name: Campfire Scene
      description: The scene to be triggered when the Campfire button is pressed
      selector:
        entity:
          domain: scene
    romantic_scene:
      name: Romantic Scene
      description: The scene to be triggered when the Romantic button is pressed
      selector:
        entity:
          domain: scene
    force_brightness:
      name: Force turn on brightness
      description: Force the brightness to the set level below, when the "on" button
        on the remote is pushed and lights turn on.
      default: false
      selector:
        boolean: {}
    brightness:
      name: Brightness
      description: Brightness of the light(s) when turning on
      default: 50
      selector:
        number:
          min: 0.0
          max: 100.0
          mode: slider
          step: 1.0
          unit_of_measurement: '%'
    step_value:
      name: Brightness increment/decrement percent
      description: Set the step percent value for brightness and color warmth
      default: 10
      selector:
        number:
          min: 1.0
          max: 20.0
          mode: slider
          step: 1.0
          unit_of_measurement: '%'
  source_url: https://community.home-assistant.io/t/muller-licht-tint-remote/283190
mode: restart
max_exceeded: silent
variables:
  force_brightness: !input 'force_brightness'
  step_value: !input 'step_value'
  colour_ref: !input 'colour_ref'
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'remote'
action:
- variables:
    event: '{{ trigger.event.data.cluster_id }}'
- choose:
  - conditions:
    - '{{ event == 6 }}'
    sequence:
    - choose:
      - conditions: '{{ force_brightness }}'
        sequence:
        - service: light.toggle
          target: !input 'target_light'
          data:
            brightness_pct: !input 'brightness'
      default:
      - service: light.toggle
        target: !input 'target_light'
  - conditions:
    - '{{ event == 8 }}'
    - '{{ trigger.event.data.args==[0,43,10] }} '
    sequence:
    - service: light.turn_on
      target: !input 'target_light'
      data:
        brightness_step_pct: '{{ step_value }}'
        transition: 1
  - conditions:
    - '{{ event == 8 }}'
    - '{{ trigger.event.data.args==[1,43,10] }}'
    sequence:
    - service: light.turn_on
      target: !input 'target_light'
      data:
        brightness_step_pct: -{{ step_value }}
        transition: 1
  - conditions:
    - '{{ trigger.event.data.command == ''move_to_color_temp'' }}'
    sequence:
    - service: light.turn_on
      target: !input 'target_light'
      data:
        color_temp: '{{ trigger.event.data.args[0] }}'
  - conditions:
    - '{{ event == 5002 }}'
    sequence:
    - service: light.turn_on
      target: !input 'target_light'
      data:
        color_temp: '{trigger.event.data.args[0] |int}}'
  - conditions:
    - '{{ trigger.event.data.command == ''move_to_color'' }}'
    sequence:
    - service: light.turn_on
      target: !input 'target_light'
      data:
        xy_color: '[{{ trigger.event.data.args[0]|float/45875 }}, {{trigger.event.data.args[1]|float/45875 }}]'
  - conditions:
    - '{{ event == 7002 }}'
    sequence:
    - service: homeassistant.turn_on
      entity_id: !input 'working_scene'
  - conditions:
    - '{{ event == 8002 }}'
    sequence:
    - service: homeassistant.turn_on
      entity_id: !input 'sunset_scene'
  - conditions:
    - '{{ event == 9002 }}'
    sequence:
    - service: homeassistant.turn_on
      entity_id: !input 'party_scene'
  - conditions:
    - '{{ event == 10002 }}'
    sequence:
    - service: homeassistant.turn_on
      entity_id: !input 'night_scene'
  - conditions:
    - '{{ event == 11002 }}'
    sequence:
    - service: homeassistant.turn_on
      entity_id: !input 'campfire_scene'
  - conditions:
    - '{{ event == 12002 }}'
    sequence:
    - service: homeassistant.turn_on
      entity_id: !input 'romantic_scene'

Yes, you need to go to Developer Tools > Events, then enter zha_event into the ‘Listen to events’ box, then click start listening. Now press the scene buttons on the remote and you’ll get the event details.

1 Like

That’s the way I did it for the other buttons. In the image you can see the output for the ‘reduce brightness’ button.
Before taking the screenshot, I also pressed all scene buttons (single/double/long press). Those do not show up at all, even when showing all events (’*’ as event type)

I’d say the issue would be with the ZHA support of the device. I find the Blackaddr list a useful resource for working out how well devices are supported by the various Zigbee options: Müller Licht Tint Remote Control 404011 Zigbee compatibility info (blakadder.com)

Hi!

I have imported your template. I was able to integrate the Müller Licht remote control via deconz without any problems.

I then used your template to create an automation and set all the scenes and entities.

However, when I trigger the automation, I get the following error message:

Error: UndefinedError: 'dict object' has no attribute 'event'

Now, unfortunately, I don’t know what to do either.

Can anyone help me?

Best regards!