mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Alexa: run script before generating response text (#2276)
This commit is contained in:
parent
bc78997bbd
commit
f5fc4cd97f
@ -96,6 +96,9 @@ class AlexaView(HomeAssistantView):
|
||||
card = config.get(CONF_CARD)
|
||||
action = config.get(CONF_ACTION)
|
||||
|
||||
if action is not None:
|
||||
action.run(response.variables)
|
||||
|
||||
# pylint: disable=unsubscriptable-object
|
||||
if speech is not None:
|
||||
response.add_speech(SpeechType[speech['type']], speech['text'])
|
||||
@ -104,9 +107,6 @@ class AlexaView(HomeAssistantView):
|
||||
response.add_card(CardType[card['type']], card['title'],
|
||||
card['content'])
|
||||
|
||||
if action is not None:
|
||||
action.run(response.variables)
|
||||
|
||||
return self.json(response)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user