From 6f9ff86788857af6b672513877a78041bfd46dce Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 10 Oct 2021 15:50:28 -0500 Subject: [PATCH] r/homeassistant: Wait for network to start Although Home Assistant itself will start fine if the network is not yet available, some integrations will not. Notably, the Matrix integration will fail to load if it cannot contact the homeserver when it is first initialized. To avoid this problem, we can just delay starting Home Assistant until the network is available. --- roles/homeassistant/templates/homeassistant.service.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/homeassistant/templates/homeassistant.service.j2 b/roles/homeassistant/templates/homeassistant.service.j2 index febe411..4a527e7 100644 --- a/roles/homeassistant/templates/homeassistant.service.j2 +++ b/roles/homeassistant/templates/homeassistant.service.j2 @@ -1,6 +1,8 @@ # vim: set ft=systemd : [Unit] Description=Home Assistant +After=network-online.target +Wants=network-online.target [Service] Type=notify