From 00f35a975aa473fff3e759948dea8cdacc8b3a99 Mon Sep 17 00:00:00 2001 From: thor0215 <50240409+thor0215@users.noreply.github.com> Date: Thu, 3 Oct 2024 07:16:20 -0500 Subject: [PATCH] Update HAINTEGRATION.md Made a change to BirdNET-Go Events Sensor. The sensor will now work if you have other triggers defined for other sensors not related to Birdnet --- birdnet-go/HAINTEGRATION.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/birdnet-go/HAINTEGRATION.md b/birdnet-go/HAINTEGRATION.md index e58562e2a..be6e3d06f 100644 --- a/birdnet-go/HAINTEGRATION.md +++ b/birdnet-go/HAINTEGRATION.md @@ -87,6 +87,7 @@ Then create a new template sensor using the configuration below. - trigger: - platform: mqtt topic: "birdnet" + id: birdnet - platform: time at: "00:00:00" id: reset @@ -96,14 +97,14 @@ Then create a new template sensor using the configuration below. state: > {% if trigger.id == 'reset' %} {{ now() }} - {% else %} + {% elif trigger.id == 'birdnet' %} {{ today_at(trigger.payload_json.Time) }} {% endif %} attributes: bird_events: > {% if trigger.id == 'reset' %} {{ [] }} - {% else %} + {% elif trigger.id == 'birdnet' %} {% set time = trigger.payload_json.Time %} {% set name = trigger.payload_json.CommonName %} {% set confidence = trigger.payload_json.Confidence|round(2) * 100 ~ '%' %}