Tweak conversation/intent/shopping list (#8636)
This commit is contained in:
1 parent
ad7370e1c2
commit
c2828bac2c
4 files changed
+18
-7
No files matched your search
@@ -151,7 +151,7 @@ def _process(hass, text):
|
||||
if not entity_ids:
|
||||
_LOGGER.error(
|
||||
"Could not find entity id %s from text %s", name, text)
|
||||
return
|
||||
return None
|
||||
|
||||
if command == 'on':
|
||||
yield from hass.services.async_call(
|
||||
@@ -169,6 +169,8 @@ def _process(hass, text):
|
||||
_LOGGER.error('Got unsupported command %s from text %s',
|
||||
command, text)
|
||||
|
||||
return None
|
||||
|
||||
|
||||
class ConversationProcessView(http.HomeAssistantView):
|
||||
"""View to retrieve shopping list content."""
|
||||
@@ -194,4 +196,8 @@ class ConversationProcessView(http.HomeAssistantView):
|
||||
|
||||
intent_result = yield from _process(hass, text)
|
||||
|
||||
if intent_result is None:
|
||||
intent_result = intent.IntentResponse()
|
||||
intent_result.async_set_speech("Sorry, I didn't understand that")
|
||||
|
||||
return self.json(intent_result)
|
||||
Reference in new issue
Block a user