The trace and related logbook entries say the light was turned off. But it wasn’t.
The Philips Hue app also says the light was turned off.
There are no changed variables though.
I think the first screenshot says it all, but here’s the rest, just in case.
Logbook
October 4, 2022
Bedroom 3 turned off
6:49:55 PM - 16 minutes ago
Bedroom 3 Light E turned off triggered by automation Motion Nightlight - Bedroom 3 E - Brightness triggered by state of Hall 2 Motion E Motion
6:49:55 PM - 16 minutes ago
Hall 2 Motion E Motion cleared (no motion detected)
6:49:54 PM - 16 minutes ago
Bedroom 3 turned on
6:49:45 PM - 16 minutes ago
Bedroom 3 Light E turned on triggered by automation Motion Nightlight - Bedroom 3 E - Brightness triggered by state of Hall 2 Motion E Motion
6:49:45 PM - 16 minutes ago
Motion Nightlight - Bedroom 3 E - Brightness triggered by state of Hall 2 Motion E Motion detected motion
6:49:44 PM - 16 minutes ago - Traces
Hall 2 Motion E Motion detected motion
6:49:44 PM - 16 minutes ago
Hall 2 Motion E Motion cleared (no motion detected)
6:49:40 PM - 16 minutes ago
Bedroom 3 turned off
6:49:39 PM - 16 minutes ago
Bedroom 3 Light E turned off
6:49:39 PM - 16 minutes ago
Bedroom 3 turned on
6:49:30 PM - 16 minutes ago
Bedroom 3 Light E turned on triggered by automation Motion Nightlight - Bedroom 3 E - Brightness triggered by state of Hall 2 Motion E Motion
6:49:30 PM - 16 minutes ago
Motion Nightlight - Bedroom 3 E - Brightness triggered by state of Hall 2 Motion E Motion detected motion
6:49:29 PM - 16 minutes ago - Traces
Hall 2 Motion E Motion detected motion
6:49:29 PM - 16 minutes ago
Bedroom 3 turned off
6:49:26 PM - 16 minutes ago
Bedroom 3 Light E turned off triggered by automation Motion Nightlight - Bedroom 3 E - Brightness triggered by state of Hall 2 Motion E Motion
6:49:26 PM - 16 minutes ago
Hall 2 Motion E Motion cleared (no motion detected)
6:49:25 PM - 16 minutes ago
Motion Nightlight - Bedroom 3 E - Brightness triggered by state of Hall 2 Motion E Motion detected motion
6:49:15 PM - 16 minutes ago - Traces
Hall 2 Motion E Motion detected motion
6:49:15 PM - 16 minutes ago
Bedroom 3 turned on
6:48:47 PM - 17 minutes ago
Bedroom 3 Light E turned on triggered by automation Motion Nightlight - Bedroom 3 E - Brightness triggered
6:48:47 PM - 17 minutes ago
Motion Nightlight - Bedroom 3 E - Brightness triggered triggered by service automation.trigger
6:48:46 PM - 17 minutes ago - Traces
Bedroom 3 turned off triggered by service light.turn_off
6:48:40 PM - 17 minutes ago - Dan
Bedroom 3 Light E turned off
6:48:40 PM - 17 minutes ago
Bedroom 3 Light W turned off
6:48:40 PM - 17 minutes ago
Motion Nightlight - Bedroom 3 E - Brightness turned on triggered by service automation.turn_on
6:47:48 PM - 18 minutes ago - Dan
Bedroom 3 turned on triggered by service light.turn_on
6:46:33 PM - 19 minutes ago - Dan
Bedroom 3 Light E turned on
6:46:33 PM - 19 minutes ago
Bedroom 3 Light W turned on
6:46:33 PM - 19 minutes ago
Trace 1
{
"trace": {
"last_step": "action/3",
"run_id": "2dd1eda53e429f6f4976ac77f11370dd",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2022-10-04T10:49:15.039757+00:00",
"finish": "2022-10-04T10:49:26.095150+00:00"
},
"domain": "automation",
"item_id": "1664793030227",
"trigger": "state of binary_sensor.hall_2_motion_e_motion",
"trace": {
"trigger/0": [
{
"path": "trigger/0",
"timestamp": "2022-10-04T10:49:15.039977+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.motion_nightlight_bedroom_3_e_brightness",
"state": "on",
"attributes": {
"last_triggered": "2022-10-04T10:48:46.879916+00:00",
"mode": "restart",
"current": 1,
"id": "1664793030227",
"friendly_name": "Motion Nightlight - Bedroom 3 E - Brightness"
},
"last_changed": "2022-10-04T10:47:48.617352+00:00",
"last_updated": "2022-10-04T10:48:46.880100+00:00",
"context": {
"id": "01GEH9SHGZAC25PBNH5J7FGPXR",
"parent_id": "01GEH9SHGXW2CMKN5PKDBA180H",
"user_id": null
}
},
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "off",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:38:54.059040+00:00",
"last_updated": "2022-10-04T10:38:54.059040+00:00",
"context": {
"id": "01GEH97EKBRBP3YF2B8CSKA0E4",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "on",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:15.036172+00:00",
"last_updated": "2022-10-04T10:49:15.036172+00:00",
"context": {
"id": "01GEH9TD0W691AC7EEZ2GV05ZN",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of binary_sensor.hall_2_motion_e_motion"
}
}
}
],
"action/0": [
{
"path": "action/0",
"timestamp": "2022-10-04T10:49:15.045612+00:00",
"changed_variables": {
"context": {
"id": "01GEH9TD0Z4TB7YAG3Q6VF53G2",
"parent_id": "01GEH9TD0W691AC7EEZ2GV05ZN",
"user_id": null
}
},
"result": {
"params": {
"domain": "light",
"service": "turn_on",
"service_data": {
"brightness_pct": 50,
"entity_id": [
"light.bedroom_3_light_e"
]
},
"target": {
"entity_id": [
"light.bedroom_3_light_e"
]
}
},
"running_script": false,
"limit": 10
}
}
],
"action/1": [
{
"path": "action/1",
"timestamp": "2022-10-04T10:49:15.162891+00:00",
"result": {
"wait": {
"remaining": null,
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "on",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:15.036172+00:00",
"last_updated": "2022-10-04T10:49:15.036172+00:00",
"context": {
"id": "01GEH9TD0W691AC7EEZ2GV05ZN",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "off",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:25.042533+00:00",
"last_updated": "2022-10-04T10:49:25.042533+00:00",
"context": {
"id": "01GEH9TPSJMY85DEQ99J3680YW",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of binary_sensor.hall_2_motion_e_motion"
}
}
}
}
],
"action/2": [
{
"path": "action/2",
"timestamp": "2022-10-04T10:49:25.048002+00:00",
"changed_variables": {
"wait": {
"remaining": null,
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "on",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:15.036172+00:00",
"last_updated": "2022-10-04T10:49:15.036172+00:00",
"context": {
"id": "01GEH9TD0W691AC7EEZ2GV05ZN",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "off",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:25.042533+00:00",
"last_updated": "2022-10-04T10:49:25.042533+00:00",
"context": {
"id": "01GEH9TPSJMY85DEQ99J3680YW",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of binary_sensor.hall_2_motion_e_motion"
}
}
},
"result": {
"delay": 1,
"done": true
}
}
],
"action/3": [
{
"path": "action/3",
"timestamp": "2022-10-04T10:49:26.050057+00:00",
"result": {
"params": {
"domain": "light",
"service": "turn_off",
"service_data": {},
"target": {
"entity_id": [
"light.bedroom_3_light_e"
]
}
},
"running_script": false,
"limit": 10
}
}
]
},
"config": {
"mode": "restart",
"max_exceeded": "silent",
"trigger": {
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from": "off",
"to": "on"
},
"action": [
{
"alias": "Turn on the light",
"service": "light.turn_on",
"data": {
"brightness_pct": 50
},
"target": {
"entity_id": "light.bedroom_3_light_e"
}
},
{
"alias": "Wait until there is no motion from device",
"wait_for_trigger": {
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from": "on",
"to": "off"
}
},
{
"alias": "Wait the number of seconds that has been set",
"delay": 1
},
{
"alias": "Turn off the light",
"service": "light.turn_off",
"target": {
"entity_id": "light.bedroom_3_light_e"
}
}
],
"id": "1664793030227",
"alias": "Motion Nightlight - Bedroom 3 E - Brightness",
"description": "Motion Nightlight - Bedroom 3 E - Brightness"
},
"blueprint_inputs": {
"id": "1664793030227",
"alias": "Motion Nightlight - Bedroom 3 E - Brightness",
"description": "Motion Nightlight - Bedroom 3 E - Brightness",
"use_blueprint": {
"path": "homeassistant/motion_light_brightness.yaml",
"input": {
"light_target": {
"entity_id": "light.bedroom_3_light_e"
},
"motion_entity": "binary_sensor.hall_2_motion_e_motion",
"light_brightness": 50,
"no_motion_wait": 1
}
}
},
"context": {
"id": "01GEH9TD0Z4TB7YAG3Q6VF53G2",
"parent_id": "01GEH9TD0W691AC7EEZ2GV05ZN",
"user_id": null
}
},
"logbookEntries": [
{
"name": "Motion Nightlight - Bedroom 3 E - Brightness",
"message": "triggered by state of binary_sensor.hall_2_motion_e_motion",
"source": "state of binary_sensor.hall_2_motion_e_motion",
"entity_id": "automation.motion_nightlight_bedroom_3_e_brightness",
"context_id": "01GEH9TD0Z4TB7YAG3Q6VF53G2",
"when": 1664880555.041579,
"domain": "automation"
},
{
"when": 1664880566.118277,
"state": "off",
"entity_id": "light.bedroom_3_light_e",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "Motion Nightlight - Bedroom 3 E - Brightness",
"context_message": "triggered by state of binary_sensor.hall_2_motion_e_motion",
"context_source": "state of binary_sensor.hall_2_motion_e_motion",
"context_entity_id": "automation.motion_nightlight_bedroom_3_e_brightness"
}
]
}
Trace 2
{
"trace": {
"last_step": "action/3",
"run_id": "ecaf53f94cf9f53ec86a84a3716f422c",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2022-10-04T10:49:29.983855+00:00",
"finish": "2022-10-04T10:49:41.176190+00:00"
},
"domain": "automation",
"item_id": "1664793030227",
"trigger": "state of binary_sensor.hall_2_motion_e_motion",
"trace": {
"trigger/0": [
{
"path": "trigger/0",
"timestamp": "2022-10-04T10:49:29.984046+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.motion_nightlight_bedroom_3_e_brightness",
"state": "on",
"attributes": {
"last_triggered": "2022-10-04T10:49:15.041661+00:00",
"mode": "restart",
"current": 0,
"id": "1664793030227",
"friendly_name": "Motion Nightlight - Bedroom 3 E - Brightness"
},
"last_changed": "2022-10-04T10:47:48.617352+00:00",
"last_updated": "2022-10-04T10:49:26.091039+00:00",
"context": {
"id": "01GEH9TQTBK59CSSMWQX65T796",
"parent_id": null,
"user_id": null
}
},
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "off",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:25.042533+00:00",
"last_updated": "2022-10-04T10:49:25.042533+00:00",
"context": {
"id": "01GEH9TPSJMY85DEQ99J3680YW",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "on",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:29.975522+00:00",
"last_updated": "2022-10-04T10:49:29.975522+00:00",
"context": {
"id": "01GEH9TVKQVAV5X386X2V5RWHP",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of binary_sensor.hall_2_motion_e_motion"
}
}
}
],
"action/0": [
{
"path": "action/0",
"timestamp": "2022-10-04T10:49:29.989481+00:00",
"changed_variables": {
"context": {
"id": "01GEH9TVKZR1E3NWWFCBR2V4N8",
"parent_id": "01GEH9TVKQVAV5X386X2V5RWHP",
"user_id": null
}
},
"result": {
"params": {
"domain": "light",
"service": "turn_on",
"service_data": {
"brightness_pct": 50,
"entity_id": [
"light.bedroom_3_light_e"
]
},
"target": {
"entity_id": [
"light.bedroom_3_light_e"
]
}
},
"running_script": false,
"limit": 10
}
}
],
"action/1": [
{
"path": "action/1",
"timestamp": "2022-10-04T10:49:30.033546+00:00",
"result": {
"wait": {
"remaining": null,
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "on",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:29.975522+00:00",
"last_updated": "2022-10-04T10:49:29.975522+00:00",
"context": {
"id": "01GEH9TVKQVAV5X386X2V5RWHP",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "off",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:40.132316+00:00",
"last_updated": "2022-10-04T10:49:40.132316+00:00",
"context": {
"id": "01GEH9V5H4CRY2BGEDQGCRDKRC",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of binary_sensor.hall_2_motion_e_motion"
}
}
}
}
],
"action/2": [
{
"path": "action/2",
"timestamp": "2022-10-04T10:49:40.139536+00:00",
"changed_variables": {
"wait": {
"remaining": null,
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "on",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:29.975522+00:00",
"last_updated": "2022-10-04T10:49:29.975522+00:00",
"context": {
"id": "01GEH9TVKQVAV5X386X2V5RWHP",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"state": "off",
"attributes": {
"motion_valid": true,
"device_class": "motion",
"friendly_name": "Hall 2 Motion E Motion"
},
"last_changed": "2022-10-04T10:49:40.132316+00:00",
"last_updated": "2022-10-04T10:49:40.132316+00:00",
"context": {
"id": "01GEH9V5H4CRY2BGEDQGCRDKRC",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of binary_sensor.hall_2_motion_e_motion"
}
}
},
"result": {
"delay": 1,
"done": true
}
}
],
"action/3": [
{
"path": "action/3",
"timestamp": "2022-10-04T10:49:41.142159+00:00",
"result": {
"params": {
"domain": "light",
"service": "turn_off",
"service_data": {},
"target": {
"entity_id": [
"light.bedroom_3_light_e"
]
}
},
"running_script": false,
"limit": 10
}
}
]
},
"config": {
"mode": "restart",
"max_exceeded": "silent",
"trigger": {
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from": "off",
"to": "on"
},
"action": [
{
"alias": "Turn on the light",
"service": "light.turn_on",
"data": {
"brightness_pct": 50
},
"target": {
"entity_id": "light.bedroom_3_light_e"
}
},
{
"alias": "Wait until there is no motion from device",
"wait_for_trigger": {
"platform": "state",
"entity_id": "binary_sensor.hall_2_motion_e_motion",
"from": "on",
"to": "off"
}
},
{
"alias": "Wait the number of seconds that has been set",
"delay": 1
},
{
"alias": "Turn off the light",
"service": "light.turn_off",
"target": {
"entity_id": "light.bedroom_3_light_e"
}
}
],
"id": "1664793030227",
"alias": "Motion Nightlight - Bedroom 3 E - Brightness",
"description": "Motion Nightlight - Bedroom 3 E - Brightness"
},
"blueprint_inputs": {
"id": "1664793030227",
"alias": "Motion Nightlight - Bedroom 3 E - Brightness",
"description": "Motion Nightlight - Bedroom 3 E - Brightness",
"use_blueprint": {
"path": "homeassistant/motion_light_brightness.yaml",
"input": {
"light_target": {
"entity_id": "light.bedroom_3_light_e"
},
"motion_entity": "binary_sensor.hall_2_motion_e_motion",
"light_brightness": 50,
"no_motion_wait": 1
}
}
},
"context": {
"id": "01GEH9TVKZR1E3NWWFCBR2V4N8",
"parent_id": "01GEH9TVKQVAV5X386X2V5RWHP",
"user_id": null
}
},
"logbookEntries": [
{
"name": "Motion Nightlight - Bedroom 3 E - Brightness",
"message": "triggered by state of binary_sensor.hall_2_motion_e_motion",
"source": "state of binary_sensor.hall_2_motion_e_motion",
"entity_id": "automation.motion_nightlight_bedroom_3_e_brightness",
"context_id": "01GEH9TVKZR1E3NWWFCBR2V4N8",
"when": 1664880569.984293,
"domain": "automation"
},
{
"when": 1664880570.988883,
"state": "on",
"entity_id": "light.bedroom_3_light_e",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "Motion Nightlight - Bedroom 3 E - Brightness",
"context_message": "triggered by state of binary_sensor.hall_2_motion_e_motion",
"context_source": "state of binary_sensor.hall_2_motion_e_motion",
"context_entity_id": "automation.motion_nightlight_bedroom_3_e_brightness"
}
]
}