Neither of these work properly.
Using !input
:
"variables": {
"test": {
"__type": "<class 'homeassistant.util.yaml.objects.Input'>",
"repr": "Input(name='stopConditions')"
}
}
Full Trace
{
"trace": {
"last_step": "sequence/0",
"run_id": "9becdf00e283bb3dcfa9a22fa1533249",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2023-09-05T17:47:40.451152+00:00",
"finish": "2023-09-05T17:47:40.459880+00:00"
},
"domain": "script",
"item_id": "ztest_condition_selector_test_petro",
"trace": {
"sequence/0": [
{
"path": "sequence/0",
"timestamp": "2023-09-05T17:47:40.456382+00:00",
"changed_variables": {
"test": {
"__type": "<class 'homeassistant.util.yaml.objects.Input'>",
"repr": "Input(name='stopConditions')"
},
"this": {
"entity_id": "script.ztest_condition_selector_test_petro",
"state": "off",
"attributes": {
"last_triggered": "2023-09-05T17:45:01.900376+00:00",
"mode": "single",
"current": 0,
"friendly_name": "Condition Selector Test"
},
"last_changed": "2023-09-05T17:45:01.903529+00:00",
"last_updated": "2023-09-05T17:45:01.903529+00:00",
"context": {
"id": "01H9K75769B5H88CA9F5N636MQ",
"parent_id": null,
"user_id": "1908acd22f0c4572a08b5df66dd349b1"
}
},
"stopConditions": [
{
"condition": "state",
"entity_id": "light.behind_tv",
"state": "on"
}
],
"context": {
"id": "01H9K7A2113R04W494E51CZT3S",
"parent_id": null,
"user_id": "1908acd22f0c4572a08b5df66dd349b1"
}
},
"result": {
"stop": "Stopped the script",
"error": false
}
}
]
},
"config": {
"alias": "Condition Selector Test",
"description": "Just trying to get the condition selector to work\n",
"fields": {
"stopConditions": {
"name": "Conditions to stop the script?",
"description": "If you apply some conditions here, and if they evaluate to true, the script should stop",
"selector": {
"condition": null
},
"required": true,
"advanced": true
}
},
"mode": "single",
"variables": {
"test": {
"__type": "<class 'homeassistant.util.yaml.objects.Input'>",
"repr": "Input(name='stopConditions')"
}
},
"sequence": [
{
"stop": "Stopped the script"
}
],
"max": 10
},
"blueprint_inputs": null,
"context": {
"id": "01H9K7A2113R04W494E51CZT3S",
"parent_id": null,
"user_id": "1908acd22f0c4572a08b5df66dd349b1"
}
},
"logbookEntries": [
{
"when": 1693936060.451347,
"state": "on",
"entity_id": "script.ztest_condition_selector_test_petro",
"context_user_id": "1908acd22f0c4572a08b5df66dd349b1"
},
{
"when": 1693936060.456819,
"state": "off",
"entity_id": "script.ztest_condition_selector_test_petro",
"context_user_id": "1908acd22f0c4572a08b5df66dd349b1",
"context_state": "on",
"context_entity_id": "script.ztest_condition_selector_test_petro"
}
]
}
Using {{}}
, like a normal variable from fields
"variables": {
"test": "{{ stopConditions }}"
}
Full Trace
{ "trace": {
"last_step": "sequence/0",
"run_id": "a7016a0938e5f3470020a7aedd6a455d",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2023-09-05T19:45:59.316183+00:00",
"finish": "2023-09-05T19:45:59.324772+00:00"
},
"domain": "script",
"item_id": "ztest_condition_selector_test_petro",
"trace": {
"sequence/0": [
{
"path": "sequence/0",
"timestamp": "2023-09-05T19:45:59.322925+00:00",
"changed_variables": {
"this": {
"entity_id": "script.ztest_condition_selector_test_petro",
"state": "off",
"attributes": {
"last_triggered": "2023-09-05T19:45:52.426055+00:00",
"mode": "queued",
"current": 0,
"max": 10,
"friendly_name": "Condition Selector Test"
},
"last_changed": "2023-09-05T19:45:52.432712+00:00",
"last_updated": "2023-09-05T19:45:52.432712+00:00",
"context": {
"id": "01H9KE2FS6RJCEBCVVG0ECGK4K",
"parent_id": null,
"user_id": "1908acd22f0c4572a08b5df66dd349b1"
}
},
"stopConditions": [
{
"condition": "state",
"entity_id": "light.behind_tv",
"state": "on"
}
],
"test": [
{
"condition": "state",
"entity_id": "light.behind_tv",
"state": "on"
}
],
"context": {
"id": "01H9KE2PGJ8VVKQGH037V880VW",
"parent_id": null,
"user_id": "1908acd22f0c4572a08b5df66dd349b1"
}
},
"result": {
"stop": "Stopped the script",
"error": false
}
}
]
},
"config": {
"alias": "Condition Selector Test",
"description": "Just trying to get the condition selector to work",
"fields": {
"stopConditions": {
"name": "Conditions to stop the script?",
"description": "If you apply some conditions here, and if they evaluate to true, the script should stop",
"selector": {
"condition": null
},
"required": true,
"advanced": true
}
},
"variables": {
"test": "{{ stopConditions }}"
},
"sequence": [
{
"stop": "Stopped the script"
}
],
"mode": "queued",
"max": 10
},
"blueprint_inputs": null,
"context": {
"id": "01H9KE2PGJ8VVKQGH037V880VW",
"parent_id": null,
"user_id": "1908acd22f0c4572a08b5df66dd349b1"
}
},
"logbookEntries": [
{
"when": 1693943159.316543,
"state": "on",
"entity_id": "script.ztest_condition_selector_test_petro",
"context_user_id": "1908acd22f0c4572a08b5df66dd349b1"
},
{
"when": 1693943159.323439,
"state": "off",
"entity_id": "script.ztest_condition_selector_test_petro",
"context_user_id": "1908acd22f0c4572a08b5df66dd349b1",
"context_state": "on",
"context_entity_id": "script.ztest_condition_selector_test_petro"
}
]
}