various tidyups

This commit is contained in:
zorruno
2026-07-29 23:18:11 +12:00
parent adb533d6a3
commit dd13f52feb
22 changed files with 6837 additions and 4057 deletions
+15 -3
View File
@@ -1,11 +1,13 @@
#:########################################################################################:#
# Package: Vehicle Announcements
# File: vehicle_announcements.yaml
# Version: v1.0.0
# Date: 2026-07-23
# Version: v1.1.0
# Date: 2026-07-26
#
# Purpose:
# Sends vehicle arrival announcements through the View Road announcement router.
# Requires the vehicle to have been continuously away for 20 minutes before
# announcing, suppressing short Bluetooth range dropouts while parked at home.
#:########################################################################################:#
automation:
@@ -13,13 +15,23 @@ automation:
alias: "BYD Atto 3 - Arrival Announcement"
description: >
Sends a Pushover notification to the Zorruno phone when the BYD Atto 3
Bermuda tracker arrives home.
Bermuda tracker arrives home after at least 20 minutes away.
mode: single
variables:
minimum_away_minutes: 20
triggers:
- trigger: state
entity_id: device_tracker.byd_atto3_ibeacon_bur4c2a_bermuda_tracker
from: "not_home"
to: "home"
conditions:
- condition: template
value_template: >-
{% set away_started = as_timestamp(trigger.from_state.last_changed, 0) %}
{% set arrived = as_timestamp(trigger.to_state.last_changed, 0) %}
{{ away_started > 0
and arrived > away_started
and (arrived - away_started) >= (minimum_away_minutes * 60) }}
actions:
- action: script.view_road_announcement
data: