I’ve been fighting with this for a while and have tired it countless different ways but not having any success.
I am just trying to set may variable using the carcount attribute from the event data.
Any help would be appreciated.
Thanks
Here is my event:
{
"event_type": "deepstack.image_processed",
"data": {
"entity_id": "image_processing.deepstack_person_detector",
"carcount": 2
},
"origin": "LOCAL",
"time_fired": "2020-09-08T16:59:14.372542+00:00",
"context": {
"id": "9fcfb5b3f1f411eaae920f673547a359",
"parent_id": null,
"user_id": null
}
}
And here is my automation:
variable:
cars_in_driveway:
value: 0
restore: true
automation:
- alias: 'Image Processed'
trigger:
- platform: event
event_type: deepstack.image_processed
action:
- service: variable.set_variable
data:
variable: cars_in_driveway
value_template: "{{ trigger.event.data.carcount }}"