WIP
This commit is contained in:
@@ -2,17 +2,21 @@ local devices = require("automation:devices")
|
||||
local device_manager = require("automation:device_manager")
|
||||
local utils = require("automation:utils")
|
||||
local secrets = require("automation:secrets")
|
||||
local debug = require("automation:variables").debug or false
|
||||
local debug = require("automation:variables").debug and true or false
|
||||
|
||||
print(_VERSION)
|
||||
|
||||
local host = utils.get_hostname()
|
||||
print("Running @" .. host)
|
||||
|
||||
--- @param topic string
|
||||
--- @return string
|
||||
local function mqtt_z2m(topic)
|
||||
return "zigbee2mqtt/" .. topic
|
||||
end
|
||||
|
||||
--- @param topic string
|
||||
--- @return string
|
||||
local function mqtt_automation(topic)
|
||||
return "automation/" .. topic
|
||||
end
|
||||
@@ -30,6 +34,7 @@ local mqtt_client = require("automation:mqtt").new({
|
||||
tls = host == "zeus" or host == "hephaestus",
|
||||
})
|
||||
|
||||
--- @type Ntfy
|
||||
local ntfy = devices.Ntfy.new({
|
||||
topic = secrets.ntfy_topic,
|
||||
})
|
||||
@@ -362,6 +367,7 @@ local workbench_outlet = devices.OutletOnOff.new({
|
||||
turn_off_when_away(workbench_outlet)
|
||||
device_manager:add(workbench_outlet)
|
||||
|
||||
--- @type LightColorTemperature
|
||||
local workbench_light = devices.LightColorTemperature.new({
|
||||
name = "Light",
|
||||
room = "Workbench",
|
||||
|
||||
Reference in New Issue
Block a user