Sorry if this is a little long, but you asked… 
I have a sensor in my office chair that tracks when my fat butt sits down, so when I FIRST sit down each morning (I have a boolean that activates when the automation runs and then resets at 5 am each day), my office voice assistant asks if I would like to hear my daily briefing.
If I say “yes”, it will call a script that plays my daily briefing, pauses long enough for the briefing to finish, and then, using assist_satellite.ask_question
, it will ask if there’s anything else I need.
If I say “yes” to that, using assist_satellite.start_conversation
, it asks what it can do for me.
If I answer “no” to the first question about the briefing, it just tells me I can ask for it whenever I am ready, and then asks if there is anything else I need.
If I answer “no” to the second question, it exits gracefully and tells me let it know when it can help.
If anyone sees something that could be improved, please feel free to speak up. I am always open to constructive criticism.
Automation:
alias: First Sitdown
description: Automation for when I first sit down in my office chair each day
triggers:
- trigger: state
entity_id:
- binary_sensor.office_chair
to: "on"
from: "off"
conditions:
- condition: state
entity_id: input_boolean.first_sitdown
state: "off"
actions:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.first_sitdown
- action: assist_satellite.ask_question
metadata: {}
data:
question: Hello Glenn. Would you like your daily briefing now?
preannounce: true
answers:
- id: "yes"
sentences:
- Sure
- Please
- Yes [please]
- Definitly
- ok
- id: "no"
sentences:
- No [thank you]
- not now
entity_id: assist_satellite.boom_box_satellite_assist_satellite
response_variable: answer
- choose:
- conditions:
- condition: template
value_template: "{{ answer.id == 'yes' }}"
sequence:
- action: script.turn_on
metadata: {}
data: {}
target:
entity_id: script.office_briefing
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
default:
- action: assist_satellite.announce
metadata: {}
data:
message: Sounds good. Just ask when you are ready for it.
preannounce: false
target:
entity_id: assist_satellite.boom_box_satellite_assist_satellite
- action: assist_satellite.ask_question
metadata: {}
data:
question: Is there anything else I can do for you?
preannounce: false
entity_id: assist_satellite.boom_box_satellite_assist_satellite
answers:
- id: "yes"
sentences:
- yes [please]
- id: "no"
sentences:
- no [thanks] [thank you]
- not now
target:
entity_id: assist_satellite.boom_box_satellite_assist_satellite
response_variable: answer2
- choose:
- conditions:
- condition: template
value_template: "{{ answer2.id == 'yes' }}"
sequence:
- action: assist_satellite.start_conversation
metadata: {}
data:
start_message: What can I do for you?
preannounce: false
target:
entity_id: assist_satellite.boom_box_satellite_assist_satellite
default:
- action: assist_satellite.announce
metadata: {}
data:
message: Just let me know when I can help.
preannounce: true
target:
entity_id: assist_satellite.boom_box_satellite_assist_satellite
mode: single
Daily Briefing Script:
sequence:
- variables:
weather_entity: weather.pirateweather
zone_entity: zone.home
calendar_duration:
hours: 18
prompt: >-
Please generate text for a notification that will be sent to the users
smartphone with helpful information.
You are a helpful personal agent that generates text for the user:
- Your answers are helpful, friendly, warm, insightful and should not
include emojis. Also, your answer is intended to be converted to
speech, so should be formatted in a manner to be spoken aloud.
- Your answers are not technical, and do not include Home Assistant
internal details such as entities in responses.
- Your messages help the user prepare for their day, for example:
- Making note of unusual weather for the location and time of year (but not mundane details like "0% chance of precipitation")
- Tell me about my agenda for the day. If there are no events scheduled for the day, assume my
day is open and adjust accordingly. Do not make up events for my agenda.
- Anything that may be special or unique, such as celebrating a birthday
- If today is Sunday, include that the Trash bin needs to be filled.
- If today is Wednesday, include that the Recycle and Lawn Waste bins need to be ready.
- alias: Fetch Weather Forecast
data:
type: hourly
target:
entity_id:
- "{{ weather_entity }}"
response_variable: daily_forecast
action: weather.get_forecasts
- variables:
forecast_entity: "{{ daily_forecast[weather_entity] }}"
forecast: "{{ forecast_entity.forecast[0] }}"
- alias: Fetch Calendar Agenda
target:
entity_id: |
{% set calendars =
[
"calendar.mom",
"calendar.work",
"calendar.family_calendar",
"calendar.home"
]
%} {% for calendar in calendars %}
{{ calendar }}{%- if not loop.last %},
{%- endif %}
{% endfor %}
data:
start_date_time: "{{ today_at('1:00') }}"
duration:
hours: 24
response_variable: agenda
action: calendar.get_events
- variables:
events: |
{% set pattern = '[a-zA-Z\d!@#$%&*-].*' %}
{% for calendar in agenda %}
{% for event in agenda[calendar]["events"] %}
{{ event.start }} - {{ event.end }} : {{ event.summary | regex_findall_index(pattern) }}|
{%- endfor %}
{%- endfor %}
- alias: Conversation Agent Notification Text
data:
text: >-
I am male. My name is Glenn. The time is {{ now() }}. Only use 12-hour
time format.
{%- if weather_entity is defined %}
{%- set temperature_unit = state_attr(weather_entity, 'temperature_unit')
-%}
Forecast: {{ forecast.condition }} ({{ forecast.temperature }}{{
temperature_unit }}, {{ forecast.precipitation }}% precipitation)
{%- endif %}
Tell me my agenda for the day in chronological order.
The following are my activities for the day: {{
events }} (If no activities are listed above, assume my day is open and
adjust accordingly; do not make stuff up for my agenda.)
{{ prompt }}
agent_id: conversation.chatgpt
response_variable: agent
action: conversation.process
- data:
message: "{{ agent.response.speech.plain.speech }}"
preannounce: false
action: assist_satellite.announce
target:
entity_id: assist_satellite.boom_box_satellite_assist_satellite
alias: Office Briefing
description: ""