fix: Fix issues with inner type definitions
This commit is contained in:
11
Cargo.lock
generated
11
Cargo.lock
generated
@@ -555,7 +555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
|
checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1163,17 +1163,16 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "lua_typed"
|
name = "lua_typed"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.huizinga.dev/Dreaded_X/lua_typed#f6a684291432aae2ef7109712882e7e3ed758d08"
|
source = "git+https://git.huizinga.dev/Dreaded_X/lua_typed#3d29c9dd143737c8bffe4bacae8e701de3c6ee10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"eui48",
|
"eui48",
|
||||||
"lua_typed_macro",
|
"lua_typed_macro",
|
||||||
"mlua",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lua_typed_macro"
|
name = "lua_typed_macro"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.huizinga.dev/Dreaded_X/lua_typed#f6a684291432aae2ef7109712882e7e3ed758d08"
|
source = "git+https://git.huizinga.dev/Dreaded_X/lua_typed#3d29c9dd143737c8bffe4bacae8e701de3c6ee10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"convert_case",
|
"convert_case",
|
||||||
"itertools",
|
"itertools",
|
||||||
@@ -1568,7 +1567,7 @@ dependencies = [
|
|||||||
"once_cell",
|
"once_cell",
|
||||||
"socket2",
|
"socket2",
|
||||||
"tracing",
|
"tracing",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1745,7 +1744,7 @@ dependencies = [
|
|||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys",
|
"linux-raw-sys",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ local devices
|
|||||||
---@class Action
|
---@class Action
|
||||||
---@field action
|
---@field action
|
||||||
---| "broadcast"
|
---| "broadcast"
|
||||||
---@field extras table<string, string>?
|
---@field extras (table<string, string>)?
|
||||||
---@field label string
|
---@field label string
|
||||||
---@field clear boolean?
|
---@field clear (boolean)?
|
||||||
local Action
|
local Action
|
||||||
|
|
||||||
---@class AirFilter: DeviceInterface, OnOffInterface
|
---@class AirFilter: DeviceInterface, OnOffInterface
|
||||||
@@ -20,49 +20,49 @@ function devices.AirFilter.new(config) end
|
|||||||
|
|
||||||
---@class AirFilterConfig
|
---@class AirFilterConfig
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field url string
|
---@field url string
|
||||||
local AirFilterConfig
|
local AirFilterConfig
|
||||||
|
|
||||||
---@class ConfigLightLightStateBrightness
|
---@class ConfigLightLightStateBrightness
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field callback fun(_: LightBrightness, _: LightStateBrightness) | fun(_: LightBrightness, _: LightStateBrightness)[]?
|
---@field callback (fun(_: LightBrightness, _: LightStateBrightness) | fun(_: LightBrightness, _: LightStateBrightness)[])?
|
||||||
---@field client AsyncClient?
|
---@field client (AsyncClient)?
|
||||||
local ConfigLightLightStateBrightness
|
local ConfigLightLightStateBrightness
|
||||||
|
|
||||||
---@class ConfigLightLightStateColorTemperature
|
---@class ConfigLightLightStateColorTemperature
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field callback fun(_: LightColorTemperature, _: LightStateColorTemperature) | fun(_: LightColorTemperature, _: LightStateColorTemperature)[]?
|
---@field callback (fun(_: LightColorTemperature, _: LightStateColorTemperature) | fun(_: LightColorTemperature, _: LightStateColorTemperature)[])?
|
||||||
---@field client AsyncClient?
|
---@field client (AsyncClient)?
|
||||||
local ConfigLightLightStateColorTemperature
|
local ConfigLightLightStateColorTemperature
|
||||||
|
|
||||||
---@class ConfigLightLightStateOnOff
|
---@class ConfigLightLightStateOnOff
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field callback fun(_: LightOnOff, _: LightStateOnOff) | fun(_: LightOnOff, _: LightStateOnOff)[]?
|
---@field callback (fun(_: LightOnOff, _: LightStateOnOff) | fun(_: LightOnOff, _: LightStateOnOff)[])?
|
||||||
---@field client AsyncClient?
|
---@field client (AsyncClient)?
|
||||||
local ConfigLightLightStateOnOff
|
local ConfigLightLightStateOnOff
|
||||||
|
|
||||||
---@class ConfigOutletOutletStateOnOff
|
---@class ConfigOutletOutletStateOnOff
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field outlet_type OutletType?
|
---@field outlet_type (OutletType)?
|
||||||
---@field callback fun(_: OutletOnOff, _: OutletStateOnOff) | fun(_: OutletOnOff, _: OutletStateOnOff)[]?
|
---@field callback (fun(_: OutletOnOff, _: OutletStateOnOff) | fun(_: OutletOnOff, _: OutletStateOnOff)[])?
|
||||||
---@field client AsyncClient
|
---@field client AsyncClient
|
||||||
local ConfigOutletOutletStateOnOff
|
local ConfigOutletOutletStateOnOff
|
||||||
|
|
||||||
---@class ConfigOutletOutletStatePower
|
---@class ConfigOutletOutletStatePower
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field outlet_type OutletType?
|
---@field outlet_type (OutletType)?
|
||||||
---@field callback fun(_: OutletPower, _: OutletStatePower) | fun(_: OutletPower, _: OutletStatePower)[]?
|
---@field callback (fun(_: OutletPower, _: OutletStatePower) | fun(_: OutletPower, _: OutletStatePower)[])?
|
||||||
---@field client AsyncClient
|
---@field client AsyncClient
|
||||||
local ConfigOutletOutletStatePower
|
local ConfigOutletOutletStatePower
|
||||||
|
|
||||||
@@ -75,12 +75,12 @@ function devices.ContactSensor.new(config) end
|
|||||||
|
|
||||||
---@class ContactSensorConfig
|
---@class ContactSensorConfig
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field sensor_type SensorType?
|
---@field sensor_type (SensorType)?
|
||||||
---@field callback fun(_: ContactSensor, _: boolean) | fun(_: ContactSensor, _: boolean)[]?
|
---@field callback (fun(_: ContactSensor, _: boolean) | fun(_: ContactSensor, _: boolean)[])?
|
||||||
---@field battery_callback fun(_: ContactSensor, _: number) | fun(_: ContactSensor, _: number)[]?
|
---@field battery_callback (fun(_: ContactSensor, _: number) | fun(_: ContactSensor, _: number)[])?
|
||||||
---@field client AsyncClient?
|
---@field client (AsyncClient)?
|
||||||
local ContactSensorConfig
|
local ContactSensorConfig
|
||||||
|
|
||||||
---@alias Flag
|
---@alias Flag
|
||||||
@@ -134,14 +134,14 @@ function devices.HueSwitch.new(config) end
|
|||||||
|
|
||||||
---@class HueSwitchConfig
|
---@class HueSwitchConfig
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field client AsyncClient
|
---@field client AsyncClient
|
||||||
---@field left_callback fun(_: HueSwitch) | fun(_: HueSwitch)[]?
|
---@field left_callback (fun(_: HueSwitch) | fun(_: HueSwitch)[])?
|
||||||
---@field right_callback fun(_: HueSwitch) | fun(_: HueSwitch)[]?
|
---@field right_callback (fun(_: HueSwitch) | fun(_: HueSwitch)[])?
|
||||||
---@field left_hold_callback fun(_: HueSwitch) | fun(_: HueSwitch)[]?
|
---@field left_hold_callback (fun(_: HueSwitch) | fun(_: HueSwitch)[])?
|
||||||
---@field right_hold_callback fun(_: HueSwitch) | fun(_: HueSwitch)[]?
|
---@field right_hold_callback (fun(_: HueSwitch) | fun(_: HueSwitch)[])?
|
||||||
---@field battery_callback fun(_: HueSwitch, _: number) | fun(_: HueSwitch, _: number)[]?
|
---@field battery_callback (fun(_: HueSwitch, _: number) | fun(_: HueSwitch, _: number)[])?
|
||||||
local HueSwitchConfig
|
local HueSwitchConfig
|
||||||
|
|
||||||
---@class IkeaRemote: DeviceInterface
|
---@class IkeaRemote: DeviceInterface
|
||||||
@@ -153,12 +153,12 @@ function devices.IkeaRemote.new(config) end
|
|||||||
|
|
||||||
---@class IkeaRemoteConfig
|
---@class IkeaRemoteConfig
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field single_button boolean?
|
---@field single_button (boolean)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field client AsyncClient
|
---@field client AsyncClient
|
||||||
---@field callback fun(_: IkeaRemote, _: boolean) | fun(_: IkeaRemote, _: boolean)[]?
|
---@field callback (fun(_: IkeaRemote, _: boolean) | fun(_: IkeaRemote, _: boolean)[])?
|
||||||
---@field battery_callback fun(_: IkeaRemote, _: number) | fun(_: IkeaRemote, _: number)[]?
|
---@field battery_callback (fun(_: IkeaRemote, _: number) | fun(_: IkeaRemote, _: number)[])?
|
||||||
local IkeaRemoteConfig
|
local IkeaRemoteConfig
|
||||||
|
|
||||||
---@class KasaOutlet: DeviceInterface, OnOffInterface
|
---@class KasaOutlet: DeviceInterface, OnOffInterface
|
||||||
@@ -206,7 +206,7 @@ function devices.LightSensor.new(config) end
|
|||||||
---@field topic string
|
---@field topic string
|
||||||
---@field min integer
|
---@field min integer
|
||||||
---@field max integer
|
---@field max integer
|
||||||
---@field callback fun(_: LightSensor, _: boolean) | fun(_: LightSensor, _: boolean)[]?
|
---@field callback (fun(_: LightSensor, _: boolean) | fun(_: LightSensor, _: boolean)[])?
|
||||||
---@field client AsyncClient
|
---@field client AsyncClient
|
||||||
local LightSensorConfig
|
local LightSensorConfig
|
||||||
|
|
||||||
@@ -227,10 +227,10 @@ local LightStateOnOff
|
|||||||
|
|
||||||
---@class Notification
|
---@class Notification
|
||||||
---@field title string
|
---@field title string
|
||||||
---@field message string?
|
---@field message (string)?
|
||||||
---@field tags string[]?
|
---@field tags ((string)[])?
|
||||||
---@field priority Priority?
|
---@field priority (Priority)?
|
||||||
---@field actions Action[]?
|
---@field actions ((Action)[])?
|
||||||
local Notification
|
local Notification
|
||||||
|
|
||||||
---@class Ntfy: DeviceInterface
|
---@class Ntfy: DeviceInterface
|
||||||
@@ -244,7 +244,7 @@ function devices.Ntfy.new(config) end
|
|||||||
function Ntfy:send_notification(notification) end
|
function Ntfy:send_notification(notification) end
|
||||||
|
|
||||||
---@class NtfyConfig
|
---@class NtfyConfig
|
||||||
---@field url string?
|
---@field url (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
local NtfyConfig
|
local NtfyConfig
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ function Presence:overall_presence() end
|
|||||||
|
|
||||||
---@class PresenceConfig
|
---@class PresenceConfig
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field callback fun(_: Presence, _: boolean) | fun(_: Presence, _: boolean)[]?
|
---@field callback (fun(_: Presence, _: boolean) | fun(_: Presence, _: boolean)[])?
|
||||||
---@field client AsyncClient
|
---@field client AsyncClient
|
||||||
local PresenceConfig
|
local PresenceConfig
|
||||||
|
|
||||||
@@ -321,16 +321,16 @@ function devices.Washer.new(config) end
|
|||||||
---@field identifier string
|
---@field identifier string
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field threshold number
|
---@field threshold number
|
||||||
---@field done_callback fun(_: Washer) | fun(_: Washer)[]?
|
---@field done_callback (fun(_: Washer) | fun(_: Washer)[])?
|
||||||
---@field client AsyncClient
|
---@field client AsyncClient
|
||||||
local WasherConfig
|
local WasherConfig
|
||||||
|
|
||||||
---@class WolConfig
|
---@class WolConfig
|
||||||
---@field name string
|
---@field name string
|
||||||
---@field room string?
|
---@field room (string)?
|
||||||
---@field topic string
|
---@field topic string
|
||||||
---@field mac_address string
|
---@field mac_address string
|
||||||
---@field broadcast_ip string?
|
---@field broadcast_ip (string)?
|
||||||
---@field client AsyncClient
|
---@field client AsyncClient
|
||||||
local WolConfig
|
local WolConfig
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
---@class FulfillmentConfig
|
---@class FulfillmentConfig
|
||||||
---@field openid_url string
|
---@field openid_url string
|
||||||
---@field ip string?
|
---@field ip (string)?
|
||||||
---@field port integer?
|
---@field port (integer)?
|
||||||
local FulfillmentConfig
|
local FulfillmentConfig
|
||||||
|
|
||||||
---@class Config
|
---@class Config
|
||||||
---@field fulfillment FulfillmentConfig
|
---@field fulfillment FulfillmentConfig
|
||||||
---@field modules Modules?
|
---@field modules (Modules)?
|
||||||
---@field mqtt MqttConfig
|
---@field mqtt MqttConfig
|
||||||
---@field schedule table<string, fun() | fun()[]>?
|
---@field schedule (table<string, fun() | fun()[]>)?
|
||||||
local Config
|
local Config
|
||||||
|
|
||||||
---@alias SetupFunction fun(mqtt_client: AsyncClient): SetupTable?
|
---@alias SetupFunction fun(mqtt_client: AsyncClient): SetupTable?
|
||||||
@@ -24,7 +24,7 @@ local Config
|
|||||||
---@field client_name string
|
---@field client_name string
|
||||||
---@field username string
|
---@field username string
|
||||||
---@field password string
|
---@field password string
|
||||||
---@field tls boolean?
|
---@field tls (boolean)?
|
||||||
local MqttConfig
|
local MqttConfig
|
||||||
|
|
||||||
---@class AsyncClient
|
---@class AsyncClient
|
||||||
|
|||||||
Reference in New Issue
Block a user