Read hostname from env

This commit is contained in:
2026-08-21 13:18:12 +03:00
parent e50a505a13
commit b5574e7436
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -65,8 +65,9 @@ runController bus (Controller name machine _enabled) = do
defaultMain :: IO ()
defaultMain = withSocketsDo $ withBus $ \bus -> do
token <- getEnv "HA_TOKEN"
host <- getEnv "HA_HOST"
let workers =
[ ("reader", readerAction "last-resort-redux" 8123 token bus)
[ ("reader", readerAction host 8123 token bus)
, ("writer", writerAction bus)
] ++ [ (name, runController bus c) | c@(Controller name _ True) <- controllers ]
as <- mapM (\(name, act) -> async (supervised name defaultBackoff act)) workers