Skip to content

JSON API "ps" state object does not execute by automated calls #5409

@UsableLoki8221

Description

@UsableLoki8221

What happened?

The 'ps' state object in the JSON API does not work when automated (by scheduled time or by calling with other presets interacting).

To Reproduce Bug

I created a preset with {"on":true,"ps":"1~169r"} so that my instance will turn on and choose a random preset out of 169. The preset works well when I manually click on the preset to activate it. However, when this preset is scheduled in the 'time-controlled presets' in the time & macros section the "ps":"1~169r" does not execute; the state of the lights stays the same even though they at least turned on.

I attempted to mitigate this and chain another preset to call the main randomizing preset and found the problem carried {"ps":"200"} --> {"on":true,"ps":"1~169r"} --> light on, but no change in active preset.
Same when I tried using the legacy API: PL=211 --> {"on":true,"ps":"1~169r"} --> light on, but no change in active preset
As well as when the "on" API was removed: {"ps":"200"} --> {"ps":"1~169r"} --> no change in active preset.

I can confirm that {"ps":"1~169r"} does work to randomly choose a preset between 1-169 when I actively tap/click this preset.

Expected Behavior

The 'ps' state object should change a preset when used in scheduling or interacting preset functions.

Install Method

Binary from WLED.me

What version of WLED?

WLED 0.15.3 (2508020)

Which microcontroller/board are you seeing the problem on?

ESP32-S3

Relevant log/trace output

Anything else?

No response

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions