Skip to content

JSON APIs assigned to buttons , e.g {"ps":"1~4~"} #3204

@dosipod

Description

@dosipod

What happened?

We normally used {"ps":"14"} in a preset and that will work in ui but not when assigned to buttons it does not work only win&PL=~&P1=1&P2=4 works from both ui and when assigned to buttons.

I am not sure that is limited to the above api as assigning other api to buttons like {"on":"t"} will work . I will try to look for more if that is only limited to this

To Reproduce Bug

Add {"ps":"14"} to preset and assign to button action ( clicking on preset will work but button action will not work )
Add win&PL=~&P1=1&P2=4 to preset and assign to button action ( clicking on preset will from ui and button action )

Expected Behavior

{"ps":"14"} and win&PL=~&P1=1&P2=4 is expected to behave the same

Install Method

Self-Compiled

What version of WLED?

WLED 0.14.0-b2 (build 2305090)

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

More  more info on the same  are here  https://wled.discourse.group/t/physical-button/8289
and here https://discord.com/channels/473448917040758787/473448917543944193/1108240349115191386

The format is messed up in the post because of the use of json so when you see {"ps":"14"} it is like the picture
image

Anything else?

No response

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfixed in sourceThis issue is unsolved in the latest release but fixed in master

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions