Adjust speech templates for clarity and enhance powerwall automation conditions for better performance.

This commit is contained in:
Carlo Costanzo
2025-08-18 09:23:20 -04:00
parent edbb6aa608
commit 74e2042d57
11 changed files with 33 additions and 89 deletions

View File

@@ -1 +1 @@
2025.8.0 2025.8.1

View File

@@ -33,7 +33,6 @@
#Turn it off! #Turn it off!
action: action:
- service: script.garage_lights_off # C by GE Lights (https://amzn.to/30w3UWy)
- service: homeassistant.turn_off - service: homeassistant.turn_off
data: data:

View File

@@ -60,8 +60,6 @@
- delay: - delay:
minutes: 30 minutes: 30
- service: script.garage_lights_off # C by GE Lights (https://amzn.to/30w3UWy)
############################################################## ##############################################################
- alias: Shutdown Helper light - alias: Shutdown Helper light
id: 124f95f6-78ca-4c22-9348-1f3a1da2d803 id: 124f95f6-78ca-4c22-9348-1f3a1da2d803

View File

@@ -29,29 +29,3 @@ script:
entity_id: media_player.paige_room entity_id: media_player.paige_room
media_content_id: paigelighton media_content_id: paigelighton
media_content_type: routine media_content_type: routine
garage_lights_off:
alias: 'ALL Garage Lights Off'
sequence:
- service: media_player.play_media
data:
entity_id: media_player.garage
media_content_id: 'turn off c life 3'
media_content_type: custom
- delay: "00:01:30"
- service: media_player.play_media
data:
entity_id: media_player.garage
media_content_id: 'turn off c sleep 1'
media_content_type: custom
- delay: "00:01:30"
- service: media_player.play_media
data:
entity_id: media_player.garage
media_content_id: 'turn off c sleep 2'
media_content_type: custom

View File

@@ -120,7 +120,7 @@ automation:
who: "Carlo" who: "Carlo"
group: "maintenance" group: "maintenance"
- alias: 'AC Status off Announcement' - alias: 'AC Status Announcement'
id: 7812fdaf-a3f8-498b-8f07-28e977e528fe id: 7812fdaf-a3f8-498b-8f07-28e977e528fe
trigger: trigger:
- platform: state - platform: state
@@ -128,6 +128,11 @@ automation:
- climate.downstairs - climate.downstairs
- climate.upstairs - climate.upstairs
from: 'off' from: 'off'
- platform: state
entity_id:
- climate.downstairs
- climate.upstairs
to: 'off'
action: action:
- service: script.speech_engine - service: script.speech_engine
data: data:

View File

@@ -32,7 +32,7 @@ automation:
- service: script.speech_engine - service: script.speech_engine
data: data:
value1: "Attention! The fridge door has been open for more than 5 minutes. Please close the fridge door." value1: "[Tell Household the Fridge Door is Open for more than 5 minutes]"
- delay: 00:30:00 - delay: 00:30:00
- event: event_fridge_door_open - event: event_fridge_door_open

View File

@@ -269,7 +269,6 @@ automation:
DoorClosed: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}." DoorClosed: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}."
call_garage_check: 1 call_garage_check: 1
- delay: "00:10:00" - delay: "00:10:00"
- service: script.garage_lights_off
default: default:
- service: script.speech_engine - service: script.speech_engine
@@ -316,11 +315,11 @@ automation:
value1: > value1: >
"The wind speed is {{ states('sensor.pirateweather_wind_speed')|round}} miles per hour. For safety, please close the garage doors. "The wind speed is {{ states('sensor.pirateweather_wind_speed')|round}} miles per hour. For safety, please close the garage doors.
{% if is_state('cover.large_garage_door', 'open') -%} {% if is_state('cover.large_garage_door', 'open') -%}
The Large Garage Door is open Large Garage Door: open
{% endif -%} {% endif -%}
{% if is_state('cover.small_garage_door', 'open') -%} {% if is_state('cover.small_garage_door', 'open') -%}
{% if is_state('cover.large_garage_door', 'open') -%}and {% if is_state('cover.large_garage_door', 'open') -%}and
{%- endif %} The small Garage Door is open. {%- endif %} Small Garage Door: open.
{% endif %}" {% endif %}"
############################################################################## ##############################################################################
@@ -379,7 +378,7 @@ automation:
- service: script.speech_engine - service: script.speech_engine
data: data:
value1: "Check the garage doors. The Small garage is {{ states('cover.small_garage_door')}} and the large garage is {{ states('cover.large_garage_door')}} [Only mention the garage door that is open and remind us to close it for the night]" value1: "Check the garage doors. The Small garage is {{ states('cover.small_garage_door')}} and the large garage is {{ states('cover.large_garage_door')}} [Always mention the specific garage door that is currently open and remind us to close it for the night]"
- alias: 'Garage Camera on Alexa Shows' - alias: 'Garage Camera on Alexa Shows'
id: 4373df2a-77f2-4e19-be7c-46c7b27ca583 id: 4373df2a-77f2-4e19-be7c-46c7b27ca583
@@ -437,7 +436,6 @@ automation:
media_content_id: 'hide garage camera' media_content_id: 'hide garage camera'
media_content_type: custom media_content_type: custom
- service: script.garage_lights_off
- alias: 'Garage Camera on Alexa Shows' - alias: 'Garage Camera on Alexa Shows'
id: 4373df2a-77f2-4e19-be7c-46c7b27ca583 id: 4373df2a-77f2-4e19-be7c-46c7b27ca583
@@ -494,6 +492,5 @@ automation:
data: data:
media_content_id: 'hide garage camera' media_content_id: 'hide garage camera'
media_content_type: custom media_content_type: custom
- service: script.garage_lights_off

View File

@@ -1,24 +0,0 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Minecraft related stuff
#-------------------------------------------
automation:
- alias: Someone on the MC server!
id: e7cc50d1-2374-4923-8e0c-2a59ff593cf8
trigger:
- platform: state
entity_id: sensor.minecraft_players_online
action:
- service: script.notify_engine
data:
value1: >
{% if states.sensor.minecraft_players_online.state|int > 0 %}
{{ states.sensor.minecraft_players_online.state }} player(s) connected to Minecraft server
{% else %}
All players disconnected from Minecraft server
{% endif %}
title: "Minecraft Server Status"
who: 'carlo'
group: 'information'

View File

@@ -38,7 +38,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.powerwall_grid_status entity_id: binary_sensor.powerwall_grid_status
to: 'False' to: 'off'
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
@@ -102,7 +102,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.powerwall_grid_status entity_id: binary_sensor.powerwall_grid_status
to: 'False' to: 'off'
for: for:
minutes: 6 minutes: 6
@@ -130,10 +130,10 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.powerwall_grid_status entity_id: binary_sensor.powerwall_grid_status
from: 'False' from: 'off'
to: 'True' to: 'on'
for: for:
minutes: 5 minutes: 10
condition: condition:
- condition: template - condition: template
@@ -151,7 +151,7 @@ automation:
- service: climate.set_hvac_mode - service: climate.set_hvac_mode
data: data:
entity_id: climate.downstairs entity_id: climate.downstairs
hvac_mode: auto hvac_mode: cool
- service: climate.set_hvac_mode - service: climate.set_hvac_mode
data: data:
entity_id: climate.upstairs entity_id: climate.upstairs

View File

@@ -14,5 +14,4 @@ interior_off:
- switch.lr_amp - switch.lr_amp
- group.tvs - group.tvs
- service: script.paige_lights_off # C by GE Lights (https://amzn.to/30w3UWy) - service: script.paige_lights_off # C by GE Lights (https://amzn.to/30w3UWy)
- service: script.garage_lights_off # C by GE Lights (https://amzn.to/30w3UWy)
# - service: script.noon_lights_off # Noon Home Smart Lights (https://amzn.to/3fOIPx6) # - service: script.noon_lights_off # Noon Home Smart Lights (https://amzn.to/3fOIPx6)

View File

@@ -18,7 +18,7 @@
>- >-
{%- macro dark_outside() -%} {%- macro dark_outside() -%}
The sun has set. I will turn on the outside lights. [Because the sun has set, outside lights have been turned on]
{%- endmacro -%} {%- endmacro -%}
{%- macro garbage_day() -%} {%- macro garbage_day() -%}
@@ -26,7 +26,7 @@
{% if day_of_week in ['Wed', 'Sun'] %} {% if day_of_week in ['Wed', 'Sun'] %}
Today is garbage day. Today is garbage day.
{% if day_of_week == 'Wed' %} {% if day_of_week == 'Wed' %}
Both Recycling and regular Garbage goes out. Both Recycling and regular Garbage goes out.
{% endif %} {% endif %}
{% endif %} {% endif %}
{%- endmacro -%} {%- endmacro -%}
@@ -163,7 +163,7 @@
{%- macro uv() -%} {%- macro uv() -%}
{% if states.sensor.pirateweather_uv_index.state|int(9999)>= 6 %} {% if states.sensor.pirateweather_uv_index.state|int(9999)>= 6 %}
Today's UV index is {{ states.sensor.pirateweather_uv_index.state }}. UV index is {{ states.sensor.pirateweather_uv_index.state }}.
{%- for entity in states.sensor if 'pirateweather' in entity.entity_id %} {%- for entity in states.sensor if 'pirateweather' in entity.entity_id %}
{%- set state = entity.state %} {%- set state = entity.state %}
{%- set unit = entity.attributes.unit_of_measurement if 'unit_of_measurement' in entity.attributes else '' %} {%- set unit = entity.attributes.unit_of_measurement if 'unit_of_measurement' in entity.attributes else '' %}
@@ -180,13 +180,13 @@
{%- endif -%} {%- endif -%}
{%- endif %} {%- endif %}
{% endfor -%} {% endfor -%}
[Give helpful tip based on the current UV index and weather conditions] [Give a helpful suggestion based on the current UV index or weather conditions]
{% endif %} {% endif %}
{%- endmacro -%} {%- endmacro -%}
{%- macro holiday() -%} {%- macro holiday() -%}
{% if states.sensor.holiday.state != '' %} {% if states.sensor.holiday.state != '' %}
Today is {{ states.sensor.holiday.state }}. [Give an interesting fact or quote related to today] Today is {{ states.sensor.holiday.state }}.
{% endif %} {% endif %}
{%- endmacro -%} {%- endmacro -%}
@@ -197,7 +197,7 @@
{%- elif states('sensor.fathers_countdown') | int(9999)< 20 -%} {%- elif states('sensor.fathers_countdown') | int(9999)< 20 -%}
and don't forget, there are {{ states.sensor.fathers_countdown.state }} days until Fathers day! and don't forget, there are {{ states.sensor.fathers_countdown.state }} days until Fathers day!
{%- elif states('sensor.easter_countdown') | int(9999)< 15 -%} {%- elif states('sensor.easter_countdown') | int(9999)< 15 -%}
and don't forget, there are {{ states.sensor.easter_countdown.state }} days until Easter Sunday! and don't forget, there are {{ states.sensor.easter_countdown.state }} colorful days until Easter Sunday!
{%- elif states('sensor.thanksgiving_day_countdown') | int(9999)< 10 and states('sensor.thanksgiving_day_countdown') | int(9999)> 0 -%} {%- elif states('sensor.thanksgiving_day_countdown') | int(9999)< 10 and states('sensor.thanksgiving_day_countdown') | int(9999)> 0 -%}
and don't forget, there are {{ states.sensor.thanksgiving_day_countdown.state }} thankful days until Thanksgiving and don't forget, there are {{ states.sensor.thanksgiving_day_countdown.state }} thankful days until Thanksgiving
{%- elif states('sensor.thanksgiving_day_countdown') | int(9999)< 1 -%} {%- elif states('sensor.thanksgiving_day_countdown') | int(9999)< 1 -%}
@@ -220,12 +220,8 @@
{{state_attr('sensor.bear_stone_common_air_quality_index', 'description')}} {{state_attr('sensor.bear_stone_common_air_quality_index', 'description')}}
{% endmacro %} {% endmacro %}
{% macro inspirational_quote() %}
[Include an inspirational quote relevant to the day or situation at the end of the message"]
{% endmacro %}
{% macro fact_of_the_day() %} {% macro fact_of_the_day() %}
[Include a relevant fact about something that happened in the past on this day at the end of the message] [incorporate into the message a relevant fact about something that happened in the past on this day]
{% endmacro %} {% endmacro %}
{# a macro that removes all newline characters, empty spaces, and returns formatted text and replaces underscores with spaces #} {# a macro that removes all newline characters, empty spaces, and returns formatted text and replaces underscores with spaces #}
@@ -250,9 +246,9 @@
{% set day = current_date.strftime('%d') %} {% set day = current_date.strftime('%d') %}
{% set year = current_date.strftime('%Y') %} {% set year = current_date.strftime('%Y') %}
{% set time = current_date.strftime('%I:%M %p') %} {% set time = current_date.strftime('%I:%M %p') %}
Current date time: {{ month }} {{ day }}, {{ year }} {{ time }} [Current date time: {{ month }} {{ day }}, {{ year }} {{ time }}]
Resident: Location [Resident: Location:
- Carlo: - Carlo:
{%- if states('sensor.carlo_place') != 'unknown' %} {%- if states('sensor.carlo_place') != 'unknown' %}
{{ states('sensor.carlo_place') }} {{ states('sensor.carlo_place') }}
@@ -278,12 +274,10 @@
Away Away
{% endif -%} {% endif -%}
{% if range(1, 100) | random <= 25 %} {% if range(1, 100) | random <= 25 %}
and our cat Molly: Always home. Cat Molly: Always home.
{% endif %} {% endif %}
Previous broadcast: "{{ state_attr('sensor.openai_response', 'response') }}" ]
[For each person, mention their location. If the same location update has already been broadcasted, do not repeat it.] [Sensor Data:
New Information:
{% if call_no_announcement != 1 %} {% if call_no_announcement != 1 %}
{% if now().strftime('%H')|int(9999)< 12 and now().strftime('%H')|int(9999)> 6 %} {% if now().strftime('%H')|int(9999)< 12 and now().strftime('%H')|int(9999)> 6 %}
Good morning. [if there is only one person home, address them specifically] Good morning. [if there is only one person home, address them specifically]
@@ -359,7 +353,9 @@
{% endif %} {% endif %}
{# call a Random fact about the house or inspiration quote #} {# call a Random fact about the house or inspiration quote #}
{{ ([moon, uv, holiday, days_until, outside_weather, outside_weather, inspirational_quote, fact_of_the_day]|random)() }} {{ ([moon, uv, holiday, days_until, outside_weather, outside_weather, fact_of_the_day]|random)() }}
]
[Previous broadcast: "{{ state_attr('sensor.openai_response', 'response') }}" ]
{%- endmacro -%} {%- endmacro -%}
{{- cleanup(mother_of_all_macros()) -}} {{- cleanup(mother_of_all_macros()) -}}