Zigbee2Mqtt - Muller Licht Tint Remote (MLI-404011)

A simple automation based on events that allows full use of the Muller Licht Remote via the Zigbee2Mqtt integration.

Features:

  • Individual control by group selection. (If you don’t need this set all to same.)
  • Colour control
  • Temperature control
  • Brightness control
  • Scene selection

Tested in our place with this model: MLI-404011

Enjoy,

Bool2

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

blueprint:
  name: Muller Licht Remote (Zigbee2MQTT)
  domain: automation
  input:
    remote:
      name: Remote
      description: Remote control entity
      selector:
        entity:
          integration: mqtt
          domain: sensor
    target_light_1:
      name: Light 1
      description: Lights to control for 1 (*--)
      selector:
        target:
          entity:
            domain: light
    target_light_2:
      name: Light 2
      description: Lights to control for 2 (-*-)
      selector:
        target:
          entity:
            domain: light
    target_light_3:
      name: Light 3
      description: Lights to control for 3 (--*)
      selector:
        target:
          entity:
            domain: light
    scene_3:
      name: Reading scene
      selector:
        target:
    scene_1:
      name: Sunset scene
      selector:
        target:
    scene_2:
      name: Party scene
      selector:
        target:
    scene_6:
      name: Night scene
      selector:
        target:
    scene_4:
      name: Fire scene
      selector:
        target:
    scene_5:
      name: Romantic scene
      selector:
        target:
trigger:
  - platform: event
    event_type: state_changed
    event_data:
      entity_id: !input 'remote'
condition: []
action:
  - choose:
      - conditions:
          - condition: template
            value_template: '{{ action_name=="on" or action_name=="off" }}'
        sequence:
          - service: light.toggle
            target: "{{ target_device }}"
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="scene_1") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_1'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="scene_2") 
              }}        
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_2'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="scene_3") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_3'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="scene_4") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_4'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="scene_5") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_5'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="scene_6") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_6'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="color_temp") 
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data:
              color_temp: "{{ action_color_temp }}"
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="brightness_down_click") 
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data:
              brightness_step: -20
              transition: 1
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="brightness_up_click") 
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data:
              brightness_step: 20
              transition: 1
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (trigger.event.data.new_state.attributes.action=="color_wheel") 
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data:
              xy_color:
                - "{{ action_color.x }}"
                - "{{ action_color.y }}"
    default:
      - service: logbook.log
        data:
          name: Oops
          message: Unhandled remote action
mode: single
variables:
  action_color_temp: '{{ trigger.event.data.new_state.attributes.action_color_temperature }}'
  action_color: '{{ trigger.event.data.new_state.attributes.action_color }}'
  action_name: '{{ trigger.event.data.new_state.attributes.action }}'
  target_light_1: !input 'target_light_1'
  target_light_2: !input 'target_light_2'
  target_light_3: !input 'target_light_3'
  target_device: |-
    {%- if trigger.event.data.new_state.attributes.action_group==16388 -%} 
    {{ target_light_1 }}
    {%- elif trigger.event.data.new_state.attributes.action_group==16389 -%}
    {{ target_light_2 }}
    {%- elif trigger.event.data.new_state.attributes.action_group==16390 -%} 
    {{ target_light_3 }}
    {%- else -%} 
    unknown
    {%- endif -%}
2 Likes

Thanks. Was just looking for a remote to control the lights and this is perfect!

hey @bool2

I’m trying to make it work but It doesn’t work for me. I saw in your code that you use a variable to detect with light (of the 3 positions on the remote) is being used.

  target_device: |-
    {%- if trigger.event.data.new_state.attributes.action_group==16388 -%} 
    {{ target_light_1 }}
    {%- elif trigger.event.data.new_state.attributes.action_group==16389 -%}
    {{ target_light_2 }}
    {%- elif trigger.event.data.new_state.attributes.action_group==16390 -%} 
    {{ target_light_3 }}
    {%- else -%} 
    unknown
    {%- endif -%}

I’ve captured the event from he remote but attribute action group is not on the events I capture.

Event 0 fired 4:37 PM:

{
    "event_type": "state_changed",
    "data": {
        "entity_id": "sensor.remote_action",
        "old_state": {
            "entity_id": "sensor.remote_action",
            "state": "",
            "attributes": {
                "icon": "mdi:gesture-double-tap",
                "friendly_name": "remote action"
            },
            "last_changed": "2022-01-19T15:36:16.884185+00:00",
            "last_updated": "2022-01-19T15:36:16.884185+00:00",
            "context": {
                "id": "4092765a3fd6e52fac2bfc6",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "sensor.remote_action",
            "state": "on",
            "attributes": {
                "icon": "mdi:gesture-double-tap",
                "friendly_name": "remote action"
            },
            "last_changed": "2022-01-19T15:37:17.986229+00:00",
            "last_updated": "2022-01-19T15:37:17.986229+00:00",
            "context": {
                "id": "48194663b581f508a6170969",
                "parent_id": null,
                "user_id": null
            }
        }
    },

any ideas?

I have the same problem as revin.
Any help?

Hi @kuenkin

I made a new blueprint from scratch as I couldn’t find what was the original problem

Here you have:

blueprint:
  name: Remote - Müller Lint Tint - Z2M MQTT v1
  description: Control lights with a Müller-Lint Tint Switch.
  domain: automation
  input:
    remote:
      name: Remote mqtt topic
      description: This must be the TOPIC from zigbee2mqtt. For example z2m/remote_1
      selector:
        text:
    light:
      name: Target light
      selector:
        entity:
          domain: light
    step:
      name: Dimming step in percent
      default: 10
      selector:
        number:
          min: 0.0
          max: 50.0
          mode: slider
          step: 1.0
          unit_of_measurement: "%"
    transition:
      name: transition duration
      default: 1
      selector:
        number:
          min: 0.0
          max: 5.0
          mode: slider
          step: 0.5
          unit_of_measurement: "s"
    scene_1:
      name: Sunset Scene
      default: {}
      selector:
        entity:
          domain: scene
    scene_2:
      name: Reading Scene
      default: {}
      selector:
        entity:
          domain: scene
    scene_3:
      name: Party Scene
      default: {}
      selector:
        entity:
          domain: scene
    scene_4:
      name: Relax Scene
      default: {}
      selector:
        entity:
          domain: scene
    scene_5:
      name: Night Scene
      default: {}
      selector:
        entity:
          domain: scene
    scene_6:
      name: Love Scene
      default: {}
      selector:
        entity:
          domain: scene

trigger:
  - platform: mqtt
    topic: !input "remote"
action:
  - variables:
      command: "{{trigger.payload_json.action}}"
      step: !input "step"
      negative_step: "{{ -1 * (step | int) }}"
  - choose:
      - conditions: "{{ command == 'on' or command == 'off' }}"
        sequence:
          - service: light.toggle
            data_template:
              entity_id: !input "light"
              transition: !input "transition"
      - conditions: "{{ command == 'brightness_step_down' }}"
        sequence:
          - service: light.turn_on
            data_template:
              entity_id: !input "light"
              brightness_step_pct: "{{ negative_step }}"
              transition: !input "transition"
      - conditions: "{{ command == 'brightness_step_up' }}"
        sequence:
          - service: light.turn_on
            data_template:
              entity_id: !input "light"
              brightness_step_pct: "{{ step }}"
              transition: !input "transition"

      - conditions: "{{ command == 'color_temperature_move' }}"
        sequence:
          - service: light.turn_on
            data_template:
              entity_id: !input "light"
              color_temp: "{{trigger.payload_json.action_color_temperature}}"
              transition: !input "transition"

      - conditions: "{{ command == 'color_move' }}"
        sequence:
          - service: light.turn_on
            data_template:
              entity_id: !input "light"
              xy_color:
                - "{{trigger.payload_json.action_color.x}}"
                - "{{trigger.payload_json.action_color.y}}"
              transition: !input "transition"

      - conditions: "{{ command == 'scene_1' }}"
        sequence:
          - service: scene.turn_on
            target:
              entity_id: !input "scene_1"

      - conditions: "{{ command == 'scene_2' }}"
        sequence:
          - service: scene.turn_on
            target:
              entity_id: !input "scene_2"

      - conditions: "{{ command == 'scene_3' }}"
        sequence:
          - service: scene.turn_on
            target:
              entity_id: !input "scene_3"

      - conditions: "{{ command == 'scene_4' }}"
        sequence:
          - service: scene.turn_on
            target:
              entity_id: !input "scene_4"

      - conditions: "{{ command == 'scene_5' }}"
        sequence:
          - service: scene.turn_on
            target:
              entity_id: !input "scene_5"

      - conditions: "{{ command == 'scene_6' }}"
        sequence:
          - service: scene.turn_on
            target:
              entity_id: !input "scene_6"

It’s a first approach where on/off, color and intensity buttons works. Also, I’ve declared the possibility to use the scenes buttons but I didn’t tested yet.

Also, I haven’t developed the possibility to use the “bulb” button where you can control put to three different lights as I only need 1.

2 Likes

Thanks @revin, I will try and give feedback

It works perfectly, and the scenes also are working.
Thanks very much!!!

1 Like

Happy to hear it.

I find some free time in following weeks, I’ll work on adding support for the bottom button and be able to control 3 different lights with same remote

1 Like

Hello everyone,

thanks you for sharing

I’m trying to vary the color temperature of the bulbs but it doesn’t work.
In my code example, the goal is to add or remove with a 40 step, by the bulb color (for the bulb HUE = color_temp).

- conditions:
          - condition: template
            value_template: |-
              {{
                 (trigger.event.data.new_state.attributes.action_color_temperature_direction=="up")
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data:
              color_temp: "{{ state_attr(target_device, 'color_temp') | int + 40}}"
      - conditions:
          - condition: template
            value_template: |-
              {{
                 (trigger.event.data.new_state.attributes.action_color_temperature_direction=="down")
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data:
              color_temp: "{{ state_attr('light.kitchen', 'color_temp') | int - 40}}"

It seems that the variable ‘target_device’ does not correspond to anything.

color_temp: "{{ state_attr(target_device, 'color_temp') | int + 40}}"

However, I tried to replace the variable directly by the device id (light.kitchen), it works like a charm.

color_temp: "{{ state_attr('light.kitchen', 'color_temp') | int - 40}}"

Any ideas what I might have done wrong ?
Thanks :slightly_smiling_face:

Hey @revin i am missing the action_groups in my payload too and your script is working for just one lamp… did you manage to get more than one lamp to be controlled by the remote ?

Thank you guys, for both of your solutions. However, the one from OP did not work for me at first, and the answer from @revin was not enough for me, as I needed to control and use all features of the remote. I managed to get it to work, by mixing both blueprints. Check this out. I am sure, it can be improved but for now it is okay. Maybe I will update it later. What you need it, the TOPIC of your remote from zigbee2mqtt. For me it was zigbee2mqtt/“Friendly name of your remote”. The second thing you need, is the group id. Just press few buttons with one of the groups selected and look inside the log of zigbee2mqtt add-on. For me it was 1, 2 and 3, but this may be different.

blueprint:
  name: Muller Licht Remote (Zigbee2MQTT)
  domain: automation
  input:
    remote:
      name: Remote mqtt topic
      description: This must be the TOPIC from zigbee2mqtt. For example z2m/remote_1
      selector:
        text:
    target_light_1:
      name: Light 1
      description: Lights to control for 1 (*--)
      selector:
        target:
          entity:
            domain: light
    target_light_2:
      name: Light 2
      description: Lights to control for 2 (-*-)
      selector:
        target:
          entity:
            domain: light
    target_light_3:
      name: Light 3
      description: Lights to control for 3 (--*)
      selector:
        target:
          entity:
            domain: light
    step:
      name: Dimming step in percent
      default: 10
      selector:
        number:
          min: 0.0
          max: 50.0
          mode: slider
          step: 1.0
          unit_of_measurement: "%"
    scene_3:
      name: Reading scene
      selector:
        target:
    scene_1:
      name: Sunset scene
      selector:
        target:
    scene_2:
      name: Party scene
      selector:
        target:
    scene_6:
      name: Night scene
      selector:
        target:
    scene_4:
      name: Fire scene
      selector:
        target:
    scene_5:
      name: Romantic scene
      selector:
        target:
trigger:
  - platform: mqtt
    topic: !input "remote"

condition: []
action:
  - choose:
      - conditions:
          - condition: template
            value_template: '{{ action_name=="on" }}'
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
      - conditions:
          - condition: template
            value_template: '{{ action_name=="off" }}'
        sequence:
          - service: light.turn_off
            target: "{{ target_device }}"
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="scene_1") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_1'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="scene_2") 
              }}        
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_2'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="scene_3") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_3'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="scene_4") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_4'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="scene_5") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_5'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="scene_6") 
              }}
        sequence:
          - service: homeassistant.turn_on
            target: !input 'scene_6'
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="color_temperature_move") 
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data_template:
              color_temp: "{{ action_color_temp }}"
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="brightness_step_down") 
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data_template:
              brightness_step_pct: "{{ negative_step }}"
              transition: 1
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="brightness_step_up") 
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data_template:
              brightness_step_pct: "{{ step }}"
              transition: 1
      - conditions:
          - condition: template
            value_template: |-
              {{ 
                 (action_name=="color_move") 
              }}
        sequence:
          - service: light.turn_on
            target: "{{ target_device }}"
            data_template:
              xy_color:
                - "{{trigger.payload_json.action_color.x}}"
                - "{{trigger.payload_json.action_color.y}}"
    default:
      - service: logbook.log
        data:
          name: Oops
          message: Unhandled remote action "{{ action_name }}" --- "{{ action_color_temp }}" --- "{{ action_color }}"
mode: single
variables:
  step: !input "step"
  negative_step: "{{ -1 * (step | int) }}"
  action_color_temp: '{{ trigger.payload_json.action_color_temperature }}'
  action_color: '{{ trigger.payload_json.action_color }}'
  action_name: '{{ trigger.payload_json.action }}'
  target_light_1: !input 'target_light_1'
  target_light_2: !input 'target_light_2'
  target_light_3: !input 'target_light_3'
  target_device: |-
    {%- if trigger.payload_json.action_group==16388 -%} 
    {{ target_light_1 }}
    {%- elif trigger.payload_json.action_group==16389 -%}
    {{ target_light_2 }}
    {%- elif trigger.payload_json.action_group==16390 -%} 
    {{ target_light_3 }}
    {%- else -%} 
    unknown
    {%- endif -%}

This version supports multiple lights, scenes, color changes and 3 groups.

Updated:: fixed Temperatur and brightness setting, changed group to default, fixed buttons, improved steps.

Hello,

Unfortunately I don’t get the remote control selected when importing the blueprint.
I am using Deconz ConBee2 and need urgent help.
What can I do?

Greetings Udo