I've notice that almost all the skills can't repeat themselves and you have to say the invocation phrase every time you need to use a functionality, so my question is: how do I stop this from happening?
Creating an intent that allows the skill to repeat itself but Its' not working
class GetWeatherIntentHandler(AbstractRequestHandler):
def can_handle(self, handler_input):
return is_intent_name("GetWeatherIntent")(handler_input)
def handle(self, handler_input):
city = handler_input.request_envelope.request.intent.slots['city'].value
current_weather = cons_clima(city)
speak_output = f"The weather in {city} is {current_weather}."
return (
handler_input.response_builder
.speak(speak_output)
.ask("Would you like to know the weather of another city?")
.response
)
This is currently not possible,however, you could launch a skill via a Routine. Alexa routines are an easy way for Alexa to perform a series of actions at the same time, in a certain order. A routine can be triggered from a custom utterance or something else, like an alarm going off. Please check the following blog post for further details: https://developer.amazon.com/en-US/blogs/alexa/alexa-skills-kit/2019/10/tell-your-customers-they-can-now-invoke-your-skill-from-routines
Also, I would suggest to post it as a feature request on the UserVoice portal for Alexa over here: https://alexa.uservoice.com/forums/906892-alexa-skills-developer-voice-and-vote