Using Ormanäs smart light strip with Home Assistant

I needed a cabinet to display my Lego sets. My wife found the IKEA Fabrikör. It is the perfect display cabinet. I also added Ormanäs smart light strips on the back. This scratched my Home Assistant geeky and my Lego itch.

I am using the Home Assistant Connect ZBT-1 (previously known as Home Assistant SkyConnect) for my Zigbee network. To connect the lights, go to the devices page in Home Assistant and select Add Device in the bottom right hand corner. This will put Home Assistant in search mode. On the Ormanäs find the reset hole and hold it for about ten seconds. The lights should then show up in Home Assistant.

Ormanäs reset switch

When making an automation you have a lot of option to choose from. Below are the options you will see when you turn the lights on. In this case I am using the illuminance level from the Everything Presence Lite to turn on the lights when the room is dark. This will happen between 3pm and 10pm. You can’t use Colorr Temperature and Colour in the same automation.

 

Ormanäs standard options

 

Ormanäs advanced options

Here is the YAML for the above.

alias: Lego Cabinets - Turn on if office is dark
description: Lego Cabinets - Turn on if office is dark
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.everything_presence_lite_5c0750_illuminance
    below: "1"
condition:
  - condition: time
    after: "15:00:00"
    before: "22:00:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
action:
  - action: light.turn_on
    metadata: {}
    data:
      brightness_pct: 80
      rgb_color:
        - 255
        - 168
        - 91
    target:
      entity_id: light.lego_cabinet_1_light
mode: single

I thought it would be fun for the lights to pick a random colour every five minutes. I have gone off this idea as I prefer the yellow warmth more, but I may revisit it around Christmas time.

alias: Change Lego Cabinet Light Color
description: Change Lego Cabinet Light Color
trigger:
  - platform: state
    entity_id: light.lego_cabinet_1_light
    to: "on"
action:
  - repeat:
      while:
        - condition: state
          entity_id: light.lego_cabinet_1_light
          state: "on"
      sequence:
        - data_template:
            entity_id: light.lego_cabinet_1_light
            rgb_color:
              - "{{ range(0, 256) | random }}"
              - "{{ range(0, 256) | random }}"
              - "{{ range(0, 256) | random }}"
            brightness: 150
          action: light.turn_on
        - delay:
            hours: 0
            minutes: 5
            seconds: 0
            milliseconds: 0

Random colours. In this case every 10 seconds

 
Michael Curtis

My introduction to computers started at my middle school in 1981 when our maths teacher brought in a ZX80. That led the computer club being founded and using a Research Machine 380Z

My first computer was a 48K ZX Spectrum which I loved to programme. Once I left school I worked as a photocopier engineer, then a fax engineer and finally moving on the Apple computers.

For the next 30 years I worked as a system administrator. I now work in the cyber security industry as a Sophos Professional Services consultant

https://www.bazmac.me
Previous
Previous

Apple Watch - Setup Accessories Using The Home App On Your iPhone

Next
Next

Daikin Altherma 3 Heat Pump, Home Assistant, Emoncms and heatpumpmonitor.org