#Custom Weather Intent
1 messages ยท Page 1 of 1 (latest)
@sullen copper Created a thread instead of clogging main chat
I am using the openweathermap integration, but it can be applied elsewhere, you just have to be mindful of your condition names. I convert them to nicer strings for playback-ability
ok, SUPER interesting. Do you know of any way to trigger automations based on specific responses from Assist??? Specifically I want a trigger in an automation when I get the response "Sorry I couldn't understand that".
https://community.home-assistant.io/t/voice-creating-a-new-pipeline-for-all-commands-that-result-in-sorry-i-couldnt-understand-that/648787
This may sound crazy, but I wonder if you can do a catch all type of deal. Give me a second.
No luck, what are you actually trying to do?
If you want a custom response, you can do that by setting up a _common.yaml file
No, you can't. You need to do this #voice-assistants-archived message
That would be called "pipeline chaining" or "conversation agent chaining" and it's being considered, but not available yet
Well... I can see MANY uses based on whatever a response might be. Follow on automations could abound after a response.
It certainly gets MY vote!
I just meant following up on "Sorry, i don't understand". Actual conversations are a planned feature for the default conversation agent.
Can you give an example of such a follow up automation?
I envision something like this (excuse the formatting):
alias: Sorry I couldn't understand that
description: "Pass all mis-understood stuff to Alexa"
trigger:
- platform: conversation
on_response: "Sorry I couldn't understand that"
condition: [add filters for specific first-word actions like "Play" "what", etc if needed, otherwise send all failures to Alexa]
action:
- service: media_player.play_media
target:
entity_id: media_player.kitchen_alexa
data:
media_content_type: custom
media_content_id: {{conversation__agent_input_sentence}}
documented here:
https://github.com/alandtse/alexa_media_player/wiki#run-custom-command
I started a thread on the Forums for this:
https://community.home-assistant.io/t/voice-pipeline-chaining-conversation-agent-chaining-for-any-result-in-voice/648787
Hi guys, I have 2 questions:
- I'm sorry for getting off topic. I was checking the @hallow bison 's code. Is there any documentation where I can see the syntax for intents? I mean, when do I need to use (), {, [ and others?
- Setting up the custom commands to send them to alexa described here https://github.com/alandtse/alexa_media_player/wiki#run-custom-command How can I grab my command said to nabu, to resend it to alexa with an
intent_script?
So, I do this w/ automations and sentance triggers.
description: ""
trigger:
- platform: conversation
command:
- what is the weather
- weather forecast
- weather
condition: []
action:
- service: script.Play_msg_on_Kitchen_Alexa_with_volume_set and_reset
data:
message: >-
The current weather forcast is
{{state_attr('weather.keul_daynight','forecast')[0]['detailed_description']
}}
mode: single
and the relavant part of the script it calls:
alias: Play msg on Kitchen Alexa with volume set and reset
sequence:
- service: media_player.volume_set
data:
volume_level: 0.65
target:
entity_id: media_player.kitchen_original
- service: notify.alexa_media_kitchen_original
data:
message: "{{ message }}"
As I started down this path I realized VERY quickly that this is NOT scalable. Like at all. There is too many things we do w/ our Assistants that HA Voice has no idea how to handle, and probably never will.
So this led me to asking about creating this "shim" between HA Assist and Alexa that would throw ANY command thats not recognized by HA Assist to Alexa until Voice matures more.
That's weird, mine works.
test
Sorry, I didn't want to understand that
@sullen copper that's exactly what pipeline fallback/chaining refers to. If a pipeline fails and returns an error response (for whatever reason), fall back to the next pipeline. Without analyzing if the response matches a certain sentence and all done internally. That's something that is being looked at. I've tried doing a custom integration for this, but there was too little support in the HA core
Im impatient, probably just like you guys are ๐
Regarding too many things that HA doesn't know how to handle, you have custom sentences/custom intents and sentence triggers. Both with their pitfalls, but you have them
@raw tusk How's. the weather in Romania????
"Sorry, I couldn't understand that"
That's the standard error response. What should i take from the quote?
But I'm lazy, I already have too many irons in the fire. I just want Alexa to handle what HA cant. At least for today!
I didn't want* vs couldn't
Ask 2023.12beta and it will know if you have a weather entity called Romania
Can't do screenshots in here, but using a _common file works
LOL
As I understood it, the _common file is global, so it should work no?
Oh! And what's in your _common.yaml?
What you linked earlier.
I just used the _common on from the intents repo and changed the error response.
You don't need to call anything _common.yaml
That's true.
Just need this entry:
responses:
errors:
no_intent: "Sorry, I didn't want to understand that"```
Exactly
With that, I thought I read somewhere that you can define a list or etc in the _common file and it could be referenced globally, while lists in a specific file are local
I don't think I follow. It would just affect the built-in sentences? Or do you mean via the python scripts?
I can't say for certain since i'm merely guessing what docs you've read. This is the built-in intent repo, where each language has a _common.yaml file in the sentences folder https://github.com/home-assistant/intents
I guess this is what you've read https://developers.home-assistant.io/docs/voice/intent-recognition/template-sentence-syntax
I wanted to ignore this at first, take it as merely a funny "ha ha", but my spider senses are tingling with irony. What do you mean? That it's not what you expected?
I thougt you lived in Romania...
I meant the "LOL"
I guess it's not what you expected, to have a dedicated weather entity. Which made my argument (that you can query for weather in 2023.12) laughable
you told me to install a weather entity for that... I was just making converation!
I have weather apps up the wazoo!
Ok, sorry, i thought you were sincerely dissatisfied with the fact that you have to have a dedicated weather entity to ask about the weather in HA
not at all.
Guys, thinking out loud: to achieve what you're mentioning, is it possible to create 2 input_text helpers, and through an automation triggered by an event, assign the value of the intent to one input_text, and similarly, for the VA's response in the other input_text. Then, with another automation triggered by an if condition, if the response in the second input_text is the desired one, send the text from the first one to Alexa using media_content_type: custom ?. Does it make sense?๐
The problem is capturing the data in variables. You can't go to dev tools and see an entity fill with input or response from Assist. At least that I've seen...