homeassistant 安装与使用

docker 集成homeassistant

创建文件夹:/usr/local/docker/homeassistant/config

```
docker run -d   --name homeassistant   --privileged   --restart=unless-stopped   -v /usr/local/docker/homeassistant/config:/config   --network=host   ghcr.io/home-assistant/home-assistant:stable
```


/usr/local/docker/homeassistant/config 为你自己docker的homeassistant工作目录

http://localhost:8123

进入网址后创建用户名密码即可使用。

hacs 插件安装

安装步骤:

1.配置

hacs下载地址:

找到最新安装包,点击下载,下载后安装到本地目录中。

https://github.com/hacs/integration/releases

1.先在 HomeAssistant 根目录中创建 www 和 custom_components 两个文件夹,我之前把 HomeAssistant 安装在了 /usr/local/docker/homeassistant/config 目录中。所以,在 config 中创建。

将最新版本解压在custom_components下重启容器

找到设置,添加集成,输入hacs。都勾选然后提交。提示你绑定github,登录github把hacs页面的验证码输入进去就绑定成功了。

更改默认地图为高德

登录高德地图

https://console.amap.com/ 

注册个人账号,选择应用管理创建新应用。
应用名称随便填写,类型就是地图
创建key 名称随意 ,服务平台webapi提交。

墨澜(高德)地图添加,hacs,三个点,Custom repositories

资源:https://github.com/dscao/gaode_maps
类型(type):integration
确定添加

hacs直接搜索高德地图,点击下载

Restart required
警告 · 由 HACS 报告
Restart of Home Assistant is required to finish download/update of 墨澜(高德)地图, click submit to restart now.


点击提交进行更新

重启后,点设置,点击设备与服务,添加集成

选择高德key,秘钥,长期令牌进行保存。

创建长期令牌

点击左下角自己用户名,点击安全。

输入创建令牌,选择名称(令牌有效期10年)

地图定位经纬度修改

点击设置,区域,标签与地点,切换低点,百度搜索自己位置的经纬度,填入进去即可。

posted @ 2023-09-27 22:34  三号小玩家  阅读(250)  评论(0)    收藏  举报
Title
三号小玩家的 Mail: 17612457115@163.com, 联系QQ: 1359720840 微信: QQ1359720840