feat(config)!: Device creation function is now named entry
All checks were successful
Build and deploy / build (push) Successful in 11m22s
Build and deploy / Deploy container (push) Has been skipped

It now has to be called 'devices', this makes it possible to just
include the table as a whole in devices and it will automatically call
the correct function.
This commit is contained in:
2025-10-20 04:08:55 +02:00
parent a0c5189ada
commit 460aba6f9d
4 changed files with 22 additions and 12 deletions

View File

@@ -14,7 +14,9 @@ local FulfillmentConfig
---@field schedule table<string, fun() | fun()[]>?
local Config
---@alias Devices (DeviceInterface | fun(client: AsyncClient): Devices)[]
---@alias DevicesFunction fun(mqtt_client: AsyncClient): DevicesInner
---@alias DevicesInner (DeviceInterface | { devices: DevicesFunction } | DevicesInner)[]
---@alias Devices DevicesFunction | DevicesInner
---@class MqttConfig
---@field host string