refactor(config)!: Moved Timeout into utils module and moved module
All checks were successful
Build and deploy / build (push) Successful in 10m43s
Build and deploy / Deploy container (push) Successful in 39s

The module is now setup in automation_lib::lua::utils.
This commit is contained in:
2025-09-10 02:02:45 +02:00
parent 1d28b43264
commit 5271e5ad81
9 changed files with 40 additions and 37 deletions

View File

@@ -259,7 +259,7 @@ device_manager:add(devices.IkeaRemote.new({
}))
local function kettle_timeout()
local timeout = Timeout.new()
local timeout = utils.Timeout.new()
return function(self, state)
if state.state and state.power < 100 then
@@ -308,7 +308,7 @@ device_manager:add(devices.IkeaRemote.new({
}))
local function off_timeout(duration)
local timeout = Timeout.new()
local timeout = utils.Timeout.new()
return function(self, state)
if state.state then
@@ -371,7 +371,7 @@ local workbench_light = devices.LightColorTemperature.new({
turn_off_when_away(workbench_light)
device_manager:add(workbench_light)
local delay_color_temp = Timeout.new()
local delay_color_temp = utils.Timeout.new()
device_manager:add(devices.IkeaRemote.new({
name = "Remote",
room = "Workbench",
@@ -424,7 +424,7 @@ device_manager:add(devices.HueSwitch.new({
}))
local hallway_light_automation = {
timeout = Timeout.new(),
timeout = utils.Timeout.new(),
forced = false,
switch_callback = function(self)
return function(_, on)
@@ -512,7 +512,7 @@ hallway_light_automation.group = {
}
local function presence(duration)
local timeout = Timeout.new()
local timeout = utils.Timeout.new()
return function(_, open)
if open then