Trying to get this blueprint to work. I have the automation setup based on the blueprint like this
alias: Trash Reminder
description: ""
use_blueprint:
path: balloob/trash-pick-up-reminder.yaml
input:
trash_calendar: calendar.trash_schedule
bin_put_outside_button: input_button.binsout
notify_device: a5e7cb0d9a47e2ed1ba511737b798a9c
Last night at 8pm the automation triggered, but I didn’t get a notification.
{
"trace": {
"last_step": "action/1/repeat/while/0",
"run_id": "48c9e2ff9c2957514df263c16f2d7a67",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2023-11-03T01:00:00.003053+00:00",
"finish": "2023-11-03T01:00:00.007938+00:00"
},
"domain": "automation",
"item_id": "1698883370028",
"trigger": null,
"trace": {
"trigger/0": [
{
"path": "trigger/0",
"timestamp": "2023-11-03T01:00:00.003082+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.trash_reminder",
"state": "on",
"attributes": {
"id": "1698883370028",
"last_triggered": "2023-11-01T23:56:55.145105+00:00",
"mode": "single",
"current": 0,
"friendly_name": "Trash Reminder"
},
"last_changed": "2023-11-02T13:09:01.646097+00:00",
"last_updated": "2023-11-02T13:09:01.646097+00:00",
"context": {
"id": "01HE82DH2ECXV8P961E8W3JCZC",
"parent_id": null,
"user_id": null
}
},
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "calendar",
"event": "start",
"offset": {
"__type": "<class 'datetime.timedelta'>",
"total_seconds": -14400
},
"calendar_event": {
"start": "2023-11-03T00:00:00-05:00",
"end": "2023-11-03T12:00:00-05:00",
"summary": "Trash Day",
"description": "",
"uid": "0cf69ee2-7912-11ee-a44b-0800274eaefc",
"recurrence_id": "20231103T000000",
"rrule": "FREQ=WEEKLY;BYDAY=FR",
"all_day": false
}
}
}
}
],
"action/0": [
{
"path": "action/0",
"timestamp": "2023-11-03T01:00:00.004654+00:00",
"changed_variables": {
"context": {
"id": "01HE9B3BM3E31KY2TK4CD5AFE6",
"parent_id": null,
"user_id": null
}
}
}
],
"action/1": [
{
"path": "action/1",
"timestamp": "2023-11-03T01:00:00.004741+00:00",
"changed_variables": {
"bin_put_outside_button": "input_button.binsout"
}
}
],
"action/1/repeat": [
{
"path": "action/1/repeat",
"timestamp": "2023-11-03T01:00:00.004982+00:00",
"changed_variables": {
"repeat": {
"first": true,
"index": 1
}
},
"result": {
"result": null
}
}
],
"action/1/repeat/while/0": [
{
"path": "action/1/repeat/while/0",
"timestamp": "2023-11-03T01:00:00.004995+00:00",
"error": "In 'template' condition: TypeError: '<' not supported between instances of 'NoneType' and 'datetime.datetime'"
}
]
},
"config": {
"mode": "single",
"max_exceeded": "silent",
"trigger": {
"platform": "calendar",
"event": "start",
"offset": "-4:00:00",
"entity_id": "calendar.trash_schedule"
},
"action": [
{
"variables": {
"bin_put_outside_button": "input_button.binsout"
}
},
{
"repeat": {
"while": "{{ states(bin_put_outside_button) | as_datetime < this.last_updated | as_datetime }}\n",
"sequence": [
{
"domain": "mobile_app",
"type": "notify",
"device_id": "a5e7cb0d9a47e2ed1ba511737b798a9c",
"message": "Put the trash outside",
"data": {
"actions": [
{
"action": "TRASH-DONE",
"title": "Done"
}
]
}
},
{
"wait_for_trigger": [
{
"platform": "event",
"event_type": "mobile_app_notification_action",
"event_data": {
"action": "TRASH-DONE"
}
},
{
"platform": "state",
"entity_id": "input_button.binsout"
}
],
"timeout": {
"minutes": 30
}
},
{
"if": "{{ wait.trigger.platform == \"event\" }}",
"alias": "Handle notification action",
"then": {
"service": "input_button.press",
"data": {},
"target": {
"entity_id": "input_button.binsout"
}
}
}
]
}
}
],
"id": "1698883370028",
"alias": "Trash Reminder",
"description": ""
},
"blueprint_inputs": {
"id": "1698883370028",
"alias": "Trash Reminder",
"description": "",
"use_blueprint": {
"path": "balloob/trash-pick-up-reminder.yaml",
"input": {
"trash_calendar": "calendar.trash_schedule",
"bin_put_outside_button": "input_button.binsout",
"notify_device": "a5e7cb0d9a47e2ed1ba511737b798a9c"
}
}
},
"context": {
"id": "01HE9B3BM3E31KY2TK4CD5AFE6",
"parent_id": null,
"user_id": null
}
},
"logbookEntries": [
{
"name": "Trash Reminder",
"message": "triggered",
"source": null,
"entity_id": "automation.trash_reminder",
"context_id": "01HE9B3BM3E31KY2TK4CD5AFE6",
"when": 1698973200.003131,
"domain": "automation"
}
]
}
I can provide a screenshot of the trace UI if that’s easier.