v21

OpenAPI 3.0.3raw.githubusercontent.com2026-08-032560235.1 KB
fppd

Preview a single If/Conditional Check leaf - the same lookup evaluate() uses internally (Variable/Expression/Time/GPIO Pin/Sun), before any comparator/Value is applied. Backs the If condition editor's "Show Current Value" button, so picking the right Value to compare against isn't guesswork.

When a "comparator" param is also supplied (the consolidated eye-preview modal's full-leaf mode), also evaluates Value the same way Value is unconditionally evaluated at runtime and applies the comparator, returning the RHS value and the boolean result too - reuses ConditionNode::PreviewLeafResult(), the exact same evaluation path a real saved leaf's evaluate() takes, so this can never drift from runtime behavior.

get/api/fppd/condition/preview

Query parameters

sourcestring

One of the If Check "Source" dropdown values (e.g. "Variable", "GPIO Pin").

namestring

The Name/Expression field for that source.

comparatorstring

Optional - one of the Check "Comparator" values. Enables full-leaf mode.

valuestring

Optional - the Value field, only used when "comparator" is also given.

notstring

Optional - "true" to negate the result, only used when "comparator" is also given.

Response

{"found": true, "value": "..."} (source/name-only mode) or