Sonoff L1 - colour control in a scene not working

Tags: #<Tag:0x00007f73aceaa700>

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.

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.