feat(config)!: Made schedule part of new modules
All checks were successful
Build and deploy / build (push) Successful in 11m57s
Build and deploy / Deploy container (push) Has been skipped

This commit is contained in:
2025-10-22 03:24:34 +02:00
parent a938f3d71b
commit 9546585440
7 changed files with 64 additions and 52 deletions

View File

@@ -56,19 +56,22 @@ function module.setup(mqtt_client)
windows.add(window)
return {
lights,
lights_relax,
air_filter,
switch,
window,
devices = {
lights,
lights_relax,
air_filter,
switch,
window,
},
schedule = {
["0 0 19 * * *"] = function()
air_filter:set_on(true)
end,
["0 0 20 * * *"] = function()
air_filter:set_on(false)
end,
},
}
end
--- @param on boolean
function module.set_airfilter_on(on)
if air_filter then
air_filter:set_on(on)
end
end
return module