feat(config)!: Move mqtt module to actual separate module

The automation:mqtt module now gets loaded in a similar way as the
automation:devices and automation:utils modules.
This leads to a breaking change where instantiating a new mqtt client
the device manager needs to be explicitly passed in.
This commit is contained in:
2025-10-15 03:39:10 +02:00
parent 9bddeae54e
commit be1602d0e2
4 changed files with 31 additions and 22 deletions

View File

@@ -21,7 +21,7 @@ local fulfillment = {
openid_url = "https://login.huizinga.dev/api/oidc",
}
local mqtt_client = require("automation:mqtt").new({
local mqtt_client = require("automation:mqtt").new(device_manager, {
host = ((host == "zeus" or host == "hephaestus") and "olympus.lan.huizinga.dev") or "mosquitto",
port = 8883,
client_name = "automation-" .. host,