PWM LED light flicker compensation

As many have noticed, modern LED lights aren’t always dimming perfectly in old armatures. Flickering on certain levels or intervals seems to be the rule. Some have rebuilt their armatures and installed LED specific drivers, others suggest testing different LED lights, until a flicker free dimmer/driver/LED combination is found.

In my case, this is going to be costly, so I wrote this automation to simply “avoid” the flicker interval.

alias: Belysning hall - flimmerfri
description: ""
trigger:
  - platform: numeric_state
    entity_id: light.dimmer_inre_hall
    attribute: brightness
    below: 71
    above: 31
condition: []
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: light.dimmer_inre_hall
            attribute: brightness
            below: "71"
            above: 46
        sequence:
          - service: light.turn_on
            data:
              brightness: 71
            target:
              entity_id: light.dimmer_inre_hall
      - conditions:
          - condition: numeric_state
            entity_id: light.dimmer_inre_hall
            attribute: brightness
            below: 47
            above: 31
        sequence:
          - service: light.turn_on
            data:
              brightness_pct: 31
            target:
              entity_id: light.dimmer_inre_hall
mode: single

Unfortunately, the automation uses absolute values, but the light controls use percent, so you have to calculate between the two to find the proper values for the automation.
There will be a noticeable drop in light intensity when adaptive lighting dims past the rather large flicker interval, but I prefer this to flicker.

This is just an easy hack with hard coded values, but easy to adapt to your needs. For example, if you have two flicker intervals, just add new conditions!

/Fumble

1 Like