feat: WIP
This commit is contained in:
40
definitions/automation:devices.lua
Normal file
40
definitions/automation:devices.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
---@meta
|
||||
|
||||
local devices
|
||||
|
||||
---@class Action
|
||||
---@field action "broadcast"
|
||||
---@field extras table<string, string> | nil
|
||||
---@field label string | nil
|
||||
---@clear clear bool|nil
|
||||
|
||||
---@alias Priority
|
||||
---| "min"
|
||||
---| "low"
|
||||
---| "default"
|
||||
---| "high"
|
||||
---| "max"
|
||||
|
||||
---@class Notification
|
||||
---@field title string
|
||||
---@field message string | nil
|
||||
-- NOTE: It might be possible to specify this down to the actual possible values
|
||||
---@field tags string[] | nil
|
||||
---@field priority Priority | nil
|
||||
---@field actions Action[] | nil
|
||||
|
||||
---@class Ntfy
|
||||
local Ntfy
|
||||
---@async
|
||||
---@param notification Notification
|
||||
function Ntfy:send_notification(notification) end
|
||||
|
||||
---@class NtfyConfig
|
||||
---@field topic string
|
||||
|
||||
devices.Ntfy = {}
|
||||
---@param config NtfyConfig
|
||||
---@return Ntfy
|
||||
function devices.Ntfy.new(config) end
|
||||
|
||||
return devices
|
||||
6
definitions/automation:secrets.lua
Normal file
6
definitions/automation:secrets.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
---@meta
|
||||
|
||||
---@type table<string, string|nil>
|
||||
local secrets
|
||||
|
||||
return secrets
|
||||
27
definitions/automation:utils.lua
Normal file
27
definitions/automation:utils.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
---@meta
|
||||
|
||||
local utils
|
||||
|
||||
---@class Timeout
|
||||
local Timeout
|
||||
---@async
|
||||
---@param timeout number
|
||||
---@param callback fun()
|
||||
function Timeout:start(timeout, callback) end
|
||||
---@async
|
||||
function Timeout:cancel() end
|
||||
---@async
|
||||
---@return boolean
|
||||
function Timeout:is_waiting() end
|
||||
|
||||
utils.Timeout = {}
|
||||
---@return Timeout
|
||||
function utils.Timeout.new() end
|
||||
|
||||
--- @return string hostname
|
||||
function utils.get_hostname() end
|
||||
|
||||
--- @return number epoch
|
||||
function utils.get_epoch() end
|
||||
|
||||
return utils
|
||||
6
definitions/automation:variables.lua
Normal file
6
definitions/automation:variables.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
---@meta
|
||||
|
||||
---@type table<string, string|nil>
|
||||
local variables
|
||||
|
||||
return variables
|
||||
Reference in New Issue
Block a user