自建服务 · 2024年10月15日 0

Home Assistant Core升级提示No such file or directory: ‘uv’

在升级至Home Assistant Core 2024.10版本后启动失败,使用journalctl -xe查看显示错误No such file or directory: 'uv'

ERROR (MainThread) [homeassistant.bootstrap] Error setting up integration frontend - received exception
Traceback (most recent call last):
……
FileNotFoundError: [Errno 2] No such file or directory: 'uv'

经检查,uv已正常安装。

为解决此问题,需要修改systemd中homeassistant的配置,加入“Environment”项:

[Unit]
Description=Home Assistant
After=network-online.target

[Service]
Type=simple
User=%i
WorkingDirectory=/home/%i/.homeassistant
ExecStart=/srv/homeassistant/bin/hass -c  "/home/%i/.homeassistant"
# 加入此行↓
Environment="PATH=/srv/homeassistant/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/homeassistant/.local/bin"
RestartForceExitStatus=100
Restart=on-failure

[Install]
WantedBy=multi-user.target

重新启动Home Assistant服务,成功升级至2024.10.2。

参考资料

心情表态
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0