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 authored and Fabian Affolter committed 2018-09-02 00:01:11 +02:00
1 parent 2b0b431a2a
commit 3797b6b012
2 files changed
+16 -4

No files matched your search

+3
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: