mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 05:34:20 +01:00
Fix encoder error on gassistant (#299)
* Update hassio_gassistant.py * Update config.json * Update CHANGELOG.md
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
## 2.1
|
||||
- Add error handling for decoding UTF-8
|
||||
|
||||
## 2.0
|
||||
- Update Google Assistant SDK 0.5.0
|
||||
- Update Google Assistant Library 1.0.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Google Assistant SDK",
|
||||
"version": "2.0",
|
||||
"version": "2.1",
|
||||
"slug": "google_assistant",
|
||||
"description": "A virtual personal assistant developed by Google",
|
||||
"url": "https://home-assistant.io/addons/google_assistant/",
|
||||
|
||||
@@ -16,7 +16,10 @@ def process_event(event):
|
||||
if event.type == EventType.ON_CONVERSATION_TURN_STARTED:
|
||||
print()
|
||||
|
||||
print(event)
|
||||
try:
|
||||
print(event)
|
||||
except UnicodeEncodeError as err:
|
||||
print("Can't print event: {}".format(err))
|
||||
|
||||
if (event.type == EventType.ON_CONVERSATION_TURN_FINISHED and event.args and not event.args['with_follow_on_turn']):
|
||||
print()
|
||||
@@ -42,7 +45,7 @@ if __name__ == '__main__':
|
||||
else:
|
||||
device_model_id = sys.argv[3]
|
||||
last_device_id = None
|
||||
|
||||
|
||||
# run assistant
|
||||
print("Run Google Assistant SDK")
|
||||
with Assistant(credentials, device_model_id) as assistant:
|
||||
|
||||
Reference in New Issue
Block a user