Restore recent local package updates
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
################################################################################
|
||||
# PACKAGE: View Road Announcement Router
|
||||
################################################################################
|
||||
#
|
||||
# Version: 1.4
|
||||
# Date: 2026-06-02
|
||||
# 1.7:
|
||||
# - Updated Lounge Google Home Voice to speak short_announcement only.
|
||||
# - This allows long_announcement to remain available for detailed channels
|
||||
# such as Pushover without making voice announcements too long.
|
||||
# 1.6:
|
||||
# - Updated Sony TV Lounge channel to use short_announcement only.
|
||||
# - Removed Sony TV Lounge payload suffix from message formatting.
|
||||
# 1.5: Date: 2026-06-04
|
||||
#
|
||||
# Purpose:
|
||||
# Central announcement router for general Home Assistant announcements.
|
||||
@@ -20,7 +25,7 @@
|
||||
# short_announcement: "Washing complete"
|
||||
# long_announcement: "The washing machine has finished."
|
||||
# payload: ""
|
||||
# indicator: "dry,1,15,10,2,1"
|
||||
# indicator: "wash,1,15,10,6,5,1,0"
|
||||
#
|
||||
# Available channels:
|
||||
#
|
||||
@@ -38,17 +43,16 @@
|
||||
# Uses:
|
||||
# title
|
||||
# short_announcement
|
||||
# payload
|
||||
# Message format:
|
||||
# "<short_announcement> is <payload>"
|
||||
# "<short_announcement>"
|
||||
#
|
||||
# lounge_google_home_voice:
|
||||
# Also accepts alias:
|
||||
# google_home_voice
|
||||
# Uses:
|
||||
# long_announcement
|
||||
# Fallback:
|
||||
# If long_announcement is blank, uses short_announcement and payload.
|
||||
# short_announcement
|
||||
# Notes:
|
||||
# /s prefixes are stripped before being sent to voice.
|
||||
# Quiet time:
|
||||
# Blocked by default when input_boolean.quiet_time is on.
|
||||
#
|
||||
@@ -69,7 +73,7 @@
|
||||
# Message format:
|
||||
# "<short_announcement> [<indicator>]"
|
||||
# Example:
|
||||
# "Washing complete [dry,1,15,10,2,1]"
|
||||
# "Washing complete [wash,1,15,10,6,5,1,0]"
|
||||
#
|
||||
# led_matrix_2:
|
||||
# Future channel.
|
||||
@@ -79,7 +83,7 @@
|
||||
#
|
||||
# LED matrix announcement format:
|
||||
#
|
||||
# Message text [identifier,transition_mode,speed,repeat_seconds,repeat_times,sounder_quantity]
|
||||
# Message text [identifier,transition_mode,speed,repeat_seconds,repeat_times,static_wait,sounder_quantity,sound_id]
|
||||
#
|
||||
# Example script call:
|
||||
#
|
||||
@@ -87,11 +91,11 @@
|
||||
# data:
|
||||
# channels: "led_matrix_1"
|
||||
# short_announcement: "Washing complete"
|
||||
# indicator: "dry,1,15,10,2,1"
|
||||
# indicator: "wash,1,15,10,6,5,1,0"
|
||||
#
|
||||
# Result sent to MQTT:
|
||||
#
|
||||
# Washing complete [dry,1,15,10,2,1]
|
||||
# Washing complete [wash,1,15,10,6,5,1,0]
|
||||
#
|
||||
# Indicator fields:
|
||||
#
|
||||
@@ -104,6 +108,8 @@
|
||||
# 0 = Slide up
|
||||
# 1 = Slide down
|
||||
# 2 = Pixel fall
|
||||
# 3 = Static Up, Down
|
||||
# 4 = Static Down, Up
|
||||
#
|
||||
# speed:
|
||||
# Per-message scroll delay in ms.
|
||||
@@ -118,16 +124,36 @@
|
||||
# Clamped by ESPHome from 0 to 99.
|
||||
# 0 is treated as a one-shot announcement.
|
||||
#
|
||||
# static_wait:
|
||||
# Per-message static wait time in seconds.
|
||||
# Clamped by ESPHome from 0 to 30.
|
||||
# Only affects transition modes 3 and 4.
|
||||
# Other transition modes ignore it.
|
||||
#
|
||||
# sounder_quantity:
|
||||
# Number of announcement displays that should beep first.
|
||||
# 0 means no sounder beep.
|
||||
#
|
||||
# sound_id:
|
||||
# Stored by the LED matrix ESPHome logic for future sounder logic.
|
||||
# It is not currently used by the display logic.
|
||||
#
|
||||
# Notes:
|
||||
# The announcement router does not parse, clean, or clamp the indicator
|
||||
# fields. It passes the indicator through to the LED matrix in square
|
||||
# brackets. The LED matrix ESPHome YAML handles validation and behaviour.
|
||||
#
|
||||
# The router does not intentionally trim leading spaces from
|
||||
# short_announcement for LED matrix messages. The previous invisible leading
|
||||
# space guard workaround has been removed.
|
||||
#
|
||||
# Changes:
|
||||
# 1.5:
|
||||
# - Removed LED matrix invisible leading-space guard workaround.
|
||||
# - Updated LED matrix announcement comments for the current 8-field format.
|
||||
# - Updated LED matrix transition comments for modes 0-4.
|
||||
# - Added static_wait and sound_id documentation to router comments.
|
||||
#
|
||||
# 1.4:
|
||||
# - Documented LED matrix indicator format.
|
||||
# - Clarified that LED matrix indicator validation is handled by ESPHome.
|
||||
@@ -254,8 +280,8 @@ script:
|
||||
|
||||
indicator:
|
||||
name: Indicator
|
||||
description: LED matrix indicator data in the format identifier,transition_mode,speed,repeat_seconds,repeat_times,sounder_quantity.
|
||||
example: "dry,1,15,10,2,1"
|
||||
description: LED matrix indicator data in the format identifier,transition_mode,speed,repeat_seconds,repeat_times,static_wait,sounder_quantity,sound_id.
|
||||
example: "wash,1,15,10,6,5,1,0"
|
||||
selector:
|
||||
text:
|
||||
|
||||
@@ -295,7 +321,6 @@ script:
|
||||
led_matrix_2_mqtt_topic: "viewroad-commands/ledmatrix2/announce"
|
||||
led_matrix_mqtt_qos: 0
|
||||
led_matrix_mqtt_retain: false
|
||||
led_matrix_leading_space_guard: ""
|
||||
|
||||
##########################################################################
|
||||
# RESOLVE PASSED VALUES
|
||||
@@ -381,41 +406,33 @@ script:
|
||||
ann_quiet_time_blocked_channels_normalised: >-
|
||||
{{ ',' ~ (quiet_time_blocked_channels | join(',') | lower | replace(' ', '') | replace('\n', '') | trim(',')) ~ ',' }}
|
||||
|
||||
ann_sony_tv_message: >-
|
||||
{% set short_text = ann_short_announcement | string | trim %}
|
||||
{% set payload_text = ann_payload | string | trim %}
|
||||
{% if short_text | length > 0 and payload_text | length > 0 %}
|
||||
{{ short_text }} is {{ payload_text }}
|
||||
{% elif short_text | length > 0 %}
|
||||
{{ short_text }}
|
||||
ann_short_announcement_raw: >-
|
||||
{% if short_announcement is defined %}
|
||||
{{ short_announcement }}
|
||||
{% elif Short_Announcement is defined %}
|
||||
{{ Short_Announcement }}
|
||||
{% else %}
|
||||
{{ payload_text }}
|
||||
{{ default_short_announcement }}
|
||||
{% endif %}
|
||||
|
||||
ann_short_announcement_clean: >-
|
||||
{{ ann_short_announcement_raw | string | regex_replace('^(?:/s)+', '') | trim }}
|
||||
|
||||
ann_sony_tv_message: >-
|
||||
{{ ann_short_announcement_clean }}
|
||||
|
||||
ann_voice_message: >-
|
||||
{% set long_text = ann_long_announcement | string | trim %}
|
||||
{% set short_text = ann_short_announcement | string | trim %}
|
||||
{% set payload_text = ann_payload | string | trim %}
|
||||
{% if long_text | length > 0 %}
|
||||
{{ long_text }}
|
||||
{% elif short_text | length > 0 and payload_text | length > 0 %}
|
||||
{{ short_text }} is {{ payload_text }}
|
||||
{% elif short_text | length > 0 %}
|
||||
{{ short_text }}
|
||||
{% else %}
|
||||
{{ payload_text }}
|
||||
{% endif %}
|
||||
{{ ann_short_announcement_clean }}
|
||||
|
||||
ann_led_matrix_message: >-
|
||||
{% set short_text = short_announcement if short_announcement is defined
|
||||
else Short_Announcement if Short_Announcement is defined
|
||||
else default_short_announcement %}
|
||||
{% set short_text = short_text | string %}
|
||||
{% set indicator_text = ann_indicator | string | trim %}
|
||||
{{ (led_matrix_leading_space_guard if short_text[0:1] == ' ' else '') ~ short_text ~
|
||||
(' [' ~ indicator_text ~ ']'
|
||||
if indicator_text | length > 0
|
||||
else '') }}
|
||||
ann_led_matrix_1_message: >-
|
||||
{%- set short_text = ann_short_announcement_raw -%}
|
||||
{%- set indicator_text = ann_indicator | string | trim -%}
|
||||
{{- short_text | string -}}{{ ' [' ~ indicator_text ~ ']' if indicator_text | length > 0 else '' }}
|
||||
|
||||
ann_led_matrix_2_message: >-
|
||||
{%- set short_text = ann_short_announcement_clean -%}
|
||||
{%- set indicator_text = ann_indicator | string | trim -%}
|
||||
{{- short_text | string -}}{{ ' [' ~ indicator_text ~ ']' if indicator_text | length > 0 else '' }}
|
||||
|
||||
##########################################################################
|
||||
# CHANNEL: PUSHOVER ZORRUNO
|
||||
@@ -459,6 +476,8 @@ script:
|
||||
- condition: state
|
||||
entity_id: input_boolean.announcement_channel_sony_tv_lounge
|
||||
state: "on"
|
||||
- condition: template
|
||||
value_template: "{{ ann_sony_tv_message | string | trim | length > 0 }}"
|
||||
then:
|
||||
- action: notify.sony_android_tv_lounge
|
||||
data:
|
||||
@@ -575,10 +594,10 @@ script:
|
||||
# <short_announcement> [<indicator>]
|
||||
#
|
||||
# Example payload:
|
||||
# Washing complete [dry,1,15,10,2,1]
|
||||
# Washing complete [wash,1,15,10,6,5,1,0]
|
||||
#
|
||||
# Indicator format:
|
||||
# identifier,transition_mode,speed,repeat_seconds,repeat_times,sounder_quantity
|
||||
# identifier,transition_mode,speed,repeat_seconds,repeat_times,static_wait,sounder_quantity,sound_id
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
@@ -589,12 +608,12 @@ script:
|
||||
entity_id: input_boolean.announcement_channel_led_matrix_1
|
||||
state: "on"
|
||||
- condition: template
|
||||
value_template: "{{ ann_led_matrix_message | string | trim | length > 0 }}"
|
||||
value_template: "{{ ann_led_matrix_1_message | string | trim | length > 0 }}"
|
||||
then:
|
||||
- action: mqtt.publish
|
||||
data:
|
||||
topic: "{{ led_matrix_1_mqtt_topic }}"
|
||||
payload: "{{ ann_led_matrix_message }}"
|
||||
payload: "{{ ann_led_matrix_1_message }}"
|
||||
qos: "{{ led_matrix_mqtt_qos | int(0) }}"
|
||||
retain: "{{ led_matrix_mqtt_retain | bool(false) }}"
|
||||
|
||||
@@ -615,7 +634,7 @@ script:
|
||||
# <short_announcement> [<indicator>]
|
||||
#
|
||||
# Indicator format:
|
||||
# identifier,transition_mode,speed,repeat_seconds,repeat_times,sounder_quantity
|
||||
# identifier,transition_mode,speed,repeat_seconds,repeat_times,static_wait,sounder_quantity,sound_id
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
@@ -626,11 +645,11 @@ script:
|
||||
entity_id: input_boolean.announcement_channel_led_matrix_2
|
||||
state: "on"
|
||||
- condition: template
|
||||
value_template: "{{ ann_led_matrix_message | string | trim | length > 0 }}"
|
||||
value_template: "{{ ann_led_matrix_2_message | string | trim | length > 0 }}"
|
||||
then:
|
||||
- action: mqtt.publish
|
||||
data:
|
||||
topic: "{{ led_matrix_2_mqtt_topic }}"
|
||||
payload: "{{ ann_led_matrix_message }}"
|
||||
payload: "{{ ann_led_matrix_2_message }}"
|
||||
qos: "{{ led_matrix_mqtt_qos | int(0) }}"
|
||||
retain: "{{ led_matrix_mqtt_retain | bool(false) }}"
|
||||
|
||||
Reference in New Issue
Block a user