feat(config)!: In config devices can now also be a (table of) function(s)
This function receives the mqtt client as an argument. In the future this will be the only way to create devices that require the mqtt client.
This commit is contained in:
@@ -9,6 +9,9 @@ local FulfillmentConfig
|
||||
|
||||
---@class Config
|
||||
---@field fulfillment FulfillmentConfig
|
||||
---@field devices DeviceInterface[]?
|
||||
---@field devices Devices?
|
||||
---@field mqtt AsyncClient
|
||||
---@field schedule table<string, fun() | fun()[]>?
|
||||
local Config
|
||||
|
||||
---@alias Devices (DeviceInterface | fun(client: AsyncClient): Devices)[]
|
||||
|
||||
Reference in New Issue
Block a user