How to add LIFX Smart Bulb in home assistant


In this blog post I’m going to outline how you can add your new LIFX bulbs in home assistant.

Go to configuration –> Integration and click on Lifx.

Click Submit, at this stage you will have your devices and entity id. I would always recommend to change the name into something more meaningful and easier to use in automations.

The LiFX Smart Bulb connects to your network using WiFi and not Zigbee as for example the Philips Hue bulbs, this means it doesn’t require a hub. In my experience I noticed a delay between the status of the bulb changing and the status in home assistant when the power was removed / turned on from the switch. The standard service light.turn_on cannot be used with this integration, meaning that you will have you use lifx services.

Lifx Services:

  • effect_color_loop
  • effect_pulse
  • set_state
  • effect_stop

 

Follow this video for a full review and configuration:

 

Automation Code:

In your own code substitute the following:

  • light.lifx
  • sensor.inspiration_motion_light_level
  • binary_sensor.inspiration_motion_sensor

Turn on the Bulb when motion is detected

alias: Turn on LED blub when there is motion in the Inspiration Room

trigger:
  platform: state
  entity_id: binary_sensor.inspiration_motion_sensor
  to: 'on'
condition:
    condition: numeric_state
    entity_id: sensor.inspiration_motion_light_level
    below: 100
action:
     service: lifx.set_state
     entity_id: light.lifx
     data:
       brightness: 255
       power: true
       entity_id: light.lifx

Activate rainbow loop effect when motion is detected with colours changing every second

alias: Activate rainbow loop effect when motion is detected

trigger:
  platform: state
  entity_id: binary_sensor.inspiration_motion_sensor
  to: 'on'
condition:
    condition: numeric_state
    entity_id: sensor.inspiration_motion_light_level
    below: 100
action:
     service: lifx.effect_colorloop
     entity_id: light.lifx
     data:
       brightness: 200
       period: 1
       entity_id: light.lifx

 

Gio

Gio loves rabbits, smart home tech, WWII, travelling to Thailand & my favourite pizza is margherita with parma ham!

Recent Posts