Hi,
I’m using and like the new trigger-based template sensors. Have an issue though, what happens when there are multiple triggers events occurring (for the same template sensor)? In automations you can set the trigger Mode up as “Single”, “queued”, “Parallel”, or “reset”. What it is behaviour on the template sensor when multiple trigger events occur?
Tried to run tests but could not surmise a consistent result for this situation.
For example here is my template sensor:
# AI sensor
template:
- trigger:
- platform: webhook
webhook_id: sensor_ai_data
sensor:
- name: "AI occurrence"
state: "{{ trigger.json.object | default('person') }}"
unit_of_measurement: 'object'
attributes:
image: "{{ trigger.json.image | default('DonL.png') }}"
object: "{{ trigger.json.object | default('person') }}"
area: "{{ trigger.json.area | default('home') }}"
pct: "{{ trigger.json.pct | default(100)}}"
path: "{{ trigger.json.path | default('www/images/') }}"
datewithtime: "{{ trigger.json.datewithtime | default(20210410070708) }}
So if I get many webhook “sensor_ai_data” triggers simultaneously or in really fast order; only last one gets used or ??