mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 13:44:20 +01:00
Change event handling (#297)
* Update hassio_gassistant.py * Update config.json * Update CHANGELOG.md
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.5
|
||||||
|
- Change event handling
|
||||||
|
|
||||||
## 1.4
|
## 1.4
|
||||||
- Fix typo
|
- Fix typo
|
||||||
|
|
||||||
|
|||||||
@@ -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/",
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user