Files
automation_rs/config/ntfy.lua
Dreaded_X 8b4ea06957
Some checks are pending
Build and deploy / build (push) Waiting to run
Build and deploy / Deploy container (push) Blocked by required conditions
refactor: Split config
2025-10-20 05:00:10 +02:00

33 lines
543 B
Lua

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