From 83e455add29863605b19f191d2e54bfaa4db7da9 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Mon, 3 Jun 2024 19:15:01 +0000 Subject: [PATCH] More AI updates #1368 --- config/.HA_VERSION | 2 +- config/automation/Speech/announcements.yaml | 2 -- config/group/switches.yaml | 1 + config/packages/finance.yaml | 4 +++- config/script/speech_processing.yaml | 2 +- config/templates/speech/briefing.yaml | 11 ++++++++--- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/config/.HA_VERSION b/config/.HA_VERSION index 78ed4971..39bb5734 100755 --- a/config/.HA_VERSION +++ b/config/.HA_VERSION @@ -1 +1 @@ -2024.5.4 \ No newline at end of file +2024.5.5 \ No newline at end of file diff --git a/config/automation/Speech/announcements.yaml b/config/automation/Speech/announcements.yaml index ff2af631..8b6517eb 100755 --- a/config/automation/Speech/announcements.yaml +++ b/config/automation/Speech/announcements.yaml @@ -36,8 +36,6 @@ - delay: '00:01:00' - service: script.speech_engine data: -# {% set person = state_attr(trigger.entity_id, "friendly_name")%} This is another way to do it. -# {% set person = trigger.entity_id.split('.')[1]|replace('_', ' ')%} personarriving: > {% set person = expand('group.arriving')|map(attribute='name')|join(' and ') %} {% set peoplecount = expand('group.arriving') | count %} diff --git a/config/group/switches.yaml b/config/group/switches.yaml index 601df72d..8c3dfb02 100755 --- a/config/group/switches.yaml +++ b/config/group/switches.yaml @@ -14,6 +14,7 @@ Interior Switches: - switch.living_room_tv_outlet - switch.office_lamp_switch_socket - switch.front_office_window + - switch.front_office_window_led Kitchen Accents: entities: diff --git a/config/packages/finance.yaml b/config/packages/finance.yaml index cdf71ed5..60b62abc 100755 --- a/config/packages/finance.yaml +++ b/config/packages/finance.yaml @@ -10,5 +10,7 @@ yahoofinance: hours: 4 symbols: - TSLA - - VMW + - APPL - AMZN + - MSFT + diff --git a/config/script/speech_processing.yaml b/config/script/speech_processing.yaml index f6ba6763..3152de4b 100755 --- a/config/script/speech_processing.yaml +++ b/config/script/speech_processing.yaml @@ -36,7 +36,7 @@ speech_processing: state: 'off' - condition: time after: '08:00:00' - before: '20:00:00' + before: '21:30:00' - condition: state entity_id: input_boolean.alert_mode state: 'on' diff --git a/config/templates/speech/briefing.yaml b/config/templates/speech/briefing.yaml index bb419601..099728ae 100755 --- a/config/templates/speech/briefing.yaml +++ b/config/templates/speech/briefing.yaml @@ -17,6 +17,7 @@ {% else %} Today is Paige's day to do the chores. {% endif %} + [Only mention chores if today is garbage day or if this is the only information point you have] {%- endmacro -%} {%- macro inside_weather() -%} @@ -114,7 +115,7 @@ {%- macro iss() -%} {% if is_state('binary_sensor.iss', 'on') -%} - The international space station is above us now and there are {{ states.binary_sensor.iss.attributes['number_of_people_in_space'] }} people in space right now. [Add an additional ISS fact at the end] + The international space station is above us now and there are {{ states.binary_sensor.iss.attributes['number_of_people_in_space'] }} people in space right now. [include an ISS fact at the end] {% endif -%} {%- endmacro -%} @@ -164,7 +165,11 @@ {%- endmacro -%} {% macro inspirational_quote() %} - [Give a fact or inspirational quote relevant to the day or situation at the end of the message with the phrase and one more thing.] + [Include an inspirational quote relevant to the day or situation at the end of the message. "] + {% endmacro %} + + {% macro fact_of_the_day() %} + [Include a fact about something that happened in the past on this day at the end of the message] {% endmacro %} {# a macro that removes all newline characters, empty spaces, and returns formatted text and replaces underscores with spaces #} @@ -251,7 +256,7 @@ {% endif %} {# call a Random fact about the house or inspiration quote #} - {{ ([iss, moon, uv, holiday, days_until, outside_weather, outside_weather, inspirational_quote]|random)() }} + {{ ([iss, moon, uv, holiday, days_until, outside_weather, outside_weather, inspirational_quote, fact_of_the_day]|random)() }} {%- endmacro -%} {{- cleanup(mother_of_all_macros()) -}}