[AlexxIT / SonoffLAN] Can't turn on Sonoff L1 led strip and set a custom color and brightness

I’m using the AlexxIT Sonoff integration (without flashing devices) and I’m trying to write a script to turn on a Sonoff L1 led strip on a specific color and brightness percentage, but I’m probably missing something:

test_sonoffl1:
  alias: Testing Sonoff L1
  sequence:
  - service: light.turn_on
    entity_id: light.sonoff_l1_fitaled_luis
    hs_color:
        - 32
        - 100
    brightness_pct: 5

Any ideas?

I had the same issue in an automation.
What worked for me is to first turn on, then change color.

action:
  - entity_id: light.sonoff_1000cb7905
    service: light.turn_on
  - delay: '1'
  - data:
      hs_color:
        - 29
        - 100
    entity_id: light.sonoff_1000cb7905
    service: light.turn_on
2 Likes

Hi again,

The @Hellis81 tip worked out really nice but I also discovered that (for some weird reason) you always need to specify the hs_color even if you only want to change the brightness.

This is my final script to turn on my kid’s bedroom light strip in a warm color at 4% intensity and then lower its brightness slowly until a complete shutdown, which it’s perfect for bedtime:


kid_bedtime_light:
  alias: Kid bedtime light
  mode: single
  icon: hass:bed
  sequence:
  - service: light.turn_on
    entity_id: light.sonoff_l1_fitaled_luis
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: light.turn_on
    entity_id: light.sonoff_l1_fitaled_luis
    data:
      brightness_pct: 4
      hs_color:
      - 32
      - 100
  - delay:
      hours: 0
      minutes: 6
      seconds: 0
      milliseconds: 0
  - service: light.turn_on
    entity_id: light.sonoff_l1_fitaled_luis
    data:
      brightness_pct: 3
      hs_color:
      - 32
      - 100
  - delay:
      hours: 1
      minutes: 6
      seconds: 0
      milliseconds: 0
  - service: light.turn_on
    entity_id: light.sonoff_l1_fitaled_luis
    data:
      brightness_pct: 2
      hs_color:
      - 32
      - 100
  - delay:
      hours: 1
      minutes: 6
      seconds: 0
      milliseconds: 0
  - service: light.turn_on
    entity_id: light.sonoff_l1_fitaled_luis
    data:
      brightness_pct: 1
      hs_color:
      - 32
      - 100
  - delay:
      hours: 1
      minutes: 6
      seconds: 0
      milliseconds: 0
  - service: light.turn_off
    entity_id: light.sonoff_l1_fitaled_luis
    data: {}

That was really useful - thanks!!
Was struggling with this for days.

What else other “features” would the L1 support? Like transition etc? Nothing from what is available in the action parameters?

Up to now seems like only brightness and hsl?