ZHA - IKEA five button remote for lights

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.

Just got my IKEA Trådfri remotes. Added one of them to ZHA, imported the blueprint but as with @utahguyiam above, my automations crash and disappear. Maybe I am not configuring it correctly or is there some errors in the code?

The error I am getting in notifications is this:

Invalid config
The following integrations and platforms could not be set up:

automation
Please check your config and logs.

The above notification is persistent even when I remove the blueprint. The log has the following:

Logger: homeassistant.config
Source: config.py:415
First occurred: 0:31:31 (7 occurrences)
Last logged: 0:31:32

Invalid config for [automation]: Failed to load blueprint: Unable to find frenck/zha-ikea-five-button-remote-for-lights.yaml (See /config/configuration.yaml, line 9).

I got mine working. I can’t recall exactly, but I believe it was either line spacing or missing a dash in one of the types, something like that.

I don’t believe your errors are the same as mine were though.

Here’s a copy of the code for my automation that’s currently working for comparison with the one I input above that wasn’t. The only difference that jumps out to me is that the “remote” field is moved to the top of the automation.

Sorry I’m not more help.


- id: '1610778535583'
  alias: Sarah's Lamp Remote
  description: ''
  use_blueprint:
    path: frenck/zha-ikea-five-button-remote-for-lights.yaml
    input:
      brightness: '50'
      remote: 4942298d2e0c05bfe11ff3cde2a50372
      light:
        entity_id: light.wife_lamp
      button_left_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
      button_right_short:
      - type: toggle
        device_id: 63bd466f607e1a1c09f6a5c272409102
        entity_id: light.john_lamp
        domain: light```

Hey @utahguyiam,

Thanks for replying and sharing your code. It seems that my remote is not registering correctly and that may be the problem.

Quick question. Do you get data in Developer Tools when listening to zha_event and clicking the remote’s buttons?

Sorry for the slow response. Yes, I do get zha_event data. If you’re not, try re-pairing.

My experience with these remotes is really hit and miss. I’ve had 4 in total. 2 didn’t work right from the jump and got returned after a couple weeks of pulling hair out to troubleshoot them. Of the 2 I still have, one works flawlessly. The other one gobbles batteries (like fresh to dead in under 2 weeks), works intermittently even with fresh batteries, etc.

In general, I find Ikea’s Smart devices a little lacking. Their bulbs have a weird color range (something like 1900k-4000k when most are 2700-5000k), their remotes are unreliable, and everything is hard to pair. I keep a handful of Ikea stuff on my network because it is a good repeater for Xiaomi Aqara stuff, but aside from that purpose, I have other budget brands I prefer for pretty much everything.

I set up my remote with this blueprint and now the remote battery only lasts 2 days or so. Does anyone know what might be going on?

I needed to change “move_with_on_off” and “move” args value from [0, 84] to [0, 83] to get press and hold Dim up/down working

This is brilliant,

I just grabbed one of these remotes and set it up in no time with my family room lights. Think I might have to pick some more of these up for other rooms :grinning: