Add automatic startup of HomeAssistant

作者: shaneZhang 分类: IOT物联网 发布时间: 2020-09-29 10:12
➜  ~ which hass
/usr/local/bin/hass
sudo vim /etc/systemd/system/home-assistant@zhangyuqing.service

➜  ~ cat /etc/systemd/system/home-assistant@zhangyuqing.service
[Unit]
Description=Home Assistant
After=network-online.target
 
[Service]
Type=simple
User=%i
ExecStart=/usr/local/bin/hass -c "/home/zhangyuqing/.homeassistant"
 
[Install]
WantedBy=multi-user.target
sudo systemctl --system daemon-reload
sudo systemctl enable home-assistant@zhangyuqing.service
sudo systemctl start home-assistant@zhangyuqing.service

如果觉得我的文章对您有用,请随意打赏。如果有其他问题请联系博主QQ(909491009)或者下方留言!

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注