So I still haven’t been successful yet when an object goes across my camera to fire off my automation.
I see the mqtt event in the broker.
I want a person to fire my automation in the ‘back_alley’ zone
Here is an actual payload event from ‘back_alley’ zone with a ‘car’
Message 138 received on frigate/back_alley/car at 1:29 PM:
{
"before": {
"id": "1648491933.623164-y1o3n6",
"camera": "backyard",
"frame_time": 1648492121.764699,
"snapshot_time": 1648492121.764699,
"label": "car",
"top_score": 0.6171875,
"false_positive": false,
"start_time": 1648491933.623164,
"end_time": null,
"score": 0.55859375,
"box": [
301,
39,
751,
324
],
"area": 128250,
"region": [
0,
0,
1756,
1756
],
"stationary": false,
"motionless_count": 1,
"position_changes": 1,
"current_zones": [
"back_alley"
],
"entered_zones": [
"back_alley"
],
"has_clip": true,
"has_snapshot": true
},
"after": {
"id": "1648491933.623164-y1o3n6",
"camera": "backyard",
"frame_time": 1648492121.764699,
"snapshot_time": 1648492121.764699,
"label": "car",
"top_score": 0.6171875,
"false_positive": false,
"start_time": 1648491933.623164,
"end_time": 1648492139.709166,
"score": 0.55859375,
"box": [
301,
39,
751,
324
],
"area": 128250,
"region": [
0,
0,
1756,
1756
],
"stationary": false,
"motionless_count": 1,
"position_changes": 1,
"current_zones": [
"back_alley"
],
"entered_zones": [
"back_alley"
],
"has_clip": true,
"has_snapshot": true
},
"type": "end"
}
Now for setting up the automation:
trigger:
- platform: mqtt
topic: frigate/back_alley/car
condition:
- condition: template
value_template: '{{ trigger.payload_json.before.label == "person" }}'
What I am unsure about is the Value Template.
How to I add multiple conditions? and do I have the right idea of how I am doing this??
am I suppose to use ‘before.label == car’ then before.current_zones == back_alley
BUT current_zones is a list so how do i specify that in this?