Change event handling (#297)

* Update hassio_gassistant.py

* Update config.json

* Update CHANGELOG.md
This commit is contained in:
Pascal Vizeli
2018-05-10 13:20:06 +02:00
committed by GitHub
parent 4e4a5d4c92
commit 4521cae429
3 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
# Changelog # Changelog
## 1.5
- Change event handling
## 1.4 ## 1.4
- Fix typo - Fix typo

View File

@@ -1,6 +1,6 @@
{ {
"name": "Google Assistant", "name": "Google Assistant",
"version": "1.4", "version": "1.5",
"slug": "google_assistant", "slug": "google_assistant",
"description": "A virtual personal assistant developed by Google", "description": "A virtual personal assistant developed by Google",
"url": "https://home-assistant.io/addons/google_assistant/", "url": "https://home-assistant.io/addons/google_assistant/",

View File

@@ -43,7 +43,9 @@ if __name__ == '__main__':
# run assistant # run assistant
with Assistant(credentials, device_model_id) as assistant: with Assistant(credentials, device_model_id) as assistant:
events = assistant.start()
device_id = assistant.device_id device_id = assistant.device_id
print("device_model_id: {}".format(device_model_id)) print("device_model_id: {}".format(device_model_id))
print("device_id: {}".format(device_id)) print("device_id: {}".format(device_id))
@@ -56,5 +58,5 @@ if __name__ == '__main__':
'model_id': device_model_id, 'model_id': device_model_id,
}, dev_file) }, dev_file)
for event in assistant.start(): for event in event:
process_event(event) process_event(event)