- Copy thư mục
custom_components/maika_assistant
vào<your config dir>/custom_components/maika_assistant
<config directory>/
|-- custom_components/
| |-- maika_assistant/
| |-- __init__.py
| |-- connection.py
| |-- const.py
| |-- manifest.json
| |-- etc...
-
Kiểm tra phiên bản Hass hiện tại và kiểm tra version maika_assistant hiện tại.
-
Chọn version gần bằng nhau nhất. VD version Hass hiện tại của bạn là 2022.8.2 và version maika_assistant là 2022.8.0 hãy dùng phiên bản maika_assistant mới nhất là 2022.8.0 bằng cách dùng lệnh
git checkout 2022.8.0
trong thư mục git maika_assistant. -
Restart Home Assistant để cập nhật component maika_assistant
-
Mở app Maika chọn tính năng smart home và thực hiện account linking:
Quản lý tài khoản liên kết
->Kết Nối Tài Khoản Mới
-> trong mụcChọn nhà cung cấp
, chọnHome Assistant
-
Trước khi bấm nút
Next
vui lòng copyKey
như hình trên và chép vàoapi_key
trong fileconfiguration.yaml
của Home Assistant như config bên dưới, sau đó restart Home Assistant để cập nhật config -
url: có thể là localhost hoặc ip: http://localhost:8123 (hãy thử với trường hợp này trước), http://192.168.1.99:8123, https://192.168.1.99:8123.
-
*** Lưu ý sau khi bấm
Next
nếu ở màn hình login xuất hiện lỗi400 bad request
hãy thêm confighttp
như bên dưới, thực hiện lại bướcliên kết tài khoản
và lấy key mới nhất.
maika_assistant:
project_id: "MAIKA"
url: http://localhost:8123
api_key: ac4d03d06de629a465a7fc53b7c1c734e04c3c729b3673e6326c0f354b49423771802938ad4191318d1f4df78a8990da
report_state: true
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.0/24
- 127.0.0.1
- ::1
maika_assistant:
project_id: "MAIKA"
url: https://localhost:8123
api_key: ac4d03d06de629a465a7fc53b7c1c734e04c3c729b3673e6326c0f354b49423771802938ad4191318d1f4df78a8990da
report_state: true
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.0/24
- 127.0.0.1
- ::1
- Quay lại app Maika bấm
Next
để kết thúc quá trình account linking
- Component này được viết từ google_assistant component, tham khảo config từ google_assistant bạn có thể expose domain hoặc entity theo nhu cầu.
- https://www.home-assistant.io/integrations/google_assistant
# Example configuration.yaml entry
maika_assistant:
api_key: YOUR_KEY
report_state: true
exposed_domains:
- switch
- light
entity_config:
switch.kitchen:
name: CUSTOM_NAME_FOR_MAIKA_ASSISTANT
aliases:
- BRIGHT_LIGHTS
- ENTRY_LIGHTS
light.living_room:
expose: false
room: LIVING_ROOM
This project is under the MIT license.