mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Updated file
ref: https://github.com/blakeblackshear/frigate/issues/373
This commit is contained in:
		
							parent
							
								
									a63ff1bb99
								
							
						
					
					
						commit
						8b9c8a2e80
					
				@ -8,45 +8,45 @@ automation:
 | 
				
			|||||||
      platform: mqtt
 | 
					      platform: mqtt
 | 
				
			||||||
      topic: frigate/events
 | 
					      topic: frigate/events
 | 
				
			||||||
    conditions: 
 | 
					    conditions: 
 | 
				
			||||||
      - "{{ trigger.payload_json["after"]["label"] == 'person' }}"
 | 
					      - "{{ trigger.payload_json['after']['label'] == 'person' }}"
 | 
				
			||||||
      - "{{ 'yard' in trigger.payload_json["after"]["entered_zones"] }}"
 | 
					      - "{{ 'yard' in trigger.payload_json['after']['entered_zones'] }}"
 | 
				
			||||||
    action:
 | 
					    action:
 | 
				
			||||||
      - service: notify.mobile_app_pixel_3
 | 
					      - service: notify.mobile_app_pixel_3
 | 
				
			||||||
        data_template:
 | 
					        data_template:
 | 
				
			||||||
          message: 'A {{trigger.payload_json["after"]["label"]}} has entered the yard.'
 | 
					          message: "A {{trigger.payload_json['after']['label']}} has entered the yard."
 | 
				
			||||||
          data:
 | 
					          data:
 | 
				
			||||||
            image: 'https://url.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}.jpg'
 | 
					            image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}.jpg"
 | 
				
			||||||
            tag: '{{trigger.payload_json["after"]["id"]}}'
 | 
					            tag: "{{trigger.payload_json['after']['id']}}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - alias: When a person leaves a zone named yard
 | 
					  - alias: When a person leaves a zone named yard
 | 
				
			||||||
    trigger:
 | 
					    trigger:
 | 
				
			||||||
      platform: mqtt
 | 
					      platform: mqtt
 | 
				
			||||||
      topic: frigate/events
 | 
					      topic: frigate/events
 | 
				
			||||||
    conditions: 
 | 
					    conditions: 
 | 
				
			||||||
      - "{{ trigger.payload_json["after"]["label"] == 'person' }}"
 | 
					      - "{{ trigger.payload_json['after']['label'] == 'person' }}"
 | 
				
			||||||
      - "{{ 'yard' in trigger.payload_json["before"]["current_zones"] }}"
 | 
					      - "{{ 'yard' in trigger.payload_json['before']['current_zones'] }}"
 | 
				
			||||||
      - "{{ not 'yard' in trigger.payload_json["after"]["current_zones"] }}"
 | 
					      - "{{ not 'yard' in trigger.payload_json['after']['current_zones'] }}"
 | 
				
			||||||
    action:
 | 
					    action:
 | 
				
			||||||
      - service: notify.mobile_app_pixel_3
 | 
					      - service: notify.mobile_app_pixel_3
 | 
				
			||||||
        data_template:
 | 
					        data_template:
 | 
				
			||||||
          message: 'A {{trigger.payload_json["after"]["label"]}} has left the yard.'
 | 
					          message: "A {{trigger.payload_json['after']['label']}} has left the yard."
 | 
				
			||||||
          data:
 | 
					          data:
 | 
				
			||||||
            image: 'https://url.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}.jpg'
 | 
					            image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}.jpg"
 | 
				
			||||||
            tag: '{{trigger.payload_json["after"]["id"]}}'
 | 
					            tag: "{{trigger.payload_json['after']['id']}}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - alias: Notify for dogs in the front with a high top score
 | 
					  - alias: Notify for dogs in the front with a high top score
 | 
				
			||||||
    trigger:
 | 
					    trigger:
 | 
				
			||||||
      platform: mqtt
 | 
					      platform: mqtt
 | 
				
			||||||
      topic: frigate/events
 | 
					      topic: frigate/events
 | 
				
			||||||
    conditions: 
 | 
					    conditions: 
 | 
				
			||||||
      - "{{ trigger.payload_json["after"]["label"] == 'dog' }}"
 | 
					      - "{{ trigger.payload_json['after']['label'] == 'dog' }}"
 | 
				
			||||||
      - "{{ trigger.payload_json["after"]["camera"] == 'front' }}"
 | 
					      - "{{ trigger.payload_json['after']['camera'] == 'front' }}"
 | 
				
			||||||
      - "{{ trigger.payload_json["after"]["top_score"] > 0.98 }}"
 | 
					      - "{{ trigger.payload_json['after']['top_score'] > 0.98 }}"
 | 
				
			||||||
    action:
 | 
					    action:
 | 
				
			||||||
      - service: notify.mobile_app_pixel_3
 | 
					      - service: notify.mobile_app_pixel_3
 | 
				
			||||||
        data_template:
 | 
					        data_template:
 | 
				
			||||||
          message: 'High confidence dog detection.'
 | 
					          message: 'High confidence dog detection.'
 | 
				
			||||||
          data:
 | 
					          data:
 | 
				
			||||||
            image: 'https://url.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}.jpg'
 | 
					            image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}.jpg"
 | 
				
			||||||
            tag: '{{trigger.payload_json["after"]["id"]}}'
 | 
					            tag: "{{trigger.payload_json['after']['id']}}"
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user