1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 13:38:04 +00:00

Fix for Snips platform update that breaks hermes api. (#21443)

This commit is contained in:
Patrick T.C
2019-02-26 21:37:01 +01:00
committed by Paulus Schoutsen
parent 29187795a8
commit dc6fd780a9
2 changed files with 17 additions and 17 deletions

View File

@@ -105,10 +105,10 @@ async def async_setup(hass, config):
_LOGGER.error('Received invalid JSON: %s', payload)
return
if (request['intent']['probability']
if (request['intent']['confidenceScore']
< config[DOMAIN].get(CONF_PROBABILITY)):
_LOGGER.warning("Intent below probaility threshold %s < %s",
request['intent']['probability'],
request['intent']['confidenceScore'],
config[DOMAIN].get(CONF_PROBABILITY))
return
@@ -130,7 +130,7 @@ async def async_setup(hass, config):
'value': slot['rawValue']}
slots['site_id'] = {'value': request.get('siteId')}
slots['session_id'] = {'value': request.get('sessionId')}
slots['probability'] = {'value': request['intent']['probability']}
slots['confidenceScore'] = {'value': request['intent']['confidenceScore']}
try:
intent_response = await intent.async_handle(