I think I had a failure of my “Randomised Light at Night” blueprint. I got it from here and thought I set it up properly because the light came on randomly the first time but then I saw that message in the Trace Timeline and I don’t believe the light went out like it should have. I’ve included the trace here in the hope that someone could take a look where I went wrong.
Thanks for any pointers.
{
"trace": {
"last_step": "condition/0",
"run_id": "c647ab9a0beb971348bbfd09f3846994",
"state": "stopped",
"script_execution": "failed_conditions",
"timestamp": {
"start": "2023-03-04T20:23:00.332674+00:00",
"finish": "2023-03-04T20:23:00.332913+00:00"
},
"domain": "automation",
"item_id": "1677936270195",
"trigger": "time pattern",
"trace": {
"trigger/0": [
{
"path": "trigger/0",
"timestamp": "2023-03-04T20:23:00.332728+00:00",
"changed_variables": {
"trigger_minutes": 5,
"random_delay_max_minutes": 23,
"this": {
"entity_id": "automation.randomised_light_at_night",
"state": "on",
"attributes": {
"last_triggered": "2023-03-04T20:20:00.332216+00:00",
"mode": "single",
"current": 1,
"id": "1677936270195",
"friendly_name": "Randomised Light at Night"
},
"last_changed": "2023-03-04T18:24:20.623343+00:00",
"last_updated": "2023-03-04T20:20:00.332290+00:00",
"context": {
"id": "01GTQ4G0PBBREXJ8DY9J4R2K92",
"parent_id": null,
"user_id": null
}
},
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "time_pattern",
"now": "2023-03-04T20:23:00.332447+00:00",
"description": "time pattern"
}
}
}
],
"condition/0": [
{
"path": "condition/0",
"timestamp": "2023-03-04T20:23:00.332755+00:00",
"result": {
"result": false,
"entities": []
}
}
]
},
"config": {
"mode": "single",
"max_exceeded": "silent",
"variables": {
"trigger_minutes": 5,
"random_delay_max_minutes": 23
},
"trigger": [
{
"platform": "time_pattern",
"minutes": "/1"
}
],
"condition": [
{
"condition": "template",
"value_template": "{{ now().minute % trigger_minutes == 0 }}"
},
{
"condition": "state",
"entity_id": "input_boolean.manual_override",
"state": "off"
},
{
"condition": "state",
"entity_id": "input_boolean.away_lighting",
"state": "on"
},
{
"condition": "numeric_state",
"entity_id": "sun.sun",
"attribute": "elevation",
"below": "-2.0"
}
],
"action": [
{
"choose": [
{
"conditions": [
{
"condition": "time",
"before": "22:30:00"
},
{
"condition": "time",
"after": "12:01:00"
}
],
"sequence": [
{
"delay": {
"minutes": "{{ range(0,random_delay_max_minutes) | random }}"
}
},
{
"choose": [
{
"conditions": [
{
"condition": "state",
"entity_id": "input_boolean.away_lighting",
"state": "on"
}
],
"sequence": [
{
"service": "homeassistant.toggle",
"target": {
"entity_id": "switch.computime_sp600_switch_2"
}
}
]
}
],
"default": []
}
]
}
],
"default": [
{
"condition": "state",
"entity_id": "switch.computime_sp600_switch_2",
"state": "on"
},
{
"delay": {
"minutes": "{{ range(0,random_delay_max_minutes) | random }}"
}
},
{
"choose": [
{
"conditions": [
{
"condition": "state",
"entity_id": "input_boolean.away_lighting",
"state": "on"
}
],
"sequence": [
{
"service": "homeassistant.turn_off",
"target": {
"entity_id": "switch.computime_sp600_switch_2"
}
}
]
}
],
"default": []
}
]
}
],
"id": "1677936270195",
"alias": "Randomised Light at Night",
"description": "Landing lighting"
},
"blueprint_inputs": {
"id": "1677936270195",
"alias": "Randomised Light at Night",
"description": "Landing lighting",
"use_blueprint": {
"path": "sOckhamSter/randomised_light_at_night.yaml",
"input": {
"target_light": "switch.computime_sp600_switch_2",
"override_switch_entity": "input_boolean.manual_override",
"away_lighting_switch_entity": "input_boolean.away_lighting",
"trigger_minutes": 5,
"random_delay_max_minutes": 23,
"lights_out_time": "22:30:00"
}
}
},
"context": {
"id": "01GTQ4NGFC4YPQDFHNPCCYS008",
"parent_id": null,
"user_id": null
}
},
"logbookEntries": []
}