Sonoff L1 - colour control in a scene not working

I have a Sonoff L1 (Spider-Z) which works perfectly on the UI using the SonoffLAN integration from AlexxIT.

On the UI the color wheel works as expected too, showing the HS colour numbers as you select from the wheel.

I want a scene that switches the L1 on and sets it to a particular blue. My problem is that while the scene works, the color is never changed.

This is the full scene extract;

- id: 'xyz'
  name: Terrace Strip light to dark blue
  entities:
    light.sonoff_1000123456:
      brightness: 255
      cloud: online
      effect: Colorful
      effect_list:
      - Colorful
      - Colorful Gradient
      - Colorful Breath
      - DIY Gradient
      - DIY Pulse
      - DIY Breath
      - DIY Strobe
      - RGB Gradient
      - DIY Gradient
      - RGB Breath
      - RGB Strobe
      - Music
      friendly_name: Strip
      hs_color:
      - 240
      - 100
      icon: mdi:led-strip-variant
      manufacturer: ABC
      model: 2.0-led
      rssi: -61
      state: 'on'
      supported_features: 21
      sw_version: PSF-BTA-GL v2.9.0

Nobody using an L1 or Spiderz in a scene?

Solved it. First my colour parameters were not indented correctly. Then I removed all but the brightness and hs_color line plus state on.

How did you do that, the integration simply found the L1 and created the entity/card to choose colors? i have it same sw_version: PSF-BTA-GL v2.9.0, but it was always a switch or light (i had to change code to make it a light) but cannot find options to choose colors.

Hi Joel, in the final version, I’ve had to create a scene to set the colour and then call it from a script to first ensure the L1 (Spiderz clone) was turned on and then set the colour. Otherwise, the scene alone still left it switched off if it was already.

Weirdly, even though the scene cannot be completed without the state: ‘on’ line being included, it won’t switch the L1 on if you also set a colour, hence the script to do that first.

Scene:

- id: '123'
  name: Strip_to_blue
  entities:
    light.sonoff_1000111111:
      state: 'on'
      hs_color:
        - 240
        - 100

Script:

'12345':
#strip_on_and_to_blue:
  alias: Strip on and to blue
  mode: single
  sequence:
  - data: {}
    entity_id: light.sonoff_1000111111
    service: light.turn_on
  - scene: scene.strip_to_blue

Hope that helps, feel free to post your configs.

2 Likes

thanks for the reply!
your script and scene only turns the light on with the last color used, it seems that my controller is simply recognized as common light.

Configuration

sonoff:
  username: mymail
  password: mypass
  mode: cloud
  devices:
    1000338ffe:
      device_class: light

Scene:

- id: '1596893789424'
  name: Blue Led
  entities:
    light.sonoff_1000338ffe:
      cloud: online
      friendly_name: Sanca
      manufacturer: ABC
      model: '123'
      rssi: -26
      state: 'on'
      hs_color:
        - 240
        - 100
      supported_features: 0
      sw_version: PSF-BTA-GL v2.9.0

Script:

blue_led:
  alias: Blue Led
  mode: single
  sequence:
  - data: {}
    entity_id: light.sonoff_1000338ffe
    service: light.turn_on
  - scene: scene.blue_led

You can check if the light is being recognised correctly if there is the colour wheel option in the main interface.

Try removing everything from the entities section except for the light.xxx, state and hs_color sections.

Also, it may work as is, but the scene call in your script is blue_led and your scene is Blue Led

My configuration.yaml entry for the device is identical to yours too.

This is how the L1 has always looked from Lovelace once switched on.

1 Like

That´s was just typo pasting to the forum and editing translating to be clearer, but the code is correct on my HA.

something new, i noticed that my entity had supported _features = 0. i changed it to 19 and the color pallete appeared, but no matter what i select, cannot change color or brightness, only on_off switch.
Can you check how many supported_features do you have?

image

this is so frustating hahaha, perhaps my sonoff led controller is fake or something.

Looks like it’s not quite being seen as it should be, this is mine;

There’s 21 according to that.

thanks, unfortunetly changing those values didnt result in any change.

Hi,

if haven’t got more ideas for solution, try this:

make a script:

alias: Led strip on - blue
sequence:
  - data:
      service: light.turn_on
      entity_id: light.sonoff_1000xxxxxx
      brightness: 255
      hs_color:
        - 240
        - 100
mode: single

or make a switch:

- platform: template
   switches:  
      led_strip_blue:  
        friendly_name: blue
        turn_on:
            service: light.turn_on 
            entity_id: light.sonoff_1000xxxxxx
            data:
              brightness: 255
              hs_color:
              - 240
              - 100
        turn_off:
          service: light.turn_off
          entity_id: light.sonoff_xxxxxxxx

Hi Joel. It seems I have a similar or the same issue. Did you resolve this? And how?

1 Like

No i didn´t, apparently my L1 may be a fake. even with the “supported features” HA only turns it on or off. to control colors i use alexa or ewelink app. if i want HA to change colors i need to create a scene for the color i want, then that scene is visible to HA.

Hi Joel,

I did in the meanwhile. I have a so-called L2 (still Sonoff ) and in the integration there is a small flaw. It doesn’t see the L2 which I corrected. Just check if you have a L2 (you can see that in the Ewelink app) and I will send you the solution.

1 Like

interesting, mine doesn´t show Model… it shows FW Name Device ID and Mac address… how did you managed to insert model name?

You have this L1 in your Ewelink app or not?

No i don’t.

I need to know if it is a Sonoff controller. Otherwise there is little I can do.

i need to know too hahaha, that´s why i said it may be a fake. i don´t have “manufacturer” under device info.