Files
automation_rs/config/config.lua
Dreaded_X 7db628709a
All checks were successful
Build and deploy / build (push) Successful in 10m56s
Build and deploy / Deploy container (push) Has been skipped
refactor: Split config
2025-10-20 05:02:19 +02:00

43 lines
1.2 KiB
Lua

local utils = require("automation:utils")
local secrets = require("automation:secrets")
local host = utils.get_hostname()
print("Lua " .. _VERSION .. " running on " .. utils.get_hostname())
---@type Config
return {
fulfillment = {
openid_url = "https://login.huizinga.dev/api/oidc",
},
mqtt = {
host = ((host == "zeus" or host == "hephaestus") and "olympus.lan.huizinga.dev") or "mosquitto",
port = 8883,
client_name = "automation-" .. host,
username = "mqtt",
password = secrets.mqtt_password,
tls = host == "zeus" or host == "hephaestus",
},
modules = {
require("config.battery"),
require("config.debug"),
require("config.hallway_automation"),
require("config.helper"),
require("config.hue_bridge"),
require("config.light"),
require("config.ntfy"),
require("config.presence"),
require("config.rooms"),
require("config.windows"),
},
-- TODO: Make this also part of the modules
schedule = {
["0 0 19 * * *"] = function()
require("config.rooms.bedroom").set_airfilter_on(true)
end,
["0 0 20 * * *"] = function()
require("config.rooms.bedroom").set_airfilter_on(false)
end,
["0 0 21 */1 * *"] = require("config.battery").notify_low_battery,
},
}