It happened again today. Motion was detected at 3:31pm, but I did not receive a notification until 4:55pm. The previous trigger has hours before (9:20am).
I received two notifications at this time (4:55pm), one with a snapshot and one without. Below is the trace from this trigger (I am not seeing anything that would help diagnose the problem):
{
"trace": {
"last_step": "action/2",
"run_id": "72eaed2d82c7c4949c1d963a8a4bb731",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2022-04-27T21:31:13.530833+00:00",
"finish": "2022-04-27T21:31:15.085650+00:00"
},
"domain": "automation",
"item_id": "1650331468375",
"trigger": "state of binary_sensor.doorbell_motion",
"trace": {
"trigger/0": [
{
"path": "trigger/0",
"timestamp": "2022-04-27T21:31:13.531022+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.doorbell_motion_chris_2",
"state": "on",
"attributes": {
"last_triggered": "2022-04-27T21:23:04.945318+00:00",
"mode": "single",
"current": 0,
"id": "1650331468375",
"friendly_name": "Doorbell Motion"
},
"last_changed": "2022-04-27T00:00:02.510531+00:00",
"last_updated": "2022-04-27T21:23:07.298292+00:00",
"context": {
"id": "0c58d2e58930867ae4241a0e3085aed7",
"parent_id": "7c993fa37933eff6f752e092f08465c1",
"user_id": null
}
},
"trigger": {
"id": "0",
"idx": "0",
"platform": "state",
"entity_id": "binary_sensor.doorbell_motion",
"from_state": {
"entity_id": "binary_sensor.doorbell_motion",
"state": "off",
"attributes": {
"device_class": "motion",
"friendly_name": "Doorbell Motion"
},
"last_changed": "2022-04-27T21:23:38.064974+00:00",
"last_updated": "2022-04-27T21:23:38.064974+00:00",
"context": {
"id": "7b789e400ac8908d9473dacf49da1213",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "binary_sensor.doorbell_motion",
"state": "on",
"attributes": {
"device_class": "motion",
"friendly_name": "Doorbell Motion"
},
"last_changed": "2022-04-27T21:31:13.529037+00:00",
"last_updated": "2022-04-27T21:31:13.529037+00:00",
"context": {
"id": "ee61a6faae3620fa9796b78b9a7d151f",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of binary_sensor.doorbell_motion"
}
}
}
],
"condition/0": [
{
"path": "condition/0",
"timestamp": "2022-04-27T21:31:13.531155+00:00",
"result": {
"after": {
"__type": "<class 'datetime.time'>",
"isoformat": "06:00:00"
},
"now_time": {
"__type": "<class 'datetime.time'>",
"isoformat": "15:31:13.531195"
},
"before": {
"__type": "<class 'datetime.time'>",
"isoformat": "22:00:00"
},
"result": true
}
}
],
"action/0": [
{
"path": "action/0",
"timestamp": "2022-04-27T21:31:13.532356+00:00",
"changed_variables": {
"context": {
"id": "8c19d72cc2af48893524f9c41a792fbf",
"parent_id": "ee61a6faae3620fa9796b78b9a7d151f",
"user_id": null
}
},
"result": {
"params": {
"domain": "camera",
"service": "snapshot",
"service_data": {
"filename": "/config/www/tmp/snapshot.jpg",
"entity_id": [
"camera.doorbell_cropped"
]
},
"target": {
"entity_id": [
"camera.doorbell_cropped"
]
}
},
"running_script": false,
"limit": 10
}
}
],
"action/1": [
{
"path": "action/1",
"timestamp": "2022-04-27T21:31:14.211115+00:00",
"result": {
"params": {
"domain": "notify",
"service": "mobile_app_pixel_4a",
"service_data": {
"message": "ID 838",
"title": "Motion Detected",
"data": {
"channel": "Doorbell",
"importance": "max",
"group": "human-detected",
"image": "/local/tmp/snapshot.jpg",
"ttl": 0,
"priority": "high"
}
},
"target": {}
},
"running_script": false,
"limit": 10
}
}
],
"action/2": [
{
"path": "action/2",
"timestamp": "2022-04-27T21:31:14.665126+00:00",
"result": {
"params": {
"domain": "notify",
"service": "mobile_app_pixel_3a",
"service_data": {
"message": "Front door",
"title": "Motion Detected",
"data": {
"channel": "Doorbell",
"importance": "max",
"group": "human-detected",
"image": "/local/tmp/snapshot.jpg",
"ttl": 0,
"priority": "high"
}
},
"target": {}
},
"running_script": false,
"limit": 10
}
}
]
},
"config": {
"id": "1650331468375",
"alias": "Doorbell Motion",
"description": "",
"trigger": [
{
"platform": "state",
"entity_id": "binary_sensor.doorbell_motion",
"from": "off",
"to": "on"
}
],
"condition": [
{
"condition": "time",
"before": "22:00:00",
"after": "06:00:00"
}
],
"action": [
{
"service": "camera.snapshot",
"data": {
"filename": "/config/www/tmp/snapshot.jpg"
},
"target": {
"entity_id": "camera.doorbell_cropped"
}
},
{
"service": "notify.mobile_app_pixel_4a",
"data": {
"message": "ID {{ range(1, 1000) | random }}",
"title": "Motion Detected",
"data": {
"channel": "Doorbell",
"importance": "max",
"group": "human-detected",
"image": "/local/tmp/snapshot.jpg",
"ttl": 0,
"priority": "high"
}
}
},
{
"service": "notify.mobile_app_pixel_3a",
"data": {
"message": "Front door",
"title": "Motion Detected",
"data": {
"channel": "Doorbell",
"importance": "max",
"group": "human-detected",
"image": "/local/tmp/snapshot.jpg",
"ttl": 0,
"priority": "high"
}
}
}
],
"mode": "single"
},
"blueprint_inputs": null,
"context": {
"id": "8c19d72cc2af48893524f9c41a792fbf",
"parent_id": "ee61a6faae3620fa9796b78b9a7d151f",
"user_id": null
}
},
"logbookEntries": [
{
"name": "Doorbell Motion",
"message": "has been triggered by state of binary_sensor.doorbell_motion",
"source": "state of binary_sensor.doorbell_motion",
"entity_id": "automation.doorbell_motion_chris_2",
"context_id": "8c19d72cc2af48893524f9c41a792fbf",
"when": "2022-04-27T21:31:13.531499+00:00",
"domain": "automation"
}
]
}