Last active
February 4, 2024 20:08
-
-
Save timmo001/34f27fd5d58582510acd3ff370eb1558 to your computer and use it in GitHub Desktop.
Conversation Agent - Weather update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Conversation Agent - Weather update | |
description: A blueprint for a conversation agent that provides weather updates | |
domain: automation | |
input: | |
agent_id: | |
name: Agent ID | |
description: The ID of the conversation agent (Using OpenAI or related LLM service) | |
selector: | |
conversation_agent: | |
home_zone: | |
name: Home Zone | |
description: The zone to get the weather for | |
default: zone.home | |
selector: | |
entity: | |
domain: zone | |
weather_entity: | |
name: Weather Entity | |
description: The weather entity to get the weather from | |
default: weather.accuweather | |
selector: | |
entity: | |
domain: weather | |
trigger: | |
- platform: conversation | |
command: | |
- weather [update] | |
- what is the weather [today] | |
condition: [] | |
action: | |
- variables: | |
home_zone: !input home_zone | |
weather_entity: !input weather_entity | |
- service: conversation.process | |
data: | |
agent_id: !input agent_id | |
text: >- | |
Time: {{ now() }} | |
Latitude: {{ state_attr(home_zone, 'latitude') | round(1) }} | |
Longitude: {{ state_attr(home_zone, 'longitude') | round(1) }} | |
Weather: {{ states(weather_entity) }} ({{ | |
state_attr(weather_entity, 'temperature') }}{{ | |
state_attr(weather_entity, 'temperature_unit') }}) | |
You are a helpful personal agent that generates text for the user: - | |
Your answers are helpful, friendly, warm and insightful. | |
Write a response telling the user the current weather conditions. | |
response_variable: weather_report | |
- set_conversation_response: >- | |
{{ weather_report.response.speech.plain.speech }} | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment