Skip to content

Effect list returned to Home Assistant is not filtered for 2D #4364

Closed

Description

@thermseekr

What happened?

In Home Assistant, when randomly selecting an effect using a template, sometimes WLED selects Solid instead of an existing effect.

To Reproduce Bug

Paste the template below in a Render Template Node in NodeRed.

{{ state_attr('light.light_name', 'effect_list') | random }}

Connect this node to a Debug and to a Call Service nodes. Inside the Call Service node, select turn_on as the service, select the relevant entity, and paste the expression below to the Data field.

{ "effect": msg.payload }

Every time the flow is run, the name of the selected effect will be shown in the Debug window in NodeRed and will be fed to the service call. Depending on the selected effect WLED will fall back to SOLID. Looking at the effects list in WLED one can see that in these cases the randomly selected effect do not match the name of any existing effect.

Expected Behavior

The name of the effects in effect_list should match the current effect names, so WLED will never fall back to SOLID.

Install Method

Binary from WLED.me

What version of WLED?

WLED 0.14.4 Hoshi Build 2405180

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. changed the title [-]Randomly selecting an effect falls back to Solid.[/-] [+]Effect list returned to Home Assistant is not filtered for 2D[/+] on Dec 10, 2024
  2. netmindz commented on Dec 10, 2024

    @netmindz
    Member

    I'm inclined to agree that the list of effects in HA should be the same as shown in the UI, I'm not sure however if your technique of selecting effects at random is valid as I'm not familiar with NodeRed

  3. blazoncek commented on Dec 10, 2024

    @blazoncek
    Contributor

    Effect list is universal an includes all available effects.
    What is shown in UI depends on filtering selection and capabilities of current configuration. This is UI action.

  4. added
    externalNot part of WLED itself - an external plugin/remote etc.
    and removed on Dec 10, 2024
  5. thermseekr commented on Dec 11, 2024

    @thermseekr
    Author

    Sorry I'm a very basic WLED user and I was not even aware of the existance of 2D effects (oh gosh one more itch to scratch). I thought maybe the effects list in the home assistant integration was not updated to the actual effects list on WLED thus causing the problem. I'll try to check with the owner of the integration if there is something that could be done, maybe a toggle to enable/disable 2D effects reflecting what is configured in WLED, then disabling the selection of an invalid effect from the integration.

    Thans for the replies, wish you all a merry Xmas and a happy 2025.
    Tales

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    HomeAssistantexternalNot part of WLED itself - an external plugin/remote etc.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions