# Boolean to string

Process

Converts a boolean value to a configurable text label.

Boolean to string
V
T

# Inputs

IDAbbrevNameTypeDefaultDescription
valueVValueBOOLEANfalseBoolean value to convert to string.

# Outputs

IDAbbrevNameTypeDefaultDescription
textTTextSTRINGText label corresponding to the boolean state.

# Configuration

IDNameTypeDefaultUnitDescription
true_textTrue textSTRINGtrueText to output when the input is true.

Details:

Required
false_textFalse textSTRINGfalseText to output when the input is false.

Details:

Required

# Source Code

View Volang source
value = input::get("value")

if (value) {
    output::set("text", config::get("true_text"))
} else {
    output::set("text", config::get("false_text"))
}
Converts a boolean value to a configurable text label.