I dont understand the part about the Undefined error I dont have None
{
"trace": {
"last_step": "condition/0",
"run_id": "57873ba1e511f118412fcb338b63c2ad",
"state": "stopped",
"script_execution": "failed_conditions",
"timestamp": {
"start": "2024-08-06T14:14:10.578386+00:00",
"finish": "2024-08-06T14:14:10.578694+00:00"
},
"domain": "automation",
"item_id": "1722953622884",
"trigger": "state of switch.office_fan",
"trace": {
"trigger/0": [
{
"path": "trigger/0",
"timestamp": "2024-08-06T14:14:10.578399+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.bbb",
"state": "on",
"attributes": {
"id": "1722953622884",
"last_triggered": "2024-08-06T14:12:45.572618+00:00",
"mode": "single",
"current": 0,
"friendly_name": "bbb"
},
"last_changed": "2024-08-06T14:14:04.162801+00:00",
"last_reported": "2024-08-06T14:14:04.162801+00:00",
"last_updated": "2024-08-06T14:14:04.162801+00:00",
"context": {
"id": "01J4M0ME42GY7BTA60N51YN7Y7",
"parent_id": null,
"user_id": null
}
},
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "switch.office_fan",
"from_state": {
"entity_id": "switch.office_fan",
"state": "on",
"attributes": {
"friendly_name": "Office Fan"
},
"last_changed": "2024-08-06T14:13:55.575181+00:00",
"last_reported": "2024-08-06T14:13:55.575181+00:00",
"last_updated": "2024-08-06T14:13:55.575181+00:00",
"context": {
"id": "01J4M0M5QQ0V1DAFT6EQGADEF4",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "switch.office_fan",
"state": "off",
"attributes": {
"friendly_name": "Office Fan"
},
"last_changed": "2024-08-06T14:14:10.577416+00:00",
"last_reported": "2024-08-06T14:14:10.577416+00:00",
"last_updated": "2024-08-06T14:14:10.577416+00:00",
"context": {
"id": "01J4M0MMCHC3JQT0M1TQCKEJN6",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of switch.office_fan"
}
}
}
],
"condition/0": [
{
"path": "condition/0",
"timestamp": "2024-08-06T14:14:10.578406+00:00",
"error": "In 'template' condition: UndefinedError: 'None' has no attribute 'context'"
}
]
},
"config": {
"id": "1722953622884",
"alias": "bbb",
"description": "",
"trigger": [
{
"platform": "state",
"entity_id": [
"switch.office_fan"
],
"from": null,
"to": null
}
],
"condition": [
{
"condition": "template",
"value_template": "{{ states.switch.office_fan_state.context.parent_id is none and states.state.office_fan_state.context.user_id is none }}",
"enabled": true
}
],
"action": [],
"mode": "single"
},
"blueprint_inputs": null,
"context": {
"id": "01J4M0MMCJ10ZNWJDK5FB0WV5S",
"parent_id": "01J4M0MMCHC3JQT0M1TQCKEJN6",
"user_id": null
}
},
"logbookEntries": []