Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting value for "Percent" effect changes preset to "unknown" #4471

Closed
1 task done
andreas-bulling opened this issue Jan 9, 2025 · 4 comments
Closed
1 task done
Labels
enhancement HomeAssistant workaround The issue contains a workaround

Comments

@andreas-bulling
Copy link

What happened?

I have created a preset "soc" that uses the effect "Percent" for part of a LED strip to show our car's state of charge. The value I set in Home Assistant using

action: select.select_option
metadata: {}
data:
  option: soc
target:
  entity_id: select.wled_kitchen2_preset

action: number.set_value
data:
  value: "{{ states('sensor.car_battery') }}"
target:
  entity_id: number.wled_kitchen2_intensity

I noticed that while the selected preset is properly shown in Home Assistant after the first command, the second command makes wled change the preset to "unknown".

I am not sure if this is a bug but it's definitely not nice, at least not for the "Percent" effect (and potentnially others) because that's exactly what this effect is supposed to do.

To Reproduce Bug

see above

Expected Behavior

The preset stays the same, even if the value/data/intensity is changed.

Install Method

Binary from WLED.me

What version of WLED?

0.15.0 build 2412100

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
@softhack007
Copy link
Collaborator

softhack007 commented Jan 9, 2025

@andreas-bulling I think that what you describe is expected behaviour.

Changing effect sliders actually means that what you see is not exactly the same as the last loaded preset, because effect options are part of a preset. @blazoncek please correct me if I'm wrong.

🤔 I still see the point that we might need to rethink our design, as some users seem to have a different idea of what a "preset" might be...

@blazoncek
Copy link
Collaborator

blazoncek commented Jan 9, 2025

Exactly. Preset is a known state (which also includes global brightness).

As such if you change effect parameters (sliders or color/palette) you are no longer using that preset. As a workaround, do not use preset but effect directly.

@blazoncek blazoncek added the workaround The issue contains a workaround label Jan 9, 2025
@andreas-bulling
Copy link
Author

andreas-bulling commented Jan 10, 2025

Thanks for the clarification/confirmation. I think, as a user, what strikes me as unexpected in this case is that - sure, a preset is a known/defined state - but if I select an effect whose purpose is exactly to be dynamic (like "Percent") then I would expect to be able to change its value (percent in this case) without "leaving" the preset.

@DedeHai
Copy link
Collaborator

DedeHai commented Jan 10, 2025

but if I select an effect whose purpose is exactly to be dynamic (like "Percent") then I would expect to be able to change its value (percent in this case) without "leaving" the preset.

you are not leaving the FX, but you are leaving the preset. those are two different things you got mixed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement HomeAssistant workaround The issue contains a workaround
Projects
None yet
Development

No branches or pull requests

4 participants