IKEA Trådfri

Robert AndresenHome Assistant, Internet of things Leave a Comment

I recently bought an IKEA Trådfri gateway and some bulbs. This was a great and cheap supplement for automating my last missing lights.

I have two ceiling lights in my hallway. I bought a Double Switch from Fibaro, but it’s a tight fit behind the switch on the wall. Buying two new separate relays for each light would cost too much. Therefore, when IKEA had a family member discount, it was a cheap and great solution.

Later on, I have added new bulbs to my staircase, bedroom ceiling light and nightlights, outdoor lights, etc… I have also ordered two RGB bulbs that I do not really know what to do with yet… Maybe some porn-lights in my bedroom if I get permission 😀


The remote

One of the great things I like about IKEA Trådfri, is the remote control and Home Assistant support. I have a remote in my hallway and bedroom now, so I can turn on/off the lights when standing in the room. The old light switch can be used as well, but if the lights are turned off with the remote, you have to flip the switch twice (off and on) – but still, the lights can be controlled “on site”.

Home Assistant (HA)

With HA, I can also build automations with the lights. Currently the hallway lights are turned on when my Fibaro motion sensor triggers.

All lights also turns off with a script, which also can be triggered on my home status “away”.

My next step will be to test “Wakeup” lights in the bedroom.

Adding IKEA Trådfri to HA

My controller was detected automatically and I just needed to enter the code under the IKEA gateway.

HA imports groups created in the IKEA app, remotes and each bulbs. You can turn off import for the IKEA groups in the HA config.

The IKEA groups in HA can be used to turn lights on/off, but not to set brightness and color temperature. When I wanted to automate the ceiling light in my hallway on motion, I had to add each bulb to set the brightness and color temperature.

The same problem is when I want to add the lights to my light group. I had to create a new group in HA, to get the extended controls for brightness and color temperature.

Tip: You need the remote to add a bulb to IKEA trådfri. This will add the bulb under the same group as your remote. After adding the bulb, you can use the app to create a new group without a remote and drag the bulb under this group. Then it can’t be controlled with a remote, but still works in the app and HA.

Tip 2: Make sure to give each bulb good names. The name will be used in the HA entity id. Changing the name later, will also change the entity id in HA and break any config using the old name/entity id.


Home Assistant config

See my full config on Github.


  name: Hallway light
  - light.gang_bulp_1
  - light.gang_bulp_2
  - light.gang_bulp_3
  - light.gang_bulp_4
  view: false


- alias: 'Motion Hallway Ceiling lights ON'
    platform: state
    entity_id: binary_sensor.fibaro_motion_1_sensor
    to: 'on'
    condition: state
    entity_id: input_boolean.hallway_lights_roof_automated
    state: 'on'
  - service: light.turn_on
    entity_id: light.gang_bulp_1
        brightness: 60
        color_temp: 457
  - service: light.turn_on
    entity_id: light.gang_bulp_2
        brightness: 60
        color_temp: 457
  - service: light.turn_on
    entity_id: light.gang_bulp_3
        brightness: 60
        color_temp: 457
  - service: light.turn_on
    entity_id: light.gang_bulp_4
        brightness: 60
        color_temp: 457