Snips: Added special slot values, session_id and slotname_raw (#16185)

* Added special slot values, site_id, session_id, and slotname_raw

* Update snips.py
This commit is contained in:
Tod Schmidt 2018-09-01 18:01:11 -04:00 committed by Fabian Affolter
parent 2b0b431a2a
commit 3797b6b012
2 changed files with 16 additions and 4 deletions

View file

@ -131,7 +131,10 @@ async def async_setup(hass, config):
slots = {}
for slot in request.get('slots', []):
slots[slot['slotName']] = {'value': resolve_slot_values(slot)}
slots['{}_raw'.format(slot['slotName'])] = {
'value': slot['rawValue']}
slots['site_id'] = {'value': request.get('siteId')}
slots['session_id'] = {'value': request.get('sessionId')}
slots['probability'] = {'value': request['intent']['probability']}
try: