mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Snips - (fix) removed endSession mqtt response on error and unknown intents (#11908)
* Remove snips endSession response on unknownIntent * Removed snips_response for unknown and error.
This commit is contained in:
parent
ffe832763d
commit
27edbe5c0f
@ -106,14 +106,14 @@ def async_setup(hass, config):
|
|||||||
request['intent']['intentName'])
|
request['intent']['intentName'])
|
||||||
except intent.IntentError:
|
except intent.IntentError:
|
||||||
_LOGGER.exception("Error while handling intent: %s.", intent_type)
|
_LOGGER.exception("Error while handling intent: %s.", intent_type)
|
||||||
snips_response = "Error while handling intent"
|
|
||||||
|
|
||||||
notification = {'sessionId': request.get('sessionId', 'default'),
|
if snips_response:
|
||||||
'text': snips_response}
|
notification = {'sessionId': request.get('sessionId', 'default'),
|
||||||
|
'text': snips_response}
|
||||||
|
|
||||||
_LOGGER.debug("send_response %s", json.dumps(notification))
|
_LOGGER.debug("send_response %s", json.dumps(notification))
|
||||||
mqtt.async_publish(hass, 'hermes/dialogueManager/endSession',
|
mqtt.async_publish(hass, 'hermes/dialogueManager/endSession',
|
||||||
json.dumps(notification))
|
json.dumps(notification))
|
||||||
|
|
||||||
yield from hass.components.mqtt.async_subscribe(
|
yield from hass.components.mqtt.async_subscribe(
|
||||||
INTENT_TOPIC, message_received)
|
INTENT_TOPIC, message_received)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user