Skip to content

Instantly share code, notes, and snippets.

@SchBenedikt
Last active February 17, 2025 13:34
Show Gist options
  • Save SchBenedikt/59963b62cdfae3eddf746e3148270dd8 to your computer and use it in GitHub Desktop.
Save SchBenedikt/59963b62cdfae3eddf746e3148270dd8 to your computer and use it in GitHub Desktop.
Agent 1 English
blueprint:
name: Agent 1
description: |-
Your personal, helpful Agent 1 โœจ
Iโ€™m here to support you with your daily routines and make sure youโ€™re perfectly prepared to start your day! ๐Ÿ’ช๐ŸŒž
๐ŸŒฆ๏ธ **Weather:** Iโ€™ll keep you updated on the current weather so you can dress appropriately.
๐Ÿ“… **Calendar:** Iโ€™ll inform you about your upcoming appointments and important events so you donโ€™t miss anything.
๐ŸŽ‰ **Special Occasions:** From birthdays to anniversaries โ€“ Iโ€™ll remind you of moments worth celebrating!
With helpful tips and motivational messages, Iโ€™ll ensure you start your day positively and productively. ๐Ÿš€๐Ÿ’ผ
domain: automation
input:
notify_time:
name: Notification Time
description: The time at which the notification will be triggered.
selector:
time: {}
default: 06:15:00
notify_service:
name: Notification Service Name
description: ๐Ÿ“ฑ The name of the notification service to which the notification should be sent.
selector:
text: {}
default: notify.notify
notify_target:
name: Notification Target
description: ๐ŸŽฏ The target of the notification service.
selector:
text: {}
default: ""
calendar_entity:
name: Calendar
description: ๐Ÿ“… The calendar entities to use for upcoming events.
selector:
entity:
multiple: true
filter:
- domain:
- calendar
calendar_duration:
name: Calendar Event Timing
description: โฐ How many hours in advance to look for upcoming events.
selector:
duration:
default:
hours: 18
weather_entity:
name: Weather Entity
description: ๐ŸŒฆ๏ธ The weather entity to use for the weather forecast.
selector:
entity:
multiple: false
filter:
- domain:
- weather
zone_entity:
name: Location Zone
description: ๐ŸŒ„ The zone entity to use to determine the approximate location for weather information.
selector:
entity:
multiple: false
filter:
- domain:
- zone
conversation_agent:
name: Conversation Agent
description: ๐Ÿค– The AI model to use for configuring your personalized message.
selector:
conversation_agent:
prompt:
name: Conversation Agent Prompt
description: โœ๏ธ The description to provide to the AI for generating your personalized text.
selector:
text:
multiline: true
type: text
default: |-
Please generate a friendly and helpful notification for the user's smartphone.
- Your responses should always be helpful, warm, and informative.
- Avoid technical details or specific system information.
- Compose messages to motivate the user.
- Include notes on exceptional weather suitable for the season, with recommendations on what to wear today (e.g., long pants, shorts, (light) jacket, sweater).
- Mention upcoming meetings or appointments only if they exist. List events chronologically, showing the date and time.
- Do not inform about the absence of appointments.
- Highlight special occasions such as birthdays or anniversaries.
- Add emojis to make the message more engaging.
- Ensure correct grammar and meaningful sentence structure.
- Use paragraphs.
trigger:
platform: time
at: !input notify_time
action:
- variables:
weather_entity: !input weather_entity
calendar_entity: !input calendar_entity
zone_entity: !input zone_entity
calendar_duration: !input calendar_duration
prompt: !input prompt
events_responses: []
- alias: Fetch Weather Forecast
service: weather.get_forecasts
data:
type: hourly
target:
entity_id: "{{ weather_entity }}"
response_variable: daily_forecast
- variables:
forecast_entity: "{{ daily_forecast[weather_entity] }}"
forecast: "{{ forecast_entity.forecast[0] }}"
- alias: Retrieve Calendar Events for Each Calendar
action: calendar.get_events
data:
duration: !input calendar_duration
target:
entity_id: !input calendar_entity
response_variable: calendar_response
- alias: "Create Notification Text"
service: conversation.process
data:
text: |-
Time: {{ now().strftime("%A %d. %B %H:%M") }}
{%- if weather_entity is defined %}
{%- set temperature_unit = state_attr(weather_entity, 'temperature_unit') -%}
Weather Forecast: {{ forecast.condition }} ({{ forecast.temperature }}{{ temperature_unit }}, {{ forecast.precipitation }}% precipitation)
{%- endif %}
{{calendar_response}}
{{ prompt }}
agent_id: !input conversation_agent
response_variable: agent
- alias: "Send Notification"
service: !input notify_service
data:
target: !input notify_target
title: "Daily Agenda"
message: "{{ agent.response.speech.plain.speech }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment