ZHA - IKEA five button remote for lights

Yes, ControllerX is really great. Do you think it’s possible to integrate / combine ControllerX capabilities with the simplicity of blueprints? It would be really great to be able to configure multiple clicks of a IKEA / hue remote just within the UI.

Thanks @frenck. I had a bit of a panic when I first imported the blueprint and all of my automations in the GUI disappeared, but I realised I’d opened the options to set an action for the left button and not added anything so things got a bit screwy. I manually removed the broken automation, reloaded automations and added it from the blueprint again without messing with it this time and it’s working perfectly.

I can see the blueprint function getting a lot of use, it’s so much simpler than trying to copy automation code around from forum posts.

Awesome work!!!

Is there a way to add middle button long press support also?

+1 for this

How can I make this change color as well?

I’m also wondering the same!

2 Likes

Hi @AndrejDelany,

The great thing about ControllerX is that is an automation created with Python code. The only way of creating automations with Python code is either with AppDaemon or Pyscript, and either of them are supported natively by HA, which will make it difficult to integrate.

I agree with you, though. I created ControllerX because HA did not allow you to create automations easily for your controllers, but seems that Blueprints are the first step towards that goal. I would also love a way of binding a controller with a light with all its functionalities and be able to configure all things that ControllerX already does via UI.

We will get there one day, I am sure :slight_smile:

Regards,
Xavi M.

The problem with the middle button for this controller is that also fires the click action ( not matter the integration - z2m, deconz, zha). However, if you are looking for more flexibility, I recommend you taking a look to ControllerX.

Regards,
Xavi M.

2 Likes

Thanks, I guess I missed that while testing, thanks for the pointer.

I already have ControllerX setup, just trying to get more custom control over my remoted…

If you need any help with ControllerX setup, just let me know. I am happy to help you out :slight_smile:

thanks for the offer, I have it 99% where I want it so I am very happy with it, I just like to toy around with things…

1 Like

so can someone tell me why this works on one unit (at my work) but the one i would like it to work on (home) it wont thanks jeff

An example how I set 4 different color temperatures on that bulb with the left and right buttons

Left button - short press:

  • Action: Call service
  • Service: light.turn_on
  • Name of entities to turn on: (select your bulb)
  • Service data: kelvin: 2800

Left button - long press:

  • Action: Call service
  • Service: light.turn_on
  • Name of entities to turn on: (select your bulb)
  • Service data: kelvin: 2200

Right button - short press:

  • Action: Call service
  • Service: light.turn_on
  • Name of entities to turn on: (select your bulb)
  • Service data: kelvin: 3400

Right button - long press:

  • Action: Call service
  • Service: light.turn_on
  • Name of entities to turn on: (select your bulb)
  • Service data: kelvin: 4000

It’s not perfect, but maybe a beginning. There are more data attributes on the https://www.home-assistant.io/integrations/light/ page.

1 Like

For DeConz it is available with color change: deCONZ - IKEA five button remote for lights with color temp
I hope someone can rewrite this to ZHA. I can’t as I am a user and not a code writer.

1 Like

Hi there!

Having some sort of issues when I try to create an automation with this Blueprint. I can start the creation and choose the remote, bulb etc, but when I save the automation a small gray box pops up in the lower left corner with no text and no automation is created.
Other Blueprints I have used like the IKEA two button dimmer works fine.

My config is the latest release of HA and IKEA without a hub. ZHA is in use and I can control the IKEA lamp through Lovelace without any issues…

/Thanks

This get written in the logg when I try to create the automation.

Logger: aiohttp.server
Source: components/config/automation.py:59
First occurred: 0:07:23 (3 occurrences)
Last logged: 0:08:30

Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py”, line 422, in _handle_request
resp = await self._request_handler(request)
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py”, line 499, in _handle
resp = await handler(request)
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py”, line 118, in impl
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 18, in request_context_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 72, in ban_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 127, in auth_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 129, in handle
result = await result
File “/usr/src/homeassistant/homeassistant/components/config/init.py”, line 160, in post
self._write_value(hass, current, config_key, data)
File “/usr/src/homeassistant/homeassistant/components/config/automation.py”, line 59, in _write_value
if CONF_ID not in cur_value:
TypeError: argument of type ‘NoneType’ is not iterable

Just wanted to let you know that I solved it myself.

In the automation.yaml file I managed to get a space in the last row that caused this behavior.

You setup if way easier. I had to change 1 line of code from your example to get this working. Beer inc!

1 Like

Thanks for this! It works nicely including the dimming, except for when I keep holding the dim (up/down) buttons, which doesn’t seem to do anything. Any ideas?

1 Like

This blueprint isn’t working for me… Every time I create an automation, it crashes my automations service until I go into automations.yaml and remove the entry for the Ikea remote. I installed the blueprint using the import feature, so I’m pretty confident there’s nothing wrong there.

I’m attaching the code that’s causing the error in my autoations. Anyone see the issue?

- id: '1610601240821'
  alias: John Lamp Remote
  description: ''
  use_blueprint:
    path: frenck/zha-ikea-five-button-remote-for-lights.yaml
    input:
      brightness: '50'
      light:
        entity_id: light.john_lamp
      button_left_short:
      - type: toggle
        device_id: 18eecb122526b5b7889b46f2d2569162
        entity_id: light.wife_lamp
        domain: light
      button_left_long:
      - device_id: ''
        domain: ''
        entity_id: ''
      button_right_short:
      - type: toggle
        device_id: 5497e0650df499d296c2bbecac70b7be
        entity_id: light.master_bed_1
        domain: light
      - type: toggle
        device_id: d3b059839ebd2e213a1ba19cbead77d0
        entity_id: light.master_bed_2
        domain: light
      remote: 4942298d2e0c05bfe11ff3cde2a50372

I wanted to grab these IKEA buttons for a long time but I was a bit hesitant if I could make them work for me and my wife’s bedside lights for controlling on-off, scenes and colours easliy.

After reading this post I ordered them. A big THANK YOU to @frenck for this contribution.