refactor: Split config
Some checks failed
Build and deploy / Deploy container (push) Blocked by required conditions
Build and deploy / build (push) Has been cancelled

This commit is contained in:
2025-10-20 04:39:12 +02:00
parent 956f818a3b
commit bb554b2c31
20 changed files with 1083 additions and 756 deletions

32
config/ntfy.lua Normal file
View File

@@ -0,0 +1,32 @@
local devices = require("automation:devices")
local secrets = require("automation:secrets")
local module = {}
local ntfy_topic = secrets.ntfy_topic
if ntfy_topic == nil then
error("Ntfy topic is not specified")
end
--- @type Ntfy?
local ntfy = nil
--- @param notification Notification
function module.send_notification(notification)
if ntfy then
ntfy:send_notification(notification)
end
end
--- @type SetupFunction
function module.setup()
ntfy = devices.Ntfy.new({
topic = ntfy_topic,
})
return {
ntfy,
}
end
return module