@riddix/hamh 4.1.0-testing.21 → 4.1.0-testing.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1743,8 +1743,8 @@ var init_Cancelable = __esm({
1743
1743
  };
1744
1744
  return result;
1745
1745
  }
1746
- static set logger(logger199) {
1747
- this.#logger = logger199;
1746
+ static set logger(logger200) {
1747
+ this.#logger = logger200;
1748
1748
  }
1749
1749
  static get logger() {
1750
1750
  return this.#logger;
@@ -3422,13 +3422,13 @@ var init_Logger = __esm({
3422
3422
  *
3423
3423
  * @deprecated use {@link destinations}
3424
3424
  */
3425
- static addLogger(identifier, logger199, options) {
3425
+ static addLogger(identifier, logger200, options) {
3426
3426
  if (identifier in this.destinations) {
3427
3427
  throw new ImplementationError(`Logger "${identifier}" already exists`);
3428
3428
  }
3429
3429
  const dest = LogDestination({ name: identifier });
3430
3430
  const legacy = adaptDestinationToLegacy(dest);
3431
- legacy.log = logger199;
3431
+ legacy.log = logger200;
3432
3432
  if (options?.defaultLogLevel !== void 0) {
3433
3433
  legacy.defaultLogLevel = options.defaultLogLevel;
3434
3434
  }
@@ -5538,8 +5538,8 @@ function Construction(subject, initializer) {
5538
5538
  }
5539
5539
  }
5540
5540
  function unhandledError(...args) {
5541
- const logger199 = Logger.get(subject.constructor.name);
5542
- logger199.error(...args);
5541
+ const logger200 = Logger.get(subject.constructor.name);
5542
+ logger200.error(...args);
5543
5543
  }
5544
5544
  function createErrorHandler(name) {
5545
5545
  return (e) => {
@@ -135998,11 +135998,11 @@ var init_Api = __esm({
135998
135998
  }
135999
135999
  Api2.resourceFor = resourceFor;
136000
136000
  function log(level, facility, id, ...message) {
136001
- let logger199 = loggers.get(facility);
136002
- if (!logger199) {
136003
- loggers.set(facility, logger199 = Logger.get(facility));
136001
+ let logger200 = loggers.get(facility);
136002
+ if (!logger200) {
136003
+ loggers.set(facility, logger200 = Logger.get(facility));
136004
136004
  }
136005
- logger199[level](Diagnostic.via(id || "(anon)"), message);
136005
+ logger200[level](Diagnostic.via(id || "(anon)"), message);
136006
136006
  }
136007
136007
  Api2.log = log;
136008
136008
  function logRequest(facility, id, method, target) {
@@ -147202,10 +147202,10 @@ var init_home_assistant_actions = __esm({
147202
147202
  circuitBreakerResetMs: 3e4
147203
147203
  };
147204
147204
  HomeAssistantActions = class extends Service {
147205
- constructor(logger199, client, config10) {
147205
+ constructor(logger200, client, config10) {
147206
147206
  super("HomeAssistantActions");
147207
147207
  this.client = client;
147208
- this.log = logger199.get(this);
147208
+ this.log = logger200.get(this);
147209
147209
  this.config = { ...defaultConfig, ...config10 };
147210
147210
  this.circuitBreaker = new CircuitBreaker(
147211
147211
  this.config.circuitBreakerThreshold,
@@ -147453,7 +147453,7 @@ import * as ws from "ws";
147453
147453
 
147454
147454
  // src/api/web-api.ts
147455
147455
  init_service();
147456
- import express14 from "express";
147456
+ import express15 from "express";
147457
147457
  import basicAuth from "express-basic-auth";
147458
147458
  import AccessControl5 from "express-ip-access-control";
147459
147459
  import nocache from "nocache";
@@ -147547,10 +147547,10 @@ var DiagnosticService = class {
147547
147547
  };
147548
147548
 
147549
147549
  // src/api/access-log.ts
147550
- function accessLogger(logger199) {
147550
+ function accessLogger(logger200) {
147551
147551
  return (req, res, next) => {
147552
147552
  res.on("finish", () => {
147553
- logger199.debug(
147553
+ logger200.debug(
147554
147554
  `${req.method} ${decodeURI(req.originalUrl)} ${res.statusCode} ${res.statusMessage} from ${req.socket.remoteAddress}`
147555
147555
  );
147556
147556
  });
@@ -149543,6 +149543,68 @@ function metricsApi(bridgeService, haClient, haRegistry, startTime) {
149543
149543
  return router;
149544
149544
  }
149545
149545
 
149546
+ // src/api/plugin-api.ts
149547
+ import express12 from "express";
149548
+ function pluginApi(bridgeService) {
149549
+ const router = express12.Router();
149550
+ router.get("/", (_req, res) => {
149551
+ const result = [];
149552
+ for (const bridge of bridgeService.bridges) {
149553
+ const info = bridge.pluginInfo;
149554
+ const plugins = info.metadata.map((meta) => ({
149555
+ name: meta.name,
149556
+ version: meta.version,
149557
+ source: meta.source,
149558
+ enabled: meta.enabled,
149559
+ config: meta.config,
149560
+ circuitBreaker: info.circuitBreakers[meta.name],
149561
+ devices: info.devices.filter((d) => d.pluginName === meta.name).map((d) => ({
149562
+ id: d.device.id,
149563
+ name: d.device.name,
149564
+ deviceType: d.device.deviceType
149565
+ }))
149566
+ }));
149567
+ result.push({
149568
+ bridgeId: bridge.id,
149569
+ bridgeName: bridge.data.name,
149570
+ plugins
149571
+ });
149572
+ }
149573
+ res.json(result);
149574
+ });
149575
+ router.post("/:bridgeId/:pluginName/enable", (req, res) => {
149576
+ const bridge = bridgeService.get(req.params.bridgeId);
149577
+ if (!bridge) {
149578
+ res.status(404).json({ error: "Bridge not found" });
149579
+ return;
149580
+ }
149581
+ const { pluginName } = req.params;
149582
+ bridge.enablePlugin(pluginName);
149583
+ res.json({ success: true, pluginName, enabled: true });
149584
+ });
149585
+ router.post("/:bridgeId/:pluginName/disable", (req, res) => {
149586
+ const bridge = bridgeService.get(req.params.bridgeId);
149587
+ if (!bridge) {
149588
+ res.status(404).json({ error: "Bridge not found" });
149589
+ return;
149590
+ }
149591
+ const { pluginName } = req.params;
149592
+ bridge.disablePlugin(pluginName);
149593
+ res.json({ success: true, pluginName, enabled: false });
149594
+ });
149595
+ router.post("/:bridgeId/:pluginName/reset", (req, res) => {
149596
+ const bridge = bridgeService.get(req.params.bridgeId);
149597
+ if (!bridge) {
149598
+ res.status(404).json({ error: "Bridge not found" });
149599
+ return;
149600
+ }
149601
+ const { pluginName } = req.params;
149602
+ bridge.resetPlugin(pluginName);
149603
+ res.json({ success: true, pluginName, reset: true });
149604
+ });
149605
+ return router;
149606
+ }
149607
+
149546
149608
  // src/api/proxy-support.ts
149547
149609
  import path4 from "node:path";
149548
149610
  var ingressPath = "x-ingress-path";
@@ -149657,7 +149719,7 @@ import { exec } from "node:child_process";
149657
149719
  import os2 from "node:os";
149658
149720
  import { promisify } from "node:util";
149659
149721
  import v8 from "node:v8";
149660
- import express12 from "express";
149722
+ import express13 from "express";
149661
149723
  var execAsync = promisify(exec);
149662
149724
  function detectEnvironment2() {
149663
149725
  if (process.env.SUPERVISOR_TOKEN || process.env.HASSIO_TOKEN) {
@@ -149676,7 +149738,7 @@ function detectEnvironment2() {
149676
149738
  return "Standalone";
149677
149739
  }
149678
149740
  function systemApi(version) {
149679
- const router = express12.Router();
149741
+ const router = express13.Router();
149680
149742
  router.get("/info", async (_req, res) => {
149681
149743
  try {
149682
149744
  const totalMem = os2.totalmem();
@@ -149836,14 +149898,14 @@ async function getUnixStorageInfo(path11) {
149836
149898
  // src/api/web-ui.ts
149837
149899
  import fs4 from "node:fs";
149838
149900
  import path5 from "node:path";
149839
- import express13 from "express";
149901
+ import express14 from "express";
149840
149902
  function webUi(dist) {
149841
- const router = express13.Router();
149903
+ const router = express14.Router();
149842
149904
  if (dist) {
149843
149905
  const index = replaceBase(dist);
149844
149906
  router.get("/", index);
149845
149907
  router.get("/index.html", index);
149846
- router.use(express13.static(dist));
149908
+ router.use(express14.static(dist));
149847
149909
  router.get(/.*/, index);
149848
149910
  }
149849
149911
  return router;
@@ -149992,7 +150054,7 @@ var WebSocketApi = class {
149992
150054
 
149993
150055
  // src/api/web-api.ts
149994
150056
  var WebApi = class extends Service {
149995
- constructor(logger199, bridgeService, haClient, haRegistry, bridgeStorage, mappingStorage, lockCredentialStorage, settingsStorage, props) {
150057
+ constructor(logger200, bridgeService, haClient, haRegistry, bridgeStorage, mappingStorage, lockCredentialStorage, settingsStorage, props) {
149996
150058
  super("WebApi");
149997
150059
  this.bridgeService = bridgeService;
149998
150060
  this.haClient = haClient;
@@ -150002,8 +150064,8 @@ var WebApi = class extends Service {
150002
150064
  this.lockCredentialStorage = lockCredentialStorage;
150003
150065
  this.settingsStorage = settingsStorage;
150004
150066
  this.props = props;
150005
- this.logger = logger199;
150006
- this.log = logger199.get(this);
150067
+ this.logger = logger200;
150068
+ this.log = logger200.get(this);
150007
150069
  this.accessLogger = accessLogger(this.log.createChild("Access Log"));
150008
150070
  this.startTime = Date.now();
150009
150071
  this.wsApi = new WebSocketApi(
@@ -150023,8 +150085,8 @@ var WebApi = class extends Service {
150023
150085
  return this.wsApi;
150024
150086
  }
150025
150087
  async initialize() {
150026
- const api = express14.Router();
150027
- api.use(express14.json()).use(nocache()).use("/matter", matterApi(this.bridgeService, this.haRegistry)).use(
150088
+ const api = express15.Router();
150089
+ api.use(express15.json()).use(nocache()).use("/matter", matterApi(this.bridgeService, this.haRegistry)).use(
150028
150090
  "/health",
150029
150091
  healthApi(
150030
150092
  this.bridgeService,
@@ -150059,7 +150121,7 @@ var WebApi = class extends Service {
150059
150121
  this.haRegistry,
150060
150122
  this.startTime
150061
150123
  )
150062
- );
150124
+ ).use("/plugins", pluginApi(this.bridgeService));
150063
150125
  const middlewares = [
150064
150126
  this.accessLogger,
150065
150127
  supportIngress,
@@ -150084,9 +150146,9 @@ var WebApi = class extends Service {
150084
150146
  })
150085
150147
  );
150086
150148
  }
150087
- const appRouter = express14.Router();
150149
+ const appRouter = express15.Router();
150088
150150
  appRouter.use(...middlewares).use("/api", api).use(webUi(this.props.webUiDist));
150089
- this.app = express14();
150151
+ this.app = express15();
150090
150152
  const basePath = this.props.basePath;
150091
150153
  if (basePath !== "/") {
150092
150154
  this.log.info(`Base path configured: ${basePath}`);
@@ -150436,12 +150498,12 @@ var CustomStorage = class extends StorageBackendDisk {
150436
150498
 
150437
150499
  // src/core/app/storage.ts
150438
150500
  function storage(environment, options) {
150439
- const logger199 = environment.get(LoggerService).get("CustomStorage");
150501
+ const logger200 = environment.get(LoggerService).get("CustomStorage");
150440
150502
  const location2 = resolveStorageLocation(options.location);
150441
150503
  fs6.mkdirSync(location2, { recursive: true });
150442
150504
  const storageService = environment.get(StorageService);
150443
150505
  storageService.location = location2;
150444
- storageService.factory = (ns) => new CustomStorage(logger199, path6.resolve(location2, ns));
150506
+ storageService.factory = (ns) => new CustomStorage(logger200, path6.resolve(location2, ns));
150445
150507
  }
150446
150508
  function resolveStorageLocation(storageLocation) {
150447
150509
  const homedir = os3.homedir();
@@ -150789,10 +150851,10 @@ import {
150789
150851
  getConfig
150790
150852
  } from "home-assistant-js-websocket";
150791
150853
  var HomeAssistantClient = class extends Service {
150792
- constructor(logger199, options) {
150854
+ constructor(logger200, options) {
150793
150855
  super("HomeAssistantClient");
150794
150856
  this.options = options;
150795
- this.log = logger199.get(this);
150857
+ this.log = logger200.get(this);
150796
150858
  }
150797
150859
  static Options = /* @__PURE__ */ Symbol.for("HomeAssistantClientProps");
150798
150860
  _connection;
@@ -163441,12 +163503,120 @@ var FilePluginStorage = class {
163441
163503
  }
163442
163504
  };
163443
163505
 
163506
+ // src/plugins/safe-plugin-runner.ts
163507
+ init_esm();
163508
+ var logger154 = Logger.get("SafePluginRunner");
163509
+ var DEFAULT_TIMEOUT_MS = 1e4;
163510
+ var CIRCUIT_BREAKER_THRESHOLD = 3;
163511
+ var SafePluginRunner = class {
163512
+ states = /* @__PURE__ */ new Map();
163513
+ getState(pluginName) {
163514
+ let state = this.states.get(pluginName);
163515
+ if (!state) {
163516
+ state = { failures: 0, disabled: false };
163517
+ this.states.set(pluginName, state);
163518
+ }
163519
+ return state;
163520
+ }
163521
+ isDisabled(pluginName) {
163522
+ return this.getState(pluginName).disabled;
163523
+ }
163524
+ /**
163525
+ * Re-enable a previously disabled plugin (e.g., after user action).
163526
+ */
163527
+ resetCircuitBreaker(pluginName) {
163528
+ const state = this.getState(pluginName);
163529
+ state.failures = 0;
163530
+ state.disabled = false;
163531
+ state.lastError = void 0;
163532
+ state.disabledAt = void 0;
163533
+ }
163534
+ /**
163535
+ * Run a plugin function with timeout + circuit breaker.
163536
+ * Returns the result or undefined if the call failed/was skipped.
163537
+ */
163538
+ async run(pluginName, operation, fn, timeoutMs = DEFAULT_TIMEOUT_MS) {
163539
+ const state = this.getState(pluginName);
163540
+ if (state.disabled) {
163541
+ logger154.debug(
163542
+ `Plugin "${pluginName}" is disabled (circuit breaker open), skipping ${operation}`
163543
+ );
163544
+ return void 0;
163545
+ }
163546
+ try {
163547
+ const result = await Promise.race([
163548
+ Promise.resolve().then(fn),
163549
+ this.createTimeout(pluginName, operation, timeoutMs)
163550
+ ]);
163551
+ state.failures = 0;
163552
+ return result;
163553
+ } catch (error) {
163554
+ state.failures++;
163555
+ state.lastError = error instanceof Error ? error.message : String(error);
163556
+ logger154.error(
163557
+ `Plugin "${pluginName}" failed during ${operation} (failure ${state.failures}/${CIRCUIT_BREAKER_THRESHOLD}): ${state.lastError}`
163558
+ );
163559
+ if (state.failures >= CIRCUIT_BREAKER_THRESHOLD) {
163560
+ state.disabled = true;
163561
+ state.disabledAt = Date.now();
163562
+ logger154.error(
163563
+ `Plugin "${pluginName}" DISABLED after ${CIRCUIT_BREAKER_THRESHOLD} consecutive failures. Last error: ${state.lastError}`
163564
+ );
163565
+ }
163566
+ return void 0;
163567
+ }
163568
+ }
163569
+ /**
163570
+ * Run a synchronous plugin function with try/catch + circuit breaker.
163571
+ */
163572
+ runSync(pluginName, operation, fn) {
163573
+ const state = this.getState(pluginName);
163574
+ if (state.disabled) {
163575
+ return void 0;
163576
+ }
163577
+ try {
163578
+ const result = fn();
163579
+ state.failures = 0;
163580
+ return result;
163581
+ } catch (error) {
163582
+ state.failures++;
163583
+ state.lastError = error instanceof Error ? error.message : String(error);
163584
+ logger154.error(
163585
+ `Plugin "${pluginName}" failed during ${operation} (sync, failure ${state.failures}/${CIRCUIT_BREAKER_THRESHOLD}): ${state.lastError}`
163586
+ );
163587
+ if (state.failures >= CIRCUIT_BREAKER_THRESHOLD) {
163588
+ state.disabled = true;
163589
+ state.disabledAt = Date.now();
163590
+ logger154.error(
163591
+ `Plugin "${pluginName}" DISABLED after ${CIRCUIT_BREAKER_THRESHOLD} consecutive failures.`
163592
+ );
163593
+ }
163594
+ return void 0;
163595
+ }
163596
+ }
163597
+ getAllStates() {
163598
+ return new Map(this.states);
163599
+ }
163600
+ createTimeout(pluginName, operation, timeoutMs) {
163601
+ return new Promise((_, reject) => {
163602
+ setTimeout(() => {
163603
+ reject(
163604
+ new Error(
163605
+ `Plugin "${pluginName}" timed out during ${operation} after ${timeoutMs}ms`
163606
+ )
163607
+ );
163608
+ }, timeoutMs);
163609
+ });
163610
+ }
163611
+ };
163612
+
163444
163613
  // src/plugins/plugin-manager.ts
163445
- var logger154 = Logger.get("PluginManager");
163614
+ var logger155 = Logger.get("PluginManager");
163446
163615
  var PluginManager = class {
163447
163616
  instances = /* @__PURE__ */ new Map();
163448
163617
  storageDir;
163449
163618
  bridgeId;
163619
+ runner = new SafePluginRunner();
163450
163620
  /** Callback invoked when a plugin registers a new device */
163451
163621
  onDeviceRegistered;
163452
163622
  /** Callback invoked when a plugin removes a device */
@@ -163475,7 +163645,17 @@ var PluginManager = class {
163475
163645
  */
163476
163646
  async loadExternal(packagePath, config10) {
163477
163647
  try {
163478
- const module = await import(packagePath);
163648
+ const module = await this.runner.run(
163649
+ packagePath,
163650
+ "import",
163651
+ () => import(packagePath),
163652
+ 15e3
163653
+ );
163654
+ if (!module) {
163655
+ throw new Error(
163656
+ `Plugin at ${packagePath} failed to load (timeout or error)`
163657
+ );
163658
+ }
163479
163659
  const PluginClass = module.default ?? module.MatterHubPlugin;
163480
163660
  if (!PluginClass || typeof PluginClass !== "function") {
163481
163661
  throw new Error(
@@ -163492,7 +163672,7 @@ var PluginManager = class {
163492
163672
  };
163493
163673
  await this.register(plugin, metadata);
163494
163674
  } catch (e) {
163495
- logger154.error(`Failed to load external plugin from ${packagePath}:`, e);
163675
+ logger155.error(`Failed to load external plugin from ${packagePath}:`, e);
163496
163676
  throw e;
163497
163677
  }
163498
163678
  }
@@ -163542,48 +163722,65 @@ var PluginManager = class {
163542
163722
  }
163543
163723
  };
163544
163724
  this.instances.set(plugin.name, { plugin, context, metadata, devices });
163545
- logger154.info(
163725
+ logger155.info(
163546
163726
  `Registered plugin: ${plugin.name} v${plugin.version} (${metadata.source})`
163547
163727
  );
163548
163728
  }
163549
163729
  /**
163550
- * Start all registered plugins.
163730
+ * Start all registered plugins via SafePluginRunner.
163551
163731
  */
163552
163732
  async startAll() {
163553
163733
  for (const [name, instance] of this.instances) {
163554
163734
  if (!instance.metadata.enabled) continue;
163555
- try {
163556
- logger154.info(`Starting plugin: ${name}`);
163557
- await instance.plugin.onStart(instance.context);
163558
- } catch (e) {
163559
- logger154.error(`Plugin "${name}" failed to start:`, e);
163735
+ if (this.runner.isDisabled(name)) {
163736
+ logger155.warn(
163737
+ `Plugin "${name}" is disabled (circuit breaker), skipping start`
163738
+ );
163739
+ instance.metadata.enabled = false;
163740
+ continue;
163741
+ }
163742
+ logger155.info(`Starting plugin: ${name}`);
163743
+ await this.runner.run(
163744
+ name,
163745
+ "onStart",
163746
+ () => instance.plugin.onStart(instance.context)
163747
+ );
163748
+ if (this.runner.isDisabled(name)) {
163749
+ instance.metadata.enabled = false;
163560
163750
  }
163561
163751
  }
163562
163752
  }
163563
163753
  /**
163564
- * Configure all started plugins (called after bridge is operational).
163754
+ * Configure all started plugins via SafePluginRunner.
163565
163755
  */
163566
163756
  async configureAll() {
163567
163757
  for (const [name, instance] of this.instances) {
163568
163758
  if (!instance.metadata.enabled) continue;
163569
- try {
163570
- await instance.plugin.onConfigure?.();
163571
- } catch (e) {
163572
- logger154.error(`Plugin "${name}" failed to configure:`, e);
163759
+ if (instance.plugin.onConfigure) {
163760
+ await this.runner.run(
163761
+ name,
163762
+ "onConfigure",
163763
+ () => instance.plugin.onConfigure()
163764
+ );
163765
+ if (this.runner.isDisabled(name)) {
163766
+ instance.metadata.enabled = false;
163767
+ }
163573
163768
  }
163574
163769
  }
163575
163770
  }
163576
163771
  /**
163577
- * Shut down all plugins.
163772
+ * Shut down all plugins via SafePluginRunner.
163578
163773
  */
163579
163774
  async shutdownAll(reason) {
163580
163775
  for (const [name, instance] of this.instances) {
163581
- try {
163582
- await instance.plugin.onShutdown?.(reason);
163583
- logger154.info(`Plugin "${name}" shut down`);
163584
- } catch (e) {
163585
- logger154.error(`Plugin "${name}" failed to shut down:`, e);
163776
+ if (instance.plugin.onShutdown) {
163777
+ await this.runner.run(
163778
+ name,
163779
+ "onShutdown",
163780
+ () => instance.plugin.onShutdown(reason)
163781
+ );
163586
163782
  }
163783
+ logger155.info(`Plugin "${name}" shut down`);
163587
163784
  }
163588
163785
  this.instances.clear();
163589
163786
  }
@@ -163606,6 +163803,29 @@ var PluginManager = class {
163606
163803
  }
163607
163804
  return result;
163608
163805
  }
163806
+ getCircuitBreakerStates() {
163807
+ return this.runner.getAllStates();
163808
+ }
163809
+ resetPlugin(pluginName) {
163810
+ this.runner.resetCircuitBreaker(pluginName);
163811
+ const instance = this.instances.get(pluginName);
163812
+ if (instance) {
163813
+ instance.metadata.enabled = true;
163814
+ }
163815
+ }
163816
+ disablePlugin(pluginName) {
163817
+ const instance = this.instances.get(pluginName);
163818
+ if (instance) {
163819
+ instance.metadata.enabled = false;
163820
+ }
163821
+ }
163822
+ enablePlugin(pluginName) {
163823
+ this.runner.resetCircuitBreaker(pluginName);
163824
+ const instance = this.instances.get(pluginName);
163825
+ if (instance) {
163826
+ instance.metadata.enabled = true;
163827
+ }
163828
+ }
163609
163829
  };
163610
163830
 
163611
163831
  // src/services/bridges/bridge.ts
@@ -163673,7 +163893,7 @@ var BridgedDeviceBasicInformationBehaviorConstructor = ClusterBehavior.withInter
163673
163893
  var BridgedDeviceBasicInformationBehavior = BridgedDeviceBasicInformationBehaviorConstructor;
163674
163894
 
163675
163895
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/bridged-device-basic-information/BridgedDeviceBasicInformationServer.js
163676
- var logger155 = Logger.get("BridgedDeviceBasicInformationServer");
163896
+ var logger156 = Logger.get("BridgedDeviceBasicInformationServer");
163677
163897
  var BridgedDeviceBasicInformationServer = class extends BridgedDeviceBasicInformationBehavior {
163678
163898
  async initialize() {
163679
163899
  if (this.endpoint.lifecycle.isInstalled) {
@@ -163688,7 +163908,7 @@ var BridgedDeviceBasicInformationServer = class extends BridgedDeviceBasicInform
163688
163908
  this.state.uniqueId = BasicInformationServer.createUniqueId();
163689
163909
  }
163690
163910
  if (serialNumber !== void 0 && uniqueId === this.state.serialNumber) {
163691
- logger155.warn("uniqueId and serialNumber shall not be the same.");
163911
+ logger156.warn("uniqueId and serialNumber shall not be the same.");
163692
163912
  }
163693
163913
  }
163694
163914
  static schema = BasicInformationServer.enableUniqueIdPersistence(
@@ -164271,10 +164491,10 @@ function ensureCommissioningConfig(server) {
164271
164491
  // src/services/bridges/bridge.ts
164272
164492
  var AUTO_FORCE_SYNC_INTERVAL_MS = 9e4;
164273
164493
  var Bridge = class {
164274
- constructor(env, logger199, dataProvider, endpointManager) {
164494
+ constructor(env, logger200, dataProvider, endpointManager) {
164275
164495
  this.dataProvider = dataProvider;
164276
164496
  this.endpointManager = endpointManager;
164277
- this.log = logger199.get(`Bridge / ${dataProvider.id}`);
164497
+ this.log = logger200.get(`Bridge / ${dataProvider.id}`);
164278
164498
  this.server = new BridgeServerNode(
164279
164499
  env,
164280
164500
  this.dataProvider,
@@ -164343,6 +164563,18 @@ var Bridge = class {
164343
164563
  get aggregator() {
164344
164564
  return this.endpointManager.root;
164345
164565
  }
164566
+ get pluginInfo() {
164567
+ return this.endpointManager.getPluginInfo();
164568
+ }
164569
+ enablePlugin(pluginName) {
164570
+ this.endpointManager.enablePlugin(pluginName);
164571
+ }
164572
+ disablePlugin(pluginName) {
164573
+ this.endpointManager.disablePlugin(pluginName);
164574
+ }
164575
+ resetPlugin(pluginName) {
164576
+ this.endpointManager.resetPlugin(pluginName);
164577
+ }
164346
164578
  async initialize() {
164347
164579
  await this.server.construction.ready.then();
164348
164580
  await this.refreshDevices();
@@ -165347,7 +165579,7 @@ var WindowCoveringClientConstructor = ClientBehavior(WindowCovering3.Complete);
165347
165579
 
165348
165580
  // src/utils/apply-patch-state.ts
165349
165581
  init_esm();
165350
- var logger156 = Logger.get("ApplyPatchState");
165582
+ var logger157 = Logger.get("ApplyPatchState");
165351
165583
  function applyPatchState(state, patch, options) {
165352
165584
  return applyPatch(state, patch, options?.force);
165353
165585
  }
@@ -165374,23 +165606,23 @@ function applyPatch(state, patch, force = false) {
165374
165606
  if (errorMessage.includes(
165375
165607
  "Endpoint storage inaccessible because endpoint is not a node and is not owned by another endpoint"
165376
165608
  )) {
165377
- logger156.debug(
165609
+ logger157.debug(
165378
165610
  `Suppressed endpoint storage error, patch not applied: ${JSON.stringify(actualPatch)}`
165379
165611
  );
165380
165612
  return actualPatch;
165381
165613
  }
165382
165614
  if (errorMessage.includes("synchronous-transaction-conflict")) {
165383
- logger156.warn(
165615
+ logger157.warn(
165384
165616
  `Transaction conflict, state update DROPPED: ${JSON.stringify(actualPatch)}`
165385
165617
  );
165386
165618
  return actualPatch;
165387
165619
  }
165388
165620
  failedKeys.push(key);
165389
- logger156.warn(`Failed to set property '${key}': ${errorMessage}`);
165621
+ logger157.warn(`Failed to set property '${key}': ${errorMessage}`);
165390
165622
  }
165391
165623
  }
165392
165624
  if (failedKeys.length > 0) {
165393
- logger156.warn(
165625
+ logger157.warn(
165394
165626
  `${failedKeys.length} properties failed to update: [${failedKeys.join(", ")}]`
165395
165627
  );
165396
165628
  }
@@ -165473,7 +165705,7 @@ var IdentifyServer2 = class extends IdentifyServer {
165473
165705
  // src/matter/behaviors/mode-select-server.ts
165474
165706
  init_esm();
165475
165707
  init_home_assistant_entity_behavior();
165476
- var logger157 = Logger.get("ModeSelectServer");
165708
+ var logger158 = Logger.get("ModeSelectServer");
165477
165709
  var ModeSelectServerBase = class extends ModeSelectServer {
165478
165710
  async initialize() {
165479
165711
  await super.initialize();
@@ -165506,13 +165738,13 @@ var ModeSelectServerBase = class extends ModeSelectServer {
165506
165738
  const options = config10.getOptions(homeAssistant.entity);
165507
165739
  const { newMode } = request;
165508
165740
  if (newMode < 0 || newMode >= options.length) {
165509
- logger157.warn(
165741
+ logger158.warn(
165510
165742
  `[${homeAssistant.entityId}] Invalid mode ${newMode}, options: [${options.join(", ")}]`
165511
165743
  );
165512
165744
  return;
165513
165745
  }
165514
165746
  const option = options[newMode];
165515
- logger157.info(
165747
+ logger158.info(
165516
165748
  `[${homeAssistant.entityId}] changeToMode(${newMode}) -> "${option}"`
165517
165749
  );
165518
165750
  applyPatchState(this.state, { currentMode: newMode });
@@ -165540,7 +165772,7 @@ var lastTurnOnTimestamps = /* @__PURE__ */ new Map();
165540
165772
  function notifyLightTurnedOn(entityId) {
165541
165773
  lastTurnOnTimestamps.set(entityId, Date.now());
165542
165774
  }
165543
- var logger158 = Logger.get("LevelControlServer");
165775
+ var logger159 = Logger.get("LevelControlServer");
165544
165776
  var FeaturedBase = LevelControlServer.with("OnOff", "Lighting");
165545
165777
  var LevelControlServerBase = class extends FeaturedBase {
165546
165778
  pendingTransitionTime;
@@ -165555,12 +165787,12 @@ var LevelControlServerBase = class extends FeaturedBase {
165555
165787
  this.state.maxLevel = 254;
165556
165788
  }
165557
165789
  this.state.onLevel = null;
165558
- logger158.debug(`initialize: calling super.initialize()`);
165790
+ logger159.debug(`initialize: calling super.initialize()`);
165559
165791
  try {
165560
165792
  await super.initialize();
165561
- logger158.debug(`initialize: super.initialize() completed successfully`);
165793
+ logger159.debug(`initialize: super.initialize() completed successfully`);
165562
165794
  } catch (error) {
165563
- logger158.error(`initialize: super.initialize() FAILED:`, error);
165795
+ logger159.error(`initialize: super.initialize() FAILED:`, error);
165564
165796
  throw error;
165565
165797
  }
165566
165798
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
@@ -165630,7 +165862,7 @@ var LevelControlServerBase = class extends FeaturedBase {
165630
165862
  const timeSinceTurnOn = lastTurnOn ? Date.now() - lastTurnOn : Infinity;
165631
165863
  const isMaxBrightness = level >= this.maxLevel;
165632
165864
  if (isMaxBrightness && timeSinceTurnOn < 200) {
165633
- logger158.debug(
165865
+ logger159.debug(
165634
165866
  `[${entityId}] Ignoring moveToLevel(${level}) - Alexa brightness reset detected (${timeSinceTurnOn}ms after turn-on)`
165635
165867
  );
165636
165868
  return;
@@ -165669,7 +165901,7 @@ function LevelControlServer2(config10) {
165669
165901
  }
165670
165902
 
165671
165903
  // src/matter/behaviors/on-off-server.ts
165672
- var logger159 = Logger.get("OnOffServer");
165904
+ var logger160 = Logger.get("OnOffServer");
165673
165905
  var OnOffServerBase = class extends OnOffServer {
165674
165906
  async initialize() {
165675
165907
  await super.initialize();
@@ -165699,7 +165931,7 @@ var OnOffServerBase = class extends OnOffServer {
165699
165931
  const action = turnOn?.(void 0, this.agent) ?? {
165700
165932
  action: "homeassistant.turn_on"
165701
165933
  };
165702
- logger159.info(`[${homeAssistant.entityId}] Turning ON -> ${action.action}`);
165934
+ logger160.info(`[${homeAssistant.entityId}] Turning ON -> ${action.action}`);
165703
165935
  notifyLightTurnedOn(homeAssistant.entityId);
165704
165936
  applyPatchState(this.state, { onOff: true });
165705
165937
  homeAssistant.callAction(action);
@@ -165717,7 +165949,7 @@ var OnOffServerBase = class extends OnOffServer {
165717
165949
  const action = turnOff?.(void 0, this.agent) ?? {
165718
165950
  action: "homeassistant.turn_off"
165719
165951
  };
165720
- logger159.info(`[${homeAssistant.entityId}] Turning OFF -> ${action.action}`);
165952
+ logger160.info(`[${homeAssistant.entityId}] Turning OFF -> ${action.action}`);
165721
165953
  applyPatchState(this.state, { onOff: false });
165722
165954
  homeAssistant.callAction(action);
165723
165955
  }
@@ -165971,7 +166203,7 @@ init_clusters();
165971
166203
 
165972
166204
  // src/matter/behaviors/power-source-server.ts
165973
166205
  init_home_assistant_entity_behavior();
165974
- var logger160 = Logger.get("PowerSourceServer");
166206
+ var logger161 = Logger.get("PowerSourceServer");
165975
166207
  var FeaturedBase2 = PowerSourceServer.with("Battery", "Rechargeable");
165976
166208
  var PowerSourceServerBase = class extends FeaturedBase2 {
165977
166209
  async initialize() {
@@ -165983,17 +166215,17 @@ var PowerSourceServerBase = class extends FeaturedBase2 {
165983
166215
  applyPatchState(this.state, {
165984
166216
  endpointList: [endpointNumber]
165985
166217
  });
165986
- logger160.debug(
166218
+ logger161.debug(
165987
166219
  `[${entityId}] PowerSource initialized with endpointList=[${endpointNumber}]`
165988
166220
  );
165989
166221
  } else {
165990
- logger160.warn(
166222
+ logger161.warn(
165991
166223
  `[${entityId}] PowerSource endpoint number is null during initialize - endpointList will be empty!`
165992
166224
  );
165993
166225
  }
165994
166226
  const batteryEntity = homeAssistant.state.mapping?.batteryEntity;
165995
166227
  if (batteryEntity) {
165996
- logger160.debug(
166228
+ logger161.debug(
165997
166229
  `[${entityId}] PowerSource using mapped battery entity: ${batteryEntity}`
165998
166230
  );
165999
166231
  }
@@ -166312,7 +166544,7 @@ var WaterLeakDetectorType = WaterLeakDetectorDevice.with(
166312
166544
  );
166313
166545
 
166314
166546
  // src/matter/endpoints/legacy/binary-sensor/index.ts
166315
- var logger161 = Logger.get("BinarySensorDevice");
166547
+ var logger162 = Logger.get("BinarySensorDevice");
166316
166548
  var deviceClasses = {
166317
166549
  [BinarySensorDeviceClass.CarbonMonoxide]: CoAlarmType,
166318
166550
  [BinarySensorDeviceClass.Gas]: CoAlarmType,
@@ -166362,11 +166594,11 @@ function BinarySensorDevice(homeAssistantEntity) {
166362
166594
  const originalTypeName = type.name;
166363
166595
  if (hasBattery && batteryTypes.has(type)) {
166364
166596
  type = batteryTypes.get(type);
166365
- logger161.info(
166597
+ logger162.info(
166366
166598
  `[${entityId}] Using battery variant: ${originalTypeName} -> ${type.name}, batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"}`
166367
166599
  );
166368
166600
  } else if (hasBattery) {
166369
- logger161.warn(
166601
+ logger162.warn(
166370
166602
  `[${entityId}] Has battery but no variant available for ${originalTypeName}`
166371
166603
  );
166372
166604
  }
@@ -166935,7 +167167,7 @@ var ClimateFanControlServer = FanControlServer2(config2).with(
166935
167167
  // src/matter/behaviors/humidity-measurement-server.ts
166936
167168
  init_esm();
166937
167169
  init_home_assistant_entity_behavior();
166938
- var logger162 = Logger.get("HumidityMeasurementServer");
167170
+ var logger163 = Logger.get("HumidityMeasurementServer");
166939
167171
  var HumidityMeasurementServerBase = class extends RelativeHumidityMeasurementServer {
166940
167172
  async initialize() {
166941
167173
  await super.initialize();
@@ -166952,7 +167184,7 @@ var HumidityMeasurementServerBase = class extends RelativeHumidityMeasurementSer
166952
167184
  return;
166953
167185
  }
166954
167186
  const humidity = this.getHumidity(this.state.config, entity.state);
166955
- logger162.debug(
167187
+ logger163.debug(
166956
167188
  `Humidity ${entity.state.entity_id} raw=${entity.state.state} measuredValue=${humidity}`
166957
167189
  );
166958
167190
  applyPatchState(this.state, {
@@ -167091,7 +167323,7 @@ init_home_assistant_entity_behavior();
167091
167323
  // src/matter/behaviors/thermostat-server.ts
167092
167324
  init_esm();
167093
167325
  init_home_assistant_entity_behavior();
167094
- var logger163 = Logger.get("ThermostatServer");
167326
+ var logger164 = Logger.get("ThermostatServer");
167095
167327
  var SystemMode = Thermostat3.SystemMode;
167096
167328
  var RunningMode = Thermostat3.ThermostatRunningMode;
167097
167329
  var nudgingSetpoints = /* @__PURE__ */ new Set();
@@ -167149,7 +167381,7 @@ var HeatingAndCoolingFeaturedBase = ThermostatServer.with("Heating", "Cooling").
167149
167381
  );
167150
167382
  function thermostatPreInitialize(self) {
167151
167383
  const currentLocal = self.state.localTemperature;
167152
- logger163.debug(
167384
+ logger164.debug(
167153
167385
  `initialize: features - heating=${self.features.heating}, cooling=${self.features.cooling}`
167154
167386
  );
167155
167387
  const localValue = typeof currentLocal === "number" && !Number.isNaN(currentLocal) ? currentLocal : currentLocal === null ? null : 2100;
@@ -167172,7 +167404,7 @@ function thermostatPreInitialize(self) {
167172
167404
  const coolingValue = typeof currentCooling === "number" && !Number.isNaN(currentCooling) ? currentCooling : 2400;
167173
167405
  self.state.occupiedCoolingSetpoint = coolingValue;
167174
167406
  }
167175
- logger163.debug(
167407
+ logger164.debug(
167176
167408
  `initialize: after force-set - local=${self.state.localTemperature}`
167177
167409
  );
167178
167410
  self.state.thermostatRunningState = runningStateAllOff;
@@ -167272,7 +167504,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167272
167504
  maxCoolLimit,
167273
167505
  "cool"
167274
167506
  );
167275
- logger163.debug(
167507
+ logger164.debug(
167276
167508
  `update: limits heat=[${minHeatLimit}, ${maxHeatLimit}], cool=[${minCoolLimit}, ${maxCoolLimit}], systemMode=${systemMode}, runningMode=${runningMode}`
167277
167509
  );
167278
167510
  const controlSequence = config10.getControlSequence(entity.state, this.agent);
@@ -167343,18 +167575,18 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167343
167575
  * when calling the Home Assistant action.
167344
167576
  */
167345
167577
  heatingSetpointChanging(value, _oldValue, context) {
167346
- logger163.debug(
167578
+ logger164.debug(
167347
167579
  `heatingSetpointChanging: value=${value}, oldValue=${_oldValue}, isOffline=${transactionIsOffline(context)}`
167348
167580
  );
167349
167581
  if (transactionIsOffline(context)) {
167350
- logger163.debug(
167582
+ logger164.debug(
167351
167583
  "heatingSetpointChanging: skipping - transaction is offline"
167352
167584
  );
167353
167585
  return;
167354
167586
  }
167355
167587
  const next = Temperature.celsius(value / 100);
167356
167588
  if (!next) {
167357
- logger163.debug("heatingSetpointChanging: skipping - invalid temperature");
167589
+ logger164.debug("heatingSetpointChanging: skipping - invalid temperature");
167358
167590
  return;
167359
167591
  }
167360
167592
  this.agent.asLocalActor(() => {
@@ -167365,7 +167597,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167365
167597
  this.agent
167366
167598
  );
167367
167599
  const currentMode = this.state.systemMode;
167368
- logger163.debug(
167600
+ logger164.debug(
167369
167601
  `heatingSetpointChanging: supportsRange=${supportsRange}, systemMode=${currentMode}, features.heating=${this.features.heating}, features.cooling=${this.features.cooling}`
167370
167602
  );
167371
167603
  if (!supportsRange) {
@@ -167375,12 +167607,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167375
167607
  const isOff = currentMode === Thermostat3.SystemMode.Off;
167376
167608
  if (isOff && this.features.heating) {
167377
167609
  if (nudgingSetpoints.has(homeAssistant.entityId)) {
167378
- logger163.debug(
167610
+ logger164.debug(
167379
167611
  `heatingSetpointChanging: skipping auto-resume - nudge write in progress`
167380
167612
  );
167381
167613
  return;
167382
167614
  }
167383
- logger163.info(
167615
+ logger164.info(
167384
167616
  `heatingSetpointChanging: auto-resume - switching to Heat (was Off)`
167385
167617
  );
167386
167618
  const modeAction = config10.setSystemMode(
@@ -167389,17 +167621,17 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167389
167621
  );
167390
167622
  homeAssistant.callAction(modeAction);
167391
167623
  } else if (!isAutoMode && !isHeatingMode) {
167392
- logger163.debug(
167624
+ logger164.debug(
167393
167625
  `heatingSetpointChanging: skipping - not in heating/auto mode (mode=${currentMode}, haMode=${haHvacMode})`
167394
167626
  );
167395
167627
  return;
167396
167628
  }
167397
- logger163.debug(
167629
+ logger164.debug(
167398
167630
  `heatingSetpointChanging: proceeding - isAutoMode=${isAutoMode}, isHeatingMode=${isHeatingMode}, isOff=${isOff}, haMode=${haHvacMode}`
167399
167631
  );
167400
167632
  }
167401
167633
  const coolingSetpoint = this.features.cooling ? this.state.occupiedCoolingSetpoint : value;
167402
- logger163.debug(
167634
+ logger164.debug(
167403
167635
  `heatingSetpointChanging: calling setTemperature with heat=${next.celsius(true)}, cool=${coolingSetpoint}`
167404
167636
  );
167405
167637
  this.setTemperature(
@@ -167437,12 +167669,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167437
167669
  const isOff = currentMode === Thermostat3.SystemMode.Off;
167438
167670
  if (isOff && !this.features.heating && this.features.cooling) {
167439
167671
  if (nudgingSetpoints.has(homeAssistant.entityId)) {
167440
- logger163.debug(
167672
+ logger164.debug(
167441
167673
  `coolingSetpointChanging: skipping auto-resume - nudge write in progress`
167442
167674
  );
167443
167675
  return;
167444
167676
  }
167445
- logger163.info(
167677
+ logger164.info(
167446
167678
  `coolingSetpointChanging: auto-resume - switching to Cool (was Off)`
167447
167679
  );
167448
167680
  const modeAction = config10.setSystemMode(
@@ -167451,12 +167683,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167451
167683
  );
167452
167684
  homeAssistant.callAction(modeAction);
167453
167685
  } else if (!isAutoMode && !isCoolingMode) {
167454
- logger163.debug(
167686
+ logger164.debug(
167455
167687
  `coolingSetpointChanging: skipping - not in cooling/auto mode (mode=${currentMode}, haMode=${haHvacMode})`
167456
167688
  );
167457
167689
  return;
167458
167690
  }
167459
- logger163.debug(
167691
+ logger164.debug(
167460
167692
  `coolingSetpointChanging: proceeding - isAutoMode=${isAutoMode}, isCoolingMode=${isCoolingMode}, isOff=${isOff}, haMode=${haHvacMode}`
167461
167693
  );
167462
167694
  }
@@ -167532,7 +167764,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167532
167764
  const effectiveMax = max ?? 5e3;
167533
167765
  if (value == null || Number.isNaN(value)) {
167534
167766
  const defaultValue = type === "heat" ? 2e3 : 2400;
167535
- logger163.debug(
167767
+ logger164.debug(
167536
167768
  `${type} setpoint is undefined, using default: ${defaultValue}`
167537
167769
  );
167538
167770
  return Math.max(effectiveMin, Math.min(effectiveMax, defaultValue));
@@ -167996,7 +168228,7 @@ init_home_assistant_entity_behavior();
167996
168228
  init_esm();
167997
168229
  init_home_assistant_actions();
167998
168230
  init_home_assistant_entity_behavior();
167999
- var logger164 = Logger.get("WindowCoveringServer");
168231
+ var logger165 = Logger.get("WindowCoveringServer");
168000
168232
  var MovementStatus = WindowCovering3.MovementStatus;
168001
168233
  var FeaturedBase4 = WindowCoveringServer.with(
168002
168234
  "Lift",
@@ -168084,7 +168316,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168084
168316
  );
168085
168317
  const currentTilt100ths = currentTilt != null ? currentTilt * 100 : null;
168086
168318
  const isStopped = movementStatus === MovementStatus.Stopped;
168087
- logger164.debug(
168319
+ logger165.debug(
168088
168320
  `Cover update for ${entity.entity_id}: state=${state.state}, lift=${currentLift}%, tilt=${currentTilt}%, movement=${MovementStatus[movementStatus]}`
168089
168321
  );
168090
168322
  const appliedPatch = applyPatchState(
@@ -168123,9 +168355,9 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168123
168355
  );
168124
168356
  if (Object.keys(appliedPatch).length > 0) {
168125
168357
  const hasOperationalChange = "operationalStatus" in appliedPatch;
168126
- const log = hasOperationalChange ? logger164.info : logger164.debug;
168358
+ const log = hasOperationalChange ? logger165.info : logger165.debug;
168127
168359
  log.call(
168128
- logger164,
168360
+ logger165,
168129
168361
  `Cover ${entity.entity_id} state changed: ${JSON.stringify(appliedPatch)}`
168130
168362
  );
168131
168363
  }
@@ -168133,7 +168365,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168133
168365
  async handleMovement(type, _, direction, targetPercent100ths) {
168134
168366
  const currentLift = this.state.currentPositionLiftPercent100ths ?? 0;
168135
168367
  const currentTilt = this.state.currentPositionTiltPercent100ths ?? 0;
168136
- logger164.info(
168368
+ logger165.info(
168137
168369
  `handleMovement: type=${MovementType[type]}, direction=${MovementDirection[direction]}, target=${targetPercent100ths}, currentLift=${currentLift}, currentTilt=${currentTilt}, absolutePosition=${this.features.absolutePosition}`
168138
168370
  );
168139
168371
  if (type === MovementType.Lift) {
@@ -168169,13 +168401,13 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168169
168401
  handleLiftOpen() {
168170
168402
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
168171
168403
  const action = this.state.config.openCoverLift(void 0, this.agent);
168172
- logger164.info(`handleLiftOpen: calling action=${action.action}`);
168404
+ logger165.info(`handleLiftOpen: calling action=${action.action}`);
168173
168405
  homeAssistant.callAction(action);
168174
168406
  }
168175
168407
  handleLiftClose() {
168176
168408
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
168177
168409
  const action = this.state.config.closeCoverLift(void 0, this.agent);
168178
- logger164.info(`handleLiftClose: calling action=${action.action}`);
168410
+ logger165.info(`handleLiftClose: calling action=${action.action}`);
168179
168411
  homeAssistant.callAction(action);
168180
168412
  }
168181
168413
  handleGoToLiftPosition(targetPercent100ths) {
@@ -168196,7 +168428,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168196
168428
  this.lastLiftCommandTime = now;
168197
168429
  const isFirstInSequence = timeSinceLastCommand > _WindowCoveringServerBase.COMMAND_SEQUENCE_THRESHOLD_MS;
168198
168430
  const debounceMs = isFirstInSequence ? _WindowCoveringServerBase.DEBOUNCE_INITIAL_MS : _WindowCoveringServerBase.DEBOUNCE_SUBSEQUENT_MS;
168199
- logger164.debug(
168431
+ logger165.debug(
168200
168432
  `Lift command: target=${targetPosition}%, debounce=${debounceMs}ms (${isFirstInSequence ? "initial" : "subsequent"})`
168201
168433
  );
168202
168434
  if (this.liftDebounceTimer) {
@@ -168245,7 +168477,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168245
168477
  this.lastTiltCommandTime = now;
168246
168478
  const isFirstInSequence = timeSinceLastCommand > _WindowCoveringServerBase.COMMAND_SEQUENCE_THRESHOLD_MS;
168247
168479
  const debounceMs = isFirstInSequence ? _WindowCoveringServerBase.DEBOUNCE_INITIAL_MS : _WindowCoveringServerBase.DEBOUNCE_SUBSEQUENT_MS;
168248
- logger164.debug(
168480
+ logger165.debug(
168249
168481
  `Tilt command: target=${targetPosition}%, debounce=${debounceMs}ms (${isFirstInSequence ? "initial" : "subsequent"})`
168250
168482
  );
168251
168483
  if (this.tiltDebounceTimer) {
@@ -168304,7 +168536,7 @@ function adjustPositionForWriting(position, flags2, matterSemantics) {
168304
168536
  }
168305
168537
 
168306
168538
  // src/matter/endpoints/legacy/cover/behaviors/cover-window-covering-server.ts
168307
- var logger165 = Logger.get("CoverWindowCoveringServer");
168539
+ var logger166 = Logger.get("CoverWindowCoveringServer");
168308
168540
  var attributes3 = (entity) => entity.attributes;
168309
168541
  var MATTER_SEMANTIC_PLATFORMS = [
168310
168542
  // Currently empty - no known platforms use Matter semantics by default
@@ -168322,7 +168554,7 @@ var adjustPositionForReading2 = (position, agent) => {
168322
168554
  const { featureFlags } = agent.env.get(BridgeDataProvider);
168323
168555
  const matterSem = usesMatterSemantics(agent);
168324
168556
  const result = adjustPositionForReading(position, featureFlags, matterSem);
168325
- logger165.debug(`adjustPositionForReading: HA=${position}%, result=${result}%`);
168557
+ logger166.debug(`adjustPositionForReading: HA=${position}%, result=${result}%`);
168326
168558
  return result;
168327
168559
  };
168328
168560
  var adjustPositionForWriting2 = (position, agent) => {
@@ -168426,7 +168658,7 @@ var config4 = {
168426
168658
  var CoverWindowCoveringServer = WindowCoveringServer2(config4);
168427
168659
 
168428
168660
  // src/matter/endpoints/legacy/cover/index.ts
168429
- var logger166 = Logger.get("CoverDevice");
168661
+ var logger167 = Logger.get("CoverDevice");
168430
168662
  var CoverPowerSourceServer = PowerSourceServer2({
168431
168663
  getBatteryPercent: (entity, agent) => {
168432
168664
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
@@ -168453,7 +168685,7 @@ var CoverDeviceType = (supportedFeatures, hasBattery, entityId) => {
168453
168685
  features2.add("PositionAwareLift");
168454
168686
  features2.add("AbsolutePosition");
168455
168687
  } else {
168456
- logger166.warn(
168688
+ logger167.warn(
168457
168689
  `[${entityId}] Cover has no support_open feature (supported_features=${supportedFeatures}), adding Lift anyway`
168458
168690
  );
168459
168691
  features2.add("Lift");
@@ -168470,7 +168702,7 @@ var CoverDeviceType = (supportedFeatures, hasBattery, entityId) => {
168470
168702
  features2.add("AbsolutePosition");
168471
168703
  }
168472
168704
  }
168473
- logger166.info(
168705
+ logger167.info(
168474
168706
  `[${entityId}] Creating WindowCovering with features: [${[...features2].join(", ")}], supported_features=${supportedFeatures}`
168475
168707
  );
168476
168708
  const baseBehaviors = [
@@ -168491,11 +168723,11 @@ function CoverDevice(homeAssistantEntity) {
168491
168723
  const hasBatteryEntity = !!homeAssistantEntity.mapping?.batteryEntity;
168492
168724
  const hasBattery = hasBatteryAttr || hasBatteryEntity;
168493
168725
  if (hasBattery) {
168494
- logger166.info(
168726
+ logger167.info(
168495
168727
  `[${entityId}] Creating cover with PowerSource cluster, batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"}`
168496
168728
  );
168497
168729
  } else {
168498
- logger166.debug(
168730
+ logger167.debug(
168499
168731
  `[${entityId}] Creating cover without battery (batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"})`
168500
168732
  );
168501
168733
  }
@@ -168709,7 +168941,7 @@ function AirPurifierEndpoint(homeAssistantEntity) {
168709
168941
  // src/matter/behaviors/generic-switch-server.ts
168710
168942
  init_esm();
168711
168943
  init_home_assistant_entity_behavior();
168712
- var logger167 = Logger.get("GenericSwitchServer");
168944
+ var logger168 = Logger.get("GenericSwitchServer");
168713
168945
  var FeaturedBase6 = SwitchServer.with(
168714
168946
  "MomentarySwitch",
168715
168947
  "MomentarySwitchRelease",
@@ -168720,7 +168952,7 @@ var GenericSwitchServerBase = class extends FeaturedBase6 {
168720
168952
  await super.initialize();
168721
168953
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
168722
168954
  const entityId = homeAssistant.entityId;
168723
- logger167.debug(`[${entityId}] GenericSwitch initialized`);
168955
+ logger168.debug(`[${entityId}] GenericSwitch initialized`);
168724
168956
  if (homeAssistant.state.managedByEndpoint) {
168725
168957
  homeAssistant.registerUpdate(this.callback(this.handleEventChange));
168726
168958
  } else {
@@ -168733,7 +168965,7 @@ var GenericSwitchServerBase = class extends FeaturedBase6 {
168733
168965
  const eventType = attrs.event_type;
168734
168966
  if (!eventType) return;
168735
168967
  const entityId = entity.entity_id;
168736
- logger167.debug(`[${entityId}] Event fired: ${eventType}`);
168968
+ logger168.debug(`[${entityId}] Event fired: ${eventType}`);
168737
168969
  this.triggerPress(eventType);
168738
168970
  }
168739
168971
  triggerPress(eventType) {
@@ -169047,7 +169279,7 @@ init_nodejs();
169047
169279
 
169048
169280
  // src/matter/behaviors/color-control-server.ts
169049
169281
  init_home_assistant_entity_behavior();
169050
- var logger168 = Logger.get("ColorControlServer");
169282
+ var logger169 = Logger.get("ColorControlServer");
169051
169283
  var FeaturedBase7 = ColorControlServer.with("ColorTemperature", "HueSaturation");
169052
169284
  var ColorControlServerBase = class extends FeaturedBase7 {
169053
169285
  pendingTransitionTime;
@@ -169071,7 +169303,7 @@ var ColorControlServerBase = class extends FeaturedBase7 {
169071
169303
  if (this.state.startUpColorTemperatureMireds == null) {
169072
169304
  this.state.startUpColorTemperatureMireds = defaultMireds;
169073
169305
  }
169074
- logger168.debug(
169306
+ logger169.debug(
169075
169307
  `initialize: set ColorTemperature defaults - min=${this.state.colorTempPhysicalMinMireds}, max=${this.state.colorTempPhysicalMaxMireds}, current=${this.state.colorTemperatureMireds}`
169076
169308
  );
169077
169309
  }
@@ -169467,7 +169699,7 @@ init_dist();
169467
169699
  // src/matter/behaviors/electrical-energy-measurement-server.ts
169468
169700
  init_esm();
169469
169701
  init_home_assistant_entity_behavior();
169470
- var logger169 = Logger.get("ElectricalEnergyMeasurementServer");
169702
+ var logger170 = Logger.get("ElectricalEnergyMeasurementServer");
169471
169703
  var FeaturedBase8 = ElectricalEnergyMeasurementServer.with("CumulativeEnergy", "ImportedEnergy");
169472
169704
  var ElectricalEnergyMeasurementServerBase = class extends FeaturedBase8 {
169473
169705
  async initialize() {
@@ -169476,7 +169708,7 @@ var ElectricalEnergyMeasurementServerBase = class extends FeaturedBase8 {
169476
169708
  const entityId = homeAssistant.entityId;
169477
169709
  const energyEntity = homeAssistant.state.mapping?.energyEntity;
169478
169710
  if (energyEntity) {
169479
- logger169.debug(
169711
+ logger170.debug(
169480
169712
  `[${entityId}] ElectricalEnergyMeasurement using mapped energy entity: ${energyEntity}`
169481
169713
  );
169482
169714
  }
@@ -169532,7 +169764,7 @@ var HaElectricalEnergyMeasurementServer = ElectricalEnergyMeasurementServerBase.
169532
169764
  // src/matter/behaviors/electrical-power-measurement-server.ts
169533
169765
  init_esm();
169534
169766
  init_home_assistant_entity_behavior();
169535
- var logger170 = Logger.get("ElectricalPowerMeasurementServer");
169767
+ var logger171 = Logger.get("ElectricalPowerMeasurementServer");
169536
169768
  var ElectricalPowerMeasurementServerBase = class extends ElectricalPowerMeasurementServer {
169537
169769
  async initialize() {
169538
169770
  await super.initialize();
@@ -169540,7 +169772,7 @@ var ElectricalPowerMeasurementServerBase = class extends ElectricalPowerMeasurem
169540
169772
  const entityId = homeAssistant.entityId;
169541
169773
  const powerEntity = homeAssistant.state.mapping?.powerEntity;
169542
169774
  if (powerEntity) {
169543
- logger170.debug(
169775
+ logger171.debug(
169544
169776
  `[${entityId}] ElectricalPowerMeasurement using mapped power entity: ${powerEntity}`
169545
169777
  );
169546
169778
  }
@@ -169640,7 +169872,7 @@ init_home_assistant_entity_behavior();
169640
169872
  // src/matter/behaviors/lock-server.ts
169641
169873
  init_esm();
169642
169874
  init_home_assistant_entity_behavior();
169643
- var logger171 = Logger.get("LockServer");
169875
+ var logger172 = Logger.get("LockServer");
169644
169876
  function hasStoredCredentialHelper(env, entityId) {
169645
169877
  try {
169646
169878
  const storage2 = env.get(LockCredentialStorage);
@@ -169806,7 +170038,7 @@ var LockServerWithPinBase = class extends PinCredentialBase {
169806
170038
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
169807
170039
  const action = this.state.config.lock(void 0, this.agent);
169808
170040
  const hasPinProvided = !!request.pinCode;
169809
- logger171.debug(
170041
+ logger172.debug(
169810
170042
  `lockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}`
169811
170043
  );
169812
170044
  if (request.pinCode) {
@@ -169819,12 +170051,12 @@ var LockServerWithPinBase = class extends PinCredentialBase {
169819
170051
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
169820
170052
  const action = this.state.config.unlock(void 0, this.agent);
169821
170053
  const hasPinProvided = !!request.pinCode;
169822
- logger171.debug(
170054
+ logger172.debug(
169823
170055
  `unlockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}`
169824
170056
  );
169825
170057
  if (this.state.requirePinForRemoteOperation) {
169826
170058
  if (!request.pinCode) {
169827
- logger171.info(
170059
+ logger172.info(
169828
170060
  `unlockDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
169829
170061
  );
169830
170062
  throw new StatusResponseError(
@@ -169834,12 +170066,12 @@ var LockServerWithPinBase = class extends PinCredentialBase {
169834
170066
  }
169835
170067
  const providedPin = new TextDecoder().decode(request.pinCode);
169836
170068
  if (!this.verifyStoredPin(homeAssistant.entityId, providedPin)) {
169837
- logger171.info(
170069
+ logger172.info(
169838
170070
  `unlockDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
169839
170071
  );
169840
170072
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
169841
170073
  }
169842
- logger171.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170074
+ logger172.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
169843
170075
  action.data = { ...action.data, code: providedPin };
169844
170076
  }
169845
170077
  homeAssistant.callAction(action);
@@ -170000,7 +170232,7 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170000
170232
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
170001
170233
  const action = this.state.config.lock(void 0, this.agent);
170002
170234
  const hasPinProvided = !!request.pinCode;
170003
- logger171.debug(
170235
+ logger172.debug(
170004
170236
  `lockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}`
170005
170237
  );
170006
170238
  if (request.pinCode) {
@@ -170014,12 +170246,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170014
170246
  const unlatchConfig = this.state.config.unlatch;
170015
170247
  const action = unlatchConfig ? unlatchConfig(void 0, this.agent) : this.state.config.unlock(void 0, this.agent);
170016
170248
  const hasPinProvided = !!request.pinCode;
170017
- logger171.debug(
170249
+ logger172.debug(
170018
170250
  `unlockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}, usingUnlatch: ${!!unlatchConfig}`
170019
170251
  );
170020
170252
  if (this.state.requirePinForRemoteOperation) {
170021
170253
  if (!request.pinCode) {
170022
- logger171.info(
170254
+ logger172.info(
170023
170255
  `unlockDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
170024
170256
  );
170025
170257
  throw new StatusResponseError(
@@ -170029,12 +170261,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170029
170261
  }
170030
170262
  const providedPin = new TextDecoder().decode(request.pinCode);
170031
170263
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
170032
- logger171.info(
170264
+ logger172.info(
170033
170265
  `unlockDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
170034
170266
  );
170035
170267
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
170036
170268
  }
170037
- logger171.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170269
+ logger172.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170038
170270
  action.data = { ...action.data, code: providedPin };
170039
170271
  }
170040
170272
  homeAssistant.callAction(action);
@@ -170049,12 +170281,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170049
170281
  }
170050
170282
  const action = unlatchConfig(void 0, this.agent);
170051
170283
  const hasPinProvided = !!request.pinCode;
170052
- logger171.debug(
170284
+ logger172.debug(
170053
170285
  `unboltDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}`
170054
170286
  );
170055
170287
  if (this.state.requirePinForRemoteOperation) {
170056
170288
  if (!request.pinCode) {
170057
- logger171.info(
170289
+ logger172.info(
170058
170290
  `unboltDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
170059
170291
  );
170060
170292
  throw new StatusResponseError(
@@ -170064,12 +170296,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170064
170296
  }
170065
170297
  const providedPin = new TextDecoder().decode(request.pinCode);
170066
170298
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
170067
- logger171.info(
170299
+ logger172.info(
170068
170300
  `unboltDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
170069
170301
  );
170070
170302
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
170071
170303
  }
170072
- logger171.debug(`unboltDoor PIN verified for ${homeAssistant.entityId}`);
170304
+ logger172.debug(`unboltDoor PIN verified for ${homeAssistant.entityId}`);
170073
170305
  action.data = { ...action.data, code: providedPin };
170074
170306
  }
170075
170307
  homeAssistant.callAction(action);
@@ -170239,7 +170471,7 @@ init_home_assistant_entity_behavior();
170239
170471
  init_dist();
170240
170472
  init_esm();
170241
170473
  init_home_assistant_entity_behavior();
170242
- var logger172 = Logger.get("MediaPlayerKeypadInputServer");
170474
+ var logger173 = Logger.get("MediaPlayerKeypadInputServer");
170243
170475
  var MediaPlayerKeypadInputServer = class extends KeypadInputServer {
170244
170476
  sendKey(request) {
170245
170477
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
@@ -170250,12 +170482,12 @@ var MediaPlayerKeypadInputServer = class extends KeypadInputServer {
170250
170482
  const features2 = attributes7.supported_features ?? 0;
170251
170483
  const action = this.mapKeyToAction(request.keyCode, features2);
170252
170484
  if (!action) {
170253
- logger172.debug(
170485
+ logger173.debug(
170254
170486
  `Unsupported key code ${request.keyCode} for ${homeAssistant.entityId}`
170255
170487
  );
170256
170488
  return { status: KeypadInput3.Status.UnsupportedKey };
170257
170489
  }
170258
- logger172.debug(
170490
+ logger173.debug(
170259
170491
  `sendKey(${request.keyCode}) \u2192 ${action} for ${homeAssistant.entityId}`
170260
170492
  );
170261
170493
  homeAssistant.callAction({ action });
@@ -170542,7 +170774,7 @@ init_home_assistant_entity_behavior();
170542
170774
  // src/matter/behaviors/speaker-level-control-server.ts
170543
170775
  init_esm();
170544
170776
  init_home_assistant_entity_behavior();
170545
- var logger173 = Logger.get("SpeakerLevelControlServer");
170777
+ var logger174 = Logger.get("SpeakerLevelControlServer");
170546
170778
  var FeaturedBase9 = LevelControlServer.with("OnOff");
170547
170779
  var SpeakerLevelControlServerBase = class extends FeaturedBase9 {
170548
170780
  async initialize() {
@@ -170579,7 +170811,7 @@ var SpeakerLevelControlServerBase = class extends FeaturedBase9 {
170579
170811
  currentLevel = Math.min(Math.max(minLevel, currentLevel), maxLevel);
170580
170812
  }
170581
170813
  const entityId = this.agent.get(HomeAssistantEntityBehavior).entity.entity_id;
170582
- logger173.debug(
170814
+ logger174.debug(
170583
170815
  `[${entityId}] Volume update: HA=${currentLevelPercent != null ? Math.round(currentLevelPercent * 100) : "null"}% -> currentLevel=${currentLevel}`
170584
170816
  );
170585
170817
  applyPatchState(this.state, {
@@ -170617,7 +170849,7 @@ var SpeakerLevelControlServerBase = class extends FeaturedBase9 {
170617
170849
  const config10 = this.state.config;
170618
170850
  const entityId = homeAssistant.entity.entity_id;
170619
170851
  const levelPercent = level / 254;
170620
- logger173.debug(
170852
+ logger174.debug(
170621
170853
  `[${entityId}] Volume command: level=${level} -> HA volume_level=${levelPercent}`
170622
170854
  );
170623
170855
  const current = config10.getValuePercent(
@@ -171194,7 +171426,7 @@ init_home_assistant_entity_behavior();
171194
171426
  // src/matter/behaviors/pressure-measurement-server.ts
171195
171427
  init_esm();
171196
171428
  init_home_assistant_entity_behavior();
171197
- var logger174 = Logger.get("PressureMeasurementServer");
171429
+ var logger175 = Logger.get("PressureMeasurementServer");
171198
171430
  var MIN_PRESSURE = 300;
171199
171431
  var MAX_PRESSURE = 1100;
171200
171432
  var PressureMeasurementServerBase = class extends PressureMeasurementServer {
@@ -171226,7 +171458,7 @@ var PressureMeasurementServerBase = class extends PressureMeasurementServer {
171226
171458
  }
171227
171459
  const rounded = Math.round(value);
171228
171460
  if (rounded < MIN_PRESSURE || rounded > MAX_PRESSURE) {
171229
- logger174.warn(
171461
+ logger175.warn(
171230
171462
  `Pressure value ${rounded} (raw: ${value}) for ${entity.entity_id} is outside valid range [${MIN_PRESSURE}-${MAX_PRESSURE}], ignoring`
171231
171463
  );
171232
171464
  return null;
@@ -171416,7 +171648,7 @@ var TvocConcentrationMeasurementServer = class extends TvocConcentrationMeasurem
171416
171648
  };
171417
171649
 
171418
171650
  // src/matter/endpoints/legacy/sensor/devices/tvoc-sensor.ts
171419
- var logger175 = Logger.get("TvocSensor");
171651
+ var logger176 = Logger.get("TvocSensor");
171420
171652
  function airQualityFromUgm3(value) {
171421
171653
  if (value <= 300) return AirQuality3.AirQualityEnum.Good;
171422
171654
  if (value <= 1e3) return AirQuality3.AirQualityEnum.Fair;
@@ -171458,17 +171690,17 @@ var TvocAirQualityServer = class extends TvocAirQualityServerBase {
171458
171690
  const attributes7 = entity.state.attributes;
171459
171691
  const deviceClass = attributes7.device_class;
171460
171692
  let airQuality = AirQuality3.AirQualityEnum.Unknown;
171461
- logger175.debug(
171693
+ logger176.debug(
171462
171694
  `[${entity.entity_id}] TVOC update: state="${state}", device_class="${deviceClass}"`
171463
171695
  );
171464
171696
  if (state != null && !Number.isNaN(+state)) {
171465
171697
  const value = +state;
171466
171698
  airQuality = deviceClass === SensorDeviceClass.volatile_organic_compounds ? airQualityFromUgm3(value) : airQualityFromPpb(value);
171467
- logger175.debug(
171699
+ logger176.debug(
171468
171700
  `[${entity.entity_id}] TVOC value=${value} (${deviceClass}) -> airQuality=${AirQuality3.AirQualityEnum[airQuality]}`
171469
171701
  );
171470
171702
  } else {
171471
- logger175.warn(
171703
+ logger176.warn(
171472
171704
  `[${entity.entity_id}] TVOC state not a valid number: "${state}"`
171473
171705
  );
171474
171706
  }
@@ -171697,7 +171929,7 @@ init_home_assistant_entity_behavior();
171697
171929
  // src/matter/behaviors/pm25-concentration-measurement-server.ts
171698
171930
  init_esm();
171699
171931
  init_home_assistant_entity_behavior();
171700
- var logger176 = Logger.get("Pm25ConcentrationMeasurementServer");
171932
+ var logger177 = Logger.get("Pm25ConcentrationMeasurementServer");
171701
171933
  var Pm25ConcentrationMeasurementServerBase = Pm25ConcentrationMeasurementServer.with(
171702
171934
  ConcentrationMeasurement3.Feature.NumericMeasurement
171703
171935
  );
@@ -171721,11 +171953,11 @@ var Pm25ConcentrationMeasurementServer2 = class extends Pm25ConcentrationMeasure
171721
171953
  if (this.state.measurementMedium === void 0) {
171722
171954
  this.state.measurementMedium = ConcentrationMeasurement3.MeasurementMedium.Air;
171723
171955
  }
171724
- logger176.debug(
171956
+ logger177.debug(
171725
171957
  "Pm25ConcentrationMeasurementServer: before super.initialize()"
171726
171958
  );
171727
171959
  await super.initialize();
171728
- logger176.debug(
171960
+ logger177.debug(
171729
171961
  "Pm25ConcentrationMeasurementServer: after super.initialize()"
171730
171962
  );
171731
171963
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
@@ -171752,7 +171984,7 @@ var Pm25ConcentrationMeasurementServer2 = class extends Pm25ConcentrationMeasure
171752
171984
  };
171753
171985
 
171754
171986
  // src/matter/endpoints/legacy/sensor/devices/pm25-sensor.ts
171755
- var logger177 = Logger.get("Pm25AirQualityServer");
171987
+ var logger178 = Logger.get("Pm25AirQualityServer");
171756
171988
  var Pm25AirQualityServerBase = AirQualityServer.with(
171757
171989
  AirQuality3.Feature.Fair,
171758
171990
  AirQuality3.Feature.Moderate,
@@ -171764,9 +171996,9 @@ var Pm25AirQualityServer = class extends Pm25AirQualityServerBase {
171764
171996
  if (this.state.airQuality === void 0) {
171765
171997
  this.state.airQuality = AirQuality3.AirQualityEnum.Unknown;
171766
171998
  }
171767
- logger177.debug("Pm25AirQualityServer: before super.initialize()");
171999
+ logger178.debug("Pm25AirQualityServer: before super.initialize()");
171768
172000
  await super.initialize();
171769
- logger177.debug("Pm25AirQualityServer: after super.initialize()");
172001
+ logger178.debug("Pm25AirQualityServer: after super.initialize()");
171770
172002
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
171771
172003
  this.update(homeAssistant.entity);
171772
172004
  if (homeAssistant.state.managedByEndpoint) {
@@ -172110,7 +172342,7 @@ init_home_assistant_entity_behavior();
172110
172342
  init_dist();
172111
172343
  init_esm();
172112
172344
  init_home_assistant_entity_behavior();
172113
- var logger178 = Logger.get("VacuumIdentifyServer");
172345
+ var logger179 = Logger.get("VacuumIdentifyServer");
172114
172346
  var VacuumIdentifyServer = class extends IdentifyServer2 {
172115
172347
  triggerEffect(effect) {
172116
172348
  this.#locate("triggerEffect");
@@ -172127,11 +172359,11 @@ var VacuumIdentifyServer = class extends IdentifyServer2 {
172127
172359
  const features2 = homeAssistant.entity.state.attributes.supported_features ?? 0;
172128
172360
  const hasLocate = testBit(features2, VacuumDeviceFeature.LOCATE);
172129
172361
  if (!hasLocate) {
172130
- logger178.warn(
172362
+ logger179.warn(
172131
172363
  `${source} for ${homeAssistant.entityId} \u2014 LOCATE not in supported_features (${features2}), calling vacuum.locate anyway`
172132
172364
  );
172133
172365
  } else {
172134
- logger178.info(`${source} \u2192 vacuum.locate for ${homeAssistant.entityId}`);
172366
+ logger179.info(`${source} \u2192 vacuum.locate for ${homeAssistant.entityId}`);
172135
172367
  }
172136
172368
  homeAssistant.callAction({ action: "vacuum.locate" });
172137
172369
  }
@@ -172426,11 +172658,11 @@ init_esm();
172426
172658
 
172427
172659
  // src/matter/behaviors/service-area-server.ts
172428
172660
  init_esm();
172429
- var logger179 = Logger.get("ServiceAreaServer");
172661
+ var logger180 = Logger.get("ServiceAreaServer");
172430
172662
  var ServiceAreaServerBase = class extends ServiceAreaBehavior {
172431
172663
  selectAreas(request) {
172432
172664
  const { newAreas } = request;
172433
- logger179.info(
172665
+ logger180.info(
172434
172666
  `ServiceArea selectAreas called with: ${JSON.stringify(newAreas)}`
172435
172667
  );
172436
172668
  const uniqueAreas = [...new Set(newAreas)];
@@ -172439,14 +172671,14 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
172439
172671
  (id) => !supportedAreaIds.includes(id)
172440
172672
  );
172441
172673
  if (invalidAreas.length > 0) {
172442
- logger179.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
172674
+ logger180.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
172443
172675
  return {
172444
172676
  status: ServiceArea3.SelectAreasStatus.UnsupportedArea,
172445
172677
  statusText: `Invalid area IDs: ${invalidAreas.join(", ")}`
172446
172678
  };
172447
172679
  }
172448
172680
  this.state.selectedAreas = uniqueAreas;
172449
- logger179.info(
172681
+ logger180.info(
172450
172682
  `ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
172451
172683
  );
172452
172684
  return {
@@ -172467,7 +172699,7 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
172467
172699
  ServiceAreaServerBase2.State = State;
172468
172700
  })(ServiceAreaServerBase || (ServiceAreaServerBase = {}));
172469
172701
  function ServiceAreaServer2(initialState) {
172470
- logger179.info(
172702
+ logger180.info(
172471
172703
  `Creating ServiceAreaServer with ${initialState.supportedAreas.length} areas`
172472
172704
  );
172473
172705
  return ServiceAreaServerBase.set({
@@ -172480,7 +172712,7 @@ var ServiceAreaWithMaps = ServiceAreaBehavior.with(ServiceArea3.Feature.Maps);
172480
172712
  var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
172481
172713
  selectAreas(request) {
172482
172714
  const { newAreas } = request;
172483
- logger179.info(
172715
+ logger180.info(
172484
172716
  `ServiceArea selectAreas called with: ${JSON.stringify(newAreas)}`
172485
172717
  );
172486
172718
  const uniqueAreas = [...new Set(newAreas)];
@@ -172489,14 +172721,14 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
172489
172721
  (id) => !supportedAreaIds.includes(id)
172490
172722
  );
172491
172723
  if (invalidAreas.length > 0) {
172492
- logger179.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
172724
+ logger180.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
172493
172725
  return {
172494
172726
  status: ServiceArea3.SelectAreasStatus.UnsupportedArea,
172495
172727
  statusText: `Invalid area IDs: ${invalidAreas.join(", ")}`
172496
172728
  };
172497
172729
  }
172498
172730
  this.state.selectedAreas = uniqueAreas;
172499
- logger179.info(
172731
+ logger180.info(
172500
172732
  `ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
172501
172733
  );
172502
172734
  return {
@@ -172517,14 +172749,14 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
172517
172749
  ServiceAreaServerWithMapsBase2.State = State;
172518
172750
  })(ServiceAreaServerWithMapsBase || (ServiceAreaServerWithMapsBase = {}));
172519
172751
  function ServiceAreaServerWithMaps(initialState) {
172520
- logger179.info(
172752
+ logger180.info(
172521
172753
  `Creating ServiceAreaServer with Maps: ${initialState.supportedAreas.length} areas, ${initialState.supportedMaps.length} maps`
172522
172754
  );
172523
172755
  for (const map of initialState.supportedMaps) {
172524
172756
  const areaCount = initialState.supportedAreas.filter(
172525
172757
  (a) => a.mapId === map.mapId
172526
172758
  ).length;
172527
- logger179.info(` Map ${map.mapId}: "${map.name}" (${areaCount} areas)`);
172759
+ logger180.info(` Map ${map.mapId}: "${map.name}" (${areaCount} areas)`);
172528
172760
  }
172529
172761
  return ServiceAreaServerWithMapsBase.set({
172530
172762
  supportedAreas: initialState.supportedAreas,
@@ -172535,7 +172767,7 @@ function ServiceAreaServerWithMaps(initialState) {
172535
172767
  }
172536
172768
 
172537
172769
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-service-area-server.ts
172538
- var logger180 = Logger.get("VacuumServiceAreaServer");
172770
+ var logger181 = Logger.get("VacuumServiceAreaServer");
172539
172771
  function toAreaId(roomId) {
172540
172772
  if (typeof roomId === "number") {
172541
172773
  return roomId;
@@ -172614,13 +172846,13 @@ function createVacuumServiceAreaServer(attributes7, roomEntities, includeUnnamed
172614
172846
  let rooms;
172615
172847
  if (roomEntities && roomEntities.length > 0) {
172616
172848
  rooms = buttonEntitiesToRooms(roomEntities, attributes7);
172617
- logger180.info(
172849
+ logger181.info(
172618
172850
  `Using ${rooms.length} button entities as rooms: ${rooms.map((r) => r.name).join(", ")}`
172619
172851
  );
172620
172852
  } else {
172621
172853
  rooms = parseVacuumRooms(attributes7, includeUnnamedRooms);
172622
172854
  if (rooms.length > 0) {
172623
- logger180.info(
172855
+ logger181.info(
172624
172856
  `Using ${rooms.length} rooms from attributes: ${rooms.map((r) => r.name).join(", ")}`
172625
172857
  );
172626
172858
  }
@@ -172674,7 +172906,7 @@ function createCustomServiceAreaServer(customAreas) {
172674
172906
  landmarkInfo: null
172675
172907
  }
172676
172908
  }));
172677
- logger180.info(
172909
+ logger181.info(
172678
172910
  `Using ${customAreas.length} custom service areas: ${customAreas.map((a) => a.name).join(", ")}`
172679
172911
  );
172680
172912
  return ServiceAreaServer2({
@@ -172685,7 +172917,7 @@ function createCustomServiceAreaServer(customAreas) {
172685
172917
  }
172686
172918
 
172687
172919
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-run-mode-server.ts
172688
- var logger181 = Logger.get("VacuumRvcRunModeServer");
172920
+ var logger182 = Logger.get("VacuumRvcRunModeServer");
172689
172921
  function buildSupportedModes2(attributes7, includeUnnamedRooms = false, customAreas) {
172690
172922
  const modes = [
172691
172923
  {
@@ -172731,12 +172963,12 @@ function handleCustomServiceAreas(selectedAreas, customAreas, homeAssistant, ser
172731
172963
  const matched = selectedAreas.map((areaId) => customAreas[areaId - 1]).filter(Boolean);
172732
172964
  serviceArea.state.selectedAreas = [];
172733
172965
  if (matched.length === 0) {
172734
- logger181.warn(
172966
+ logger182.warn(
172735
172967
  `Custom service areas: no match for selected IDs ${selectedAreas.join(", ")}`
172736
172968
  );
172737
172969
  return { action: "vacuum.start" };
172738
172970
  }
172739
- logger181.info(
172971
+ logger182.info(
172740
172972
  `Custom service areas: calling ${matched.length} service(s): ${matched.map((a) => `${a.service} (${a.name})`).join(", ")}`
172741
172973
  );
172742
172974
  for (let i = 1; i < matched.length; i++) {
@@ -172765,7 +172997,7 @@ var vacuumRvcRunModeConfig = {
172765
172997
  VacuumState.mop_cleaning
172766
172998
  ];
172767
172999
  const isCleaning = cleaningStates.includes(state);
172768
- logger181.debug(
173000
+ logger182.debug(
172769
173001
  `Vacuum state: "${state}", isCleaning: ${isCleaning}, currentMode: ${isCleaning ? "Cleaning" : "Idle"}`
172770
173002
  );
172771
173003
  return isCleaning ? 1 /* Cleaning */ : 0 /* Idle */;
@@ -172804,7 +173036,7 @@ var vacuumRvcRunModeConfig = {
172804
173036
  }
172805
173037
  }
172806
173038
  if (buttonEntityIds.length > 0) {
172807
- logger181.info(
173039
+ logger182.info(
172808
173040
  `Roborock: Pressing button entities for selected rooms: ${buttonEntityIds.join(", ")}`
172809
173041
  );
172810
173042
  serviceArea.state.selectedAreas = [];
@@ -172833,14 +173065,14 @@ var vacuumRvcRunModeConfig = {
172833
173065
  }
172834
173066
  }
172835
173067
  if (roomIds.length > 0) {
172836
- logger181.info(
173068
+ logger182.info(
172837
173069
  `Starting cleaning with selected areas: ${roomIds.join(", ")}`
172838
173070
  );
172839
173071
  serviceArea.state.selectedAreas = [];
172840
173072
  const vacuumEntityId = homeAssistant.entityId;
172841
173073
  if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
172842
173074
  const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
172843
- logger181.info(
173075
+ logger182.info(
172844
173076
  `Valetudo vacuum: Using mqtt.publish segment_cleanup for rooms: ${roomIds.join(", ")}`
172845
173077
  );
172846
173078
  return {
@@ -172860,7 +173092,7 @@ var vacuumRvcRunModeConfig = {
172860
173092
  if (targetMapName) {
172861
173093
  const vacName = vacuumEntityId.replace("vacuum.", "");
172862
173094
  const selectedMapEntity = `select.${vacName}_selected_map`;
172863
- logger181.info(
173095
+ logger182.info(
172864
173096
  `Dreame multi-floor: switching to map "${targetMapName}" via ${selectedMapEntity}`
172865
173097
  );
172866
173098
  homeAssistant.callAction({
@@ -172887,7 +173119,7 @@ var vacuumRvcRunModeConfig = {
172887
173119
  }
172888
173120
  if (isEcovacsVacuum(attributes7)) {
172889
173121
  const roomIdStr = roomIds.join(",");
172890
- logger181.info(
173122
+ logger182.info(
172891
173123
  `Ecovacs vacuum: Using spot_area for rooms: ${roomIdStr}`
172892
173124
  );
172893
173125
  return {
@@ -172902,14 +173134,14 @@ var vacuumRvcRunModeConfig = {
172902
173134
  }
172903
173135
  };
172904
173136
  }
172905
- logger181.warn(
173137
+ logger182.warn(
172906
173138
  `Room cleaning via send_command not supported for this vacuum type. Rooms: ${roomIds.join(", ")}. Falling back to vacuum.start`
172907
173139
  );
172908
173140
  }
172909
173141
  }
172910
173142
  } catch {
172911
173143
  }
172912
- logger181.info("Starting regular cleaning (no areas selected)");
173144
+ logger182.info("Starting regular cleaning (no areas selected)");
172913
173145
  return { action: "vacuum.start" };
172914
173146
  },
172915
173147
  returnToBase: () => ({ action: "vacuum.return_to_base" }),
@@ -172924,7 +173156,7 @@ var vacuumRvcRunModeConfig = {
172924
173156
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
172925
173157
  const entity = homeAssistant.entity;
172926
173158
  const attributes7 = entity.state.attributes;
172927
- logger181.info(`cleanRoom called: roomMode=${roomMode}`);
173159
+ logger182.info(`cleanRoom called: roomMode=${roomMode}`);
172928
173160
  const customAreas = homeAssistant.state.mapping?.customServiceAreas;
172929
173161
  if (customAreas && customAreas.length > 0) {
172930
173162
  const sorted = [...customAreas].sort(
@@ -172933,7 +173165,7 @@ var vacuumRvcRunModeConfig = {
172933
173165
  const areaIndex = roomMode - ROOM_MODE_BASE2 - 1;
172934
173166
  if (areaIndex >= 0 && areaIndex < sorted.length) {
172935
173167
  const area = sorted[areaIndex];
172936
- logger181.info(
173168
+ logger182.info(
172937
173169
  `cleanRoom: custom service area "${area.name}" \u2192 ${area.service}`
172938
173170
  );
172939
173171
  return {
@@ -172945,7 +173177,7 @@ var vacuumRvcRunModeConfig = {
172945
173177
  }
172946
173178
  const rooms = parseVacuumRooms(attributes7);
172947
173179
  const numericIdFromMode = getRoomIdFromMode(roomMode);
172948
- logger181.info(
173180
+ logger182.info(
172949
173181
  `cleanRoom: numericIdFromMode=${numericIdFromMode}, available rooms: ${JSON.stringify(rooms.map((r) => ({ id: r.id, name: r.name, modeValue: getRoomModeValue(r) })))}`
172950
173182
  );
172951
173183
  const room = rooms.find((r) => getRoomModeValue(r) === roomMode);
@@ -172954,7 +173186,7 @@ var vacuumRvcRunModeConfig = {
172954
173186
  const vacuumEntityId = entity.entity_id;
172955
173187
  if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
172956
173188
  const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
172957
- logger181.info(
173189
+ logger182.info(
172958
173190
  `Valetudo vacuum: Using mqtt.publish segment_cleanup for room ${room.name} (id: ${commandId3})`
172959
173191
  );
172960
173192
  return {
@@ -172974,7 +173206,7 @@ var vacuumRvcRunModeConfig = {
172974
173206
  if (room.mapName) {
172975
173207
  const vacuumName = vacuumEntityId.replace("vacuum.", "");
172976
173208
  const selectedMapEntity = `select.${vacuumName}_selected_map`;
172977
- logger181.info(
173209
+ logger182.info(
172978
173210
  `Dreame multi-floor: switching to map "${room.mapName}" via ${selectedMapEntity}`
172979
173211
  );
172980
173212
  homeAssistant.callAction({
@@ -172983,7 +173215,7 @@ var vacuumRvcRunModeConfig = {
172983
173215
  data: { option: room.mapName }
172984
173216
  });
172985
173217
  }
172986
- logger181.debug(
173218
+ logger182.debug(
172987
173219
  `Dreame vacuum detected, using dreame_vacuum.vacuum_clean_segment for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
172988
173220
  );
172989
173221
  return {
@@ -172994,7 +173226,7 @@ var vacuumRvcRunModeConfig = {
172994
173226
  };
172995
173227
  }
172996
173228
  if (isRoborockVacuum(attributes7) || isXiaomiMiotVacuum(attributes7)) {
172997
- logger181.debug(
173229
+ logger182.debug(
172998
173230
  `Using vacuum.send_command with app_segment_clean for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
172999
173231
  );
173000
173232
  return {
@@ -173007,7 +173239,7 @@ var vacuumRvcRunModeConfig = {
173007
173239
  }
173008
173240
  if (isEcovacsVacuum(attributes7)) {
173009
173241
  const roomIdStr = String(commandId3);
173010
- logger181.info(
173242
+ logger182.info(
173011
173243
  `Ecovacs vacuum: Using spot_area for room ${room.name} (id: ${roomIdStr})`
173012
173244
  );
173013
173245
  return {
@@ -173022,7 +173254,7 @@ var vacuumRvcRunModeConfig = {
173022
173254
  }
173023
173255
  };
173024
173256
  }
173025
- logger181.warn(
173257
+ logger182.warn(
173026
173258
  `Room cleaning via send_command not supported for this vacuum type. Room: ${room.name} (id=${commandId3}). Falling back to vacuum.start`
173027
173259
  );
173028
173260
  }
@@ -173038,20 +173270,20 @@ function createVacuumRvcRunModeServer(attributes7, includeUnnamedRooms = false,
173038
173270
  includeUnnamedRooms,
173039
173271
  customAreas
173040
173272
  );
173041
- logger181.info(
173273
+ logger182.info(
173042
173274
  `Creating VacuumRvcRunModeServer with ${rooms.length} rooms, ${supportedModes.length} total modes`
173043
173275
  );
173044
173276
  if (rooms.length > 0) {
173045
- logger181.info(`Rooms found: ${rooms.map((r) => r.name).join(", ")}`);
173277
+ logger182.info(`Rooms found: ${rooms.map((r) => r.name).join(", ")}`);
173046
173278
  }
173047
173279
  if (filteredCount > 0) {
173048
173280
  const filtered = allRooms.filter((r) => !rooms.some((x) => x.id === r.id));
173049
- logger181.info(
173281
+ logger182.info(
173050
173282
  `Filtered out ${filteredCount} unnamed room(s): ${filtered.map((r) => r.name).join(", ")}`
173051
173283
  );
173052
173284
  }
173053
173285
  if (allRooms.length === 0) {
173054
- logger181.debug(
173286
+ logger182.debug(
173055
173287
  `No rooms found. Attributes: rooms=${JSON.stringify(attributes7.rooms)}, segments=${JSON.stringify(attributes7.segments)}, room_list=${attributes7.room_list}`
173056
173288
  );
173057
173289
  }
@@ -173109,7 +173341,7 @@ init_rvc_clean_mode();
173109
173341
 
173110
173342
  // src/matter/behaviors/rvc-clean-mode-server.ts
173111
173343
  init_home_assistant_entity_behavior();
173112
- var logger182 = Logger.get("RvcCleanModeServerBase");
173344
+ var logger183 = Logger.get("RvcCleanModeServerBase");
173113
173345
  var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeServer {
173114
173346
  // Pending mode from a recent changeToMode command.
173115
173347
  // Prevents stale HA state (from a different entity like select.xxx)
@@ -173156,14 +173388,14 @@ var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeS
173156
173388
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
173157
173389
  const { newMode } = request;
173158
173390
  if (newMode !== this.state.currentMode && !this.state.supportedModes.some((m) => m.mode === newMode)) {
173159
- logger182.warn(`changeToMode(${newMode}) rejected: unsupported mode`);
173391
+ logger183.warn(`changeToMode(${newMode}) rejected: unsupported mode`);
173160
173392
  return {
173161
173393
  status: ModeBase3.ModeChangeStatus.UnsupportedMode,
173162
173394
  statusText: `Unsupported mode: ${newMode}`
173163
173395
  };
173164
173396
  }
173165
173397
  const modeLabel = this.state.supportedModes.find((m) => m.mode === newMode);
173166
- logger182.info(
173398
+ logger183.info(
173167
173399
  `changeToMode(${newMode}) "${modeLabel?.label ?? "unknown"}" for ${homeAssistant.entityId}`
173168
173400
  );
173169
173401
  this.pendingMode = newMode;
@@ -173171,7 +173403,7 @@ var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeS
173171
173403
  this.state.currentMode = newMode;
173172
173404
  const action = this.state.config.setCleanMode(newMode, this.agent);
173173
173405
  if (action) {
173174
- logger182.info(
173406
+ logger183.info(
173175
173407
  `changeToMode: dispatching action ${action.action} \u2192 ${action.target ?? homeAssistant.entityId}`
173176
173408
  );
173177
173409
  homeAssistant.callAction(action);
@@ -173204,7 +173436,7 @@ function RvcCleanModeServer2(config10, initialState) {
173204
173436
  }
173205
173437
 
173206
173438
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-clean-mode-server.ts
173207
- var logger183 = Logger.get("VacuumRvcCleanModeServer");
173439
+ var logger184 = Logger.get("VacuumRvcCleanModeServer");
173208
173440
  var MODE_VACUUM = 0;
173209
173441
  var MODE_VACUUM_AND_MOP = 1;
173210
173442
  var MODE_MOP = 2;
@@ -173503,7 +173735,7 @@ function findMatchingCleanOption(ct, availableOptions) {
173503
173735
  if (match) return match;
173504
173736
  }
173505
173737
  }
173506
- logger183.warn(
173738
+ logger184.warn(
173507
173739
  `No match for ${CLEAN_TYPE_LABELS[ct]} in [${availableOptions.join(", ")}]`
173508
173740
  );
173509
173741
  return aliases[0];
@@ -173512,7 +173744,7 @@ function buildCleaningModeAction(targetCleanType, agent) {
173512
173744
  const selectEntityId = getCleaningModeSelectEntity(agent);
173513
173745
  const { options } = readSelectEntity(selectEntityId, agent);
173514
173746
  const optionToUse = findMatchingCleanOption(targetCleanType, options);
173515
- logger183.info(
173747
+ logger184.info(
173516
173748
  `Switching cleaning mode to: ${optionToUse} via ${selectEntityId}`
173517
173749
  );
173518
173750
  return {
@@ -173601,7 +173833,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173601
173833
  }
173602
173834
  }
173603
173835
  if (speedMode !== void 0) {
173604
- logger183.debug(
173836
+ logger184.debug(
173605
173837
  `Current mode: Vacuum + fan_speed="${speedState}" -> mode ${speedMode}`
173606
173838
  );
173607
173839
  return speedMode;
@@ -173622,7 +173854,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173622
173854
  }
173623
173855
  }
173624
173856
  if (mopMode !== void 0) {
173625
- logger183.debug(
173857
+ logger184.debug(
173626
173858
  `Current mode: Mop + intensity="${state}" -> mode ${mopMode}`
173627
173859
  );
173628
173860
  return mopMode;
@@ -173640,14 +173872,14 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173640
173872
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
173641
173873
  const vacuumEntityId = homeAssistant.entityId;
173642
173874
  const mapping = homeAssistant.state.mapping;
173643
- logger183.info(
173875
+ logger184.info(
173644
173876
  `setCleanMode(${mode}) for ${vacuumEntityId} \u2014 suctionEntity=${mapping?.suctionLevelEntity ?? "none"}, mopEntity=${mapping?.mopIntensityEntity ?? "none"}, fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])}, customTags=${JSON.stringify(customFanSpeedTags ?? {})}`
173645
173877
  );
173646
173878
  if (mopIntensityList && mopIntensityList.length > 0 && isMopIntensityMode(mode)) {
173647
173879
  const mopIndex = mode - MOP_INTENSITY_MODE_BASE;
173648
173880
  const mopName = mopIntensityList[mopIndex];
173649
173881
  if (!mopName) {
173650
- logger183.warn(`Invalid mop intensity mode index: ${mopIndex}`);
173882
+ logger184.warn(`Invalid mop intensity mode index: ${mopIndex}`);
173651
173883
  return void 0;
173652
173884
  }
173653
173885
  if (hasCleanTypes) {
@@ -173660,18 +173892,18 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173660
173892
  mapping.mopIntensityEntity,
173661
173893
  agent
173662
173894
  );
173663
- logger183.info(
173895
+ logger184.info(
173664
173896
  `Mop intensity entity ${mapping.mopIntensityEntity}: current="${state}", options=${JSON.stringify(options ?? [])}`
173665
173897
  );
173666
173898
  let option = matchMopIntensityOption(mopName, options);
173667
173899
  if (!option && options && mopIndex < options.length) {
173668
173900
  option = options[mopIndex];
173669
- logger183.info(
173901
+ logger184.info(
173670
173902
  `Positional match for mop "${mopName}" -> "${option}" (index ${mopIndex})`
173671
173903
  );
173672
173904
  }
173673
173905
  if (option) {
173674
- logger183.info(
173906
+ logger184.info(
173675
173907
  `Setting mop intensity to: ${option} via ${mapping.mopIntensityEntity}`
173676
173908
  );
173677
173909
  return {
@@ -173680,11 +173912,11 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173680
173912
  target: mapping.mopIntensityEntity
173681
173913
  };
173682
173914
  }
173683
- logger183.warn(
173915
+ logger184.warn(
173684
173916
  `No match for mop intensity "${mopName}" in options: [${(options ?? []).join(", ")}]`
173685
173917
  );
173686
173918
  } else {
173687
- logger183.warn(
173919
+ logger184.warn(
173688
173920
  `Mop intensity mode ${mode} requested but no mopIntensityEntity configured`
173689
173921
  );
173690
173922
  }
@@ -173694,7 +173926,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173694
173926
  const fanSpeedIndex = mode - FAN_SPEED_MODE_BASE;
173695
173927
  const fanSpeedName = fanSpeedList[fanSpeedIndex];
173696
173928
  if (!fanSpeedName) {
173697
- logger183.warn(`Invalid fan speed mode index: ${fanSpeedIndex}`);
173929
+ logger184.warn(`Invalid fan speed mode index: ${fanSpeedIndex}`);
173698
173930
  return void 0;
173699
173931
  }
173700
173932
  if (mapping?.suctionLevelEntity) {
@@ -173707,7 +173939,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173707
173939
  mapping.suctionLevelEntity,
173708
173940
  agent
173709
173941
  );
173710
- logger183.info(
173942
+ logger184.info(
173711
173943
  `Suction entity ${mapping.suctionLevelEntity}: current="${state}", options=${JSON.stringify(options ?? [])}`
173712
173944
  );
173713
173945
  let option = matchFanSpeedOption(
@@ -173717,12 +173949,12 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173717
173949
  );
173718
173950
  if (!option && options && fanSpeedIndex < options.length) {
173719
173951
  option = options[fanSpeedIndex];
173720
- logger183.info(
173952
+ logger184.info(
173721
173953
  `Positional match for fan "${fanSpeedName}" -> "${option}" (index ${fanSpeedIndex})`
173722
173954
  );
173723
173955
  }
173724
173956
  if (option) {
173725
- logger183.info(
173957
+ logger184.info(
173726
173958
  `Setting suction to: ${option} via ${mapping.suctionLevelEntity}`
173727
173959
  );
173728
173960
  return {
@@ -173731,7 +173963,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173731
173963
  target: mapping.suctionLevelEntity
173732
173964
  };
173733
173965
  }
173734
- logger183.warn(
173966
+ logger184.warn(
173735
173967
  `No match for fan speed "${fanSpeedName}" in suction options: [${(options ?? []).join(", ")}]`
173736
173968
  );
173737
173969
  return void 0;
@@ -173741,7 +173973,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173741
173973
  buildCleaningModeAction(0 /* Sweeping */, agent)
173742
173974
  );
173743
173975
  }
173744
- logger183.info(
173976
+ logger184.info(
173745
173977
  `Setting fan speed to: ${fanSpeedName} via vacuum.set_fan_speed`
173746
173978
  );
173747
173979
  return {
@@ -173751,7 +173983,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173751
173983
  };
173752
173984
  }
173753
173985
  if (!hasCleanTypes) {
173754
- logger183.debug(
173986
+ logger184.debug(
173755
173987
  `Ignoring cleaning type change (mode=${mode}): no cleaning mode entity`
173756
173988
  );
173757
173989
  return void 0;
@@ -173763,7 +173995,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173763
173995
  agent
173764
173996
  );
173765
173997
  const optionToUse = findMatchingCleanOption(cleanType, availableOptions);
173766
- logger183.info(
173998
+ logger184.info(
173767
173999
  `Setting cleaning mode to: ${optionToUse} (mode=${mode}) via ${selectEntityId}`
173768
174000
  );
173769
174001
  return {
@@ -173781,10 +174013,10 @@ function createVacuumRvcCleanModeServer(_attributes, fanSpeedList, mopIntensityL
173781
174013
  cleaningModeOptions,
173782
174014
  customFanSpeedTags
173783
174015
  );
173784
- logger183.info(
174016
+ logger184.info(
173785
174017
  `Creating VacuumRvcCleanModeServer with ${supportedModes.length} modes (fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])}, cleaningModeOptions=${JSON.stringify(cleaningModeOptions ?? [])}, customTags=${JSON.stringify(customFanSpeedTags ?? {})})`
173786
174018
  );
173787
- logger183.info(
174019
+ logger184.info(
173788
174020
  `Modes: ${supportedModes.map((m) => `${m.mode}:${m.label}[${m.modeTags.map((t) => t.value).join(",")}]`).join(", ")}`
173789
174021
  );
173790
174022
  const initialState = {
@@ -173862,7 +174094,7 @@ init_rvc_operational_state();
173862
174094
  init_home_assistant_entity_behavior();
173863
174095
  var OperationalState4 = RvcOperationalState3.OperationalState;
173864
174096
  var ErrorState = RvcOperationalState3.ErrorState;
173865
- var logger184 = Logger.get("RvcOperationalStateServer");
174097
+ var logger185 = Logger.get("RvcOperationalStateServer");
173866
174098
  var activeStates = /* @__PURE__ */ new Set([
173867
174099
  OperationalState4.Running,
173868
174100
  OperationalState4.SeekingCharger
@@ -173908,7 +174140,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
173908
174140
  }
173909
174141
  });
173910
174142
  if (activeStates.has(previousState) && !activeStates.has(newState)) {
173911
- logger184.info(
174143
+ logger185.info(
173912
174144
  `Operation completed: ${OperationalState4[previousState]} -> ${OperationalState4[newState]}`
173913
174145
  );
173914
174146
  try {
@@ -173921,7 +174153,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
173921
174153
  this.context
173922
174154
  );
173923
174155
  } catch (e) {
173924
- logger184.debug("Failed to emit operationCompletion event:", e);
174156
+ logger185.debug("Failed to emit operationCompletion event:", e);
173925
174157
  }
173926
174158
  }
173927
174159
  }
@@ -173956,7 +174188,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
173956
174188
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
173957
174189
  homeAssistant.callAction(goHomeAction(void 0, this.agent));
173958
174190
  } else {
173959
- logger184.warn("GoHome command received but no goHome action configured");
174191
+ logger185.warn("GoHome command received but no goHome action configured");
173960
174192
  }
173961
174193
  return {
173962
174194
  commandResponseState: {
@@ -173976,7 +174208,7 @@ function RvcOperationalStateServer2(config10) {
173976
174208
  }
173977
174209
 
173978
174210
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-operational-state-server.ts
173979
- var logger185 = Logger.get("VacuumRvcOperationalStateServer");
174211
+ var logger186 = Logger.get("VacuumRvcOperationalStateServer");
173980
174212
  function isCharging(entity) {
173981
174213
  const attrs = entity.attributes;
173982
174214
  if (attrs.battery_icon?.includes("charging")) return true;
@@ -174018,16 +174250,16 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
174018
174250
  operationalState = RvcOperationalState3.OperationalState.Error;
174019
174251
  } else {
174020
174252
  if (state.toLowerCase().includes("clean")) {
174021
- logger185.info(
174253
+ logger186.info(
174022
174254
  `Unknown vacuum state "${state}" contains 'clean', treating as Running`
174023
174255
  );
174024
174256
  operationalState = RvcOperationalState3.OperationalState.Running;
174025
174257
  } else {
174026
- logger185.info(`Unknown vacuum state "${state}", treating as Paused`);
174258
+ logger186.info(`Unknown vacuum state "${state}", treating as Paused`);
174027
174259
  operationalState = RvcOperationalState3.OperationalState.Paused;
174028
174260
  }
174029
174261
  }
174030
- logger185.debug(
174262
+ logger186.debug(
174031
174263
  `Vacuum operationalState: "${state}" -> ${RvcOperationalState3.OperationalState[operationalState]}`
174032
174264
  );
174033
174265
  return operationalState;
@@ -174048,7 +174280,7 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
174048
174280
  });
174049
174281
 
174050
174282
  // src/matter/endpoints/legacy/vacuum/index.ts
174051
- var logger186 = Logger.get("VacuumDevice");
174283
+ var logger187 = Logger.get("VacuumDevice");
174052
174284
  var VacuumEndpointType = RoboticVacuumCleanerDevice.with(
174053
174285
  BasicInformationServer2,
174054
174286
  VacuumIdentifyServer,
@@ -174062,7 +174294,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174062
174294
  const entityId = homeAssistantEntity.entity.entity_id;
174063
174295
  const attributes7 = homeAssistantEntity.entity.state.attributes;
174064
174296
  const customAreas = homeAssistantEntity.mapping?.customServiceAreas;
174065
- logger186.info(
174297
+ logger187.info(
174066
174298
  `Creating vacuum endpoint for ${entityId}, mapping: ${JSON.stringify(homeAssistantEntity.mapping ?? "none")}`
174067
174299
  );
174068
174300
  let device = VacuumEndpointType.with(
@@ -174073,7 +174305,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174073
174305
  )
174074
174306
  ).set({ homeAssistantEntity });
174075
174307
  if (includeOnOff) {
174076
- logger186.info(`${entityId}: Adding OnOff cluster (vacuumOnOff flag enabled)`);
174308
+ logger187.info(`${entityId}: Adding OnOff cluster (vacuumOnOff flag enabled)`);
174077
174309
  device = device.with(VacuumOnOffServer);
174078
174310
  }
174079
174311
  if (!minimalClusters) {
@@ -174081,24 +174313,24 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174081
174313
  }
174082
174314
  const roomEntities = homeAssistantEntity.mapping?.roomEntities;
174083
174315
  const rooms = parseVacuumRooms(attributes7);
174084
- logger186.info(
174316
+ logger187.info(
174085
174317
  `${entityId}: customAreas=${customAreas?.length ?? 0}, roomEntities=${JSON.stringify(roomEntities ?? [])}, parsedRooms=${rooms.length}`
174086
174318
  );
174087
174319
  if (customAreas && customAreas.length > 0) {
174088
- logger186.info(
174320
+ logger187.info(
174089
174321
  `${entityId}: Adding ServiceArea (${customAreas.length} custom areas)`
174090
174322
  );
174091
174323
  device = device.with(createCustomServiceAreaServer(customAreas));
174092
174324
  } else if (rooms.length > 0 || roomEntities && roomEntities.length > 0) {
174093
- logger186.info(`${entityId}: Adding ServiceArea (${rooms.length} rooms)`);
174325
+ logger187.info(`${entityId}: Adding ServiceArea (${rooms.length} rooms)`);
174094
174326
  device = device.with(
174095
174327
  createVacuumServiceAreaServer(attributes7, roomEntities)
174096
174328
  );
174097
174329
  } else if (!minimalClusters) {
174098
- logger186.info(`${entityId}: Adding ServiceArea (default single-area)`);
174330
+ logger187.info(`${entityId}: Adding ServiceArea (default single-area)`);
174099
174331
  device = device.with(createDefaultServiceAreaServer());
174100
174332
  } else {
174101
- logger186.info(`${entityId}: Skipping ServiceArea (minimal clusters mode)`);
174333
+ logger187.info(`${entityId}: Skipping ServiceArea (minimal clusters mode)`);
174102
174334
  }
174103
174335
  const fanSpeedList = resolveFanSpeedList(
174104
174336
  attributes7,
@@ -174108,7 +174340,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174108
174340
  homeAssistantEntity.mapping?.mopIntensityEntity
174109
174341
  );
174110
174342
  if (cleaningModeOptions || fanSpeedList || mopIntensityList) {
174111
- logger186.info(
174343
+ logger187.info(
174112
174344
  `${entityId}: Adding RvcCleanMode (multi-mode, cleaningModeOptions=${JSON.stringify(cleaningModeOptions ?? [])}, fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])})`
174113
174345
  );
174114
174346
  device = device.with(
@@ -174121,7 +174353,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174121
174353
  )
174122
174354
  );
174123
174355
  } else {
174124
- logger186.info(`${entityId}: Adding RvcCleanMode (default single-mode)`);
174356
+ logger187.info(`${entityId}: Adding RvcCleanMode (default single-mode)`);
174125
174357
  device = device.with(createDefaultRvcCleanModeServer());
174126
174358
  }
174127
174359
  return device;
@@ -174280,7 +174512,7 @@ var WaterHeaterThermostatServer = ThermostatServer2(
174280
174512
  );
174281
174513
 
174282
174514
  // src/matter/endpoints/legacy/water-heater/index.ts
174283
- var logger187 = Logger.get("WaterHeaterDevice");
174515
+ var logger188 = Logger.get("WaterHeaterDevice");
174284
174516
  var WaterHeaterDeviceType = ThermostatDevice.with(
174285
174517
  BasicInformationServer2,
174286
174518
  IdentifyServer2,
@@ -174296,7 +174528,7 @@ function toMatterTemp2(value) {
174296
174528
  }
174297
174529
  function WaterHeaterDevice(homeAssistantEntity) {
174298
174530
  const attributes7 = homeAssistantEntity.entity.state.attributes;
174299
- logger187.debug(
174531
+ logger188.debug(
174300
174532
  `Creating device for ${homeAssistantEntity.entity.entity_id}, min_temp=${attributes7.min_temp}, max_temp=${attributes7.max_temp}`
174301
174533
  );
174302
174534
  const minLimit = toMatterTemp2(attributes7.min_temp) ?? 0;
@@ -174464,16 +174696,16 @@ var matterDeviceTypeFactories = {
174464
174696
  // src/matter/endpoints/domains/auto-mapping.ts
174465
174697
  init_dist();
174466
174698
  init_esm();
174467
- var logger188 = Logger.get("AutoMapping");
174699
+ var logger189 = Logger.get("AutoMapping");
174468
174700
  function shouldSkipAutoAssigned(registry2, entityId) {
174469
174701
  if (registry2.isAutoBatteryMappingEnabled() && registry2.isBatteryEntityUsed(entityId)) {
174470
- logger188.debug(
174702
+ logger189.debug(
174471
174703
  `Skipping ${entityId} - already auto-assigned as battery to another device`
174472
174704
  );
174473
174705
  return true;
174474
174706
  }
174475
174707
  if (registry2.isAutoHumidityMappingEnabled() && registry2.isHumidityEntityUsed(entityId)) {
174476
- logger188.debug(
174708
+ logger189.debug(
174477
174709
  `Skipping ${entityId} - already auto-assigned as humidity to a temperature sensor`
174478
174710
  );
174479
174711
  return true;
@@ -174500,7 +174732,7 @@ function computeAutoMapping(registry2, entityId, mapping) {
174500
174732
  humidityEntity: humidityEntityId
174501
174733
  };
174502
174734
  registry2.markHumidityEntityUsed(humidityEntityId);
174503
- logger188.debug(
174735
+ logger189.debug(
174504
174736
  `Auto-assigned humidity ${humidityEntityId} to ${entityId}`
174505
174737
  );
174506
174738
  }
@@ -174517,7 +174749,7 @@ function computeAutoMapping(registry2, entityId, mapping) {
174517
174749
  batteryEntity: batteryEntityId
174518
174750
  };
174519
174751
  registry2.markBatteryEntityUsed(batteryEntityId);
174520
- logger188.debug(`Auto-assigned battery ${batteryEntityId} to ${entityId}`);
174752
+ logger189.debug(`Auto-assigned battery ${batteryEntityId} to ${entityId}`);
174521
174753
  }
174522
174754
  }
174523
174755
  return effectiveMapping;
@@ -174542,7 +174774,7 @@ function createEndpointId(entityId, customName) {
174542
174774
  }
174543
174775
 
174544
174776
  // src/matter/endpoints/domain-endpoint.ts
174545
- var logger189 = Logger.get("DomainEndpoint");
174777
+ var logger190 = Logger.get("DomainEndpoint");
174546
174778
  var DomainEndpoint = class extends EntityEndpoint {
174547
174779
  registry;
174548
174780
  mapping;
@@ -174563,7 +174795,7 @@ var DomainEndpoint = class extends EntityEndpoint {
174563
174795
  if (JSON.stringify(state) === JSON.stringify(this.lastState ?? {})) {
174564
174796
  return;
174565
174797
  }
174566
- logger189.debug(`State update for ${this.entityId}: state=${state.state}`);
174798
+ logger190.debug(`State update for ${this.entityId}: state=${state.state}`);
174567
174799
  this.lastState = state;
174568
174800
  this.flushUpdate(state);
174569
174801
  }
@@ -174635,7 +174867,7 @@ var GenericDomainEndpoint = class _GenericDomainEndpoint extends DomainEndpoint
174635
174867
 
174636
174868
  // src/matter/endpoints/domains/vacuum-endpoint.ts
174637
174869
  init_esm();
174638
- var logger190 = Logger.get("VacuumEndpoint");
174870
+ var logger191 = Logger.get("VacuumEndpoint");
174639
174871
  var VacuumEndpoint = class _VacuumEndpoint extends DomainEndpoint {
174640
174872
  static async create(registry2, entityId, mapping) {
174641
174873
  let state = registry2.initialState(entityId);
@@ -174653,7 +174885,7 @@ var VacuumEndpoint = class _VacuumEndpoint extends DomainEndpoint {
174653
174885
  entityId: effectiveMapping?.entityId ?? entityId,
174654
174886
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
174655
174887
  };
174656
- logger190.debug(
174888
+ logger191.debug(
174657
174889
  `Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity} to ${entityId}`
174658
174890
  );
174659
174891
  }
@@ -174663,7 +174895,7 @@ var VacuumEndpoint = class _VacuumEndpoint extends DomainEndpoint {
174663
174895
  entityId: effectiveMapping?.entityId ?? entityId,
174664
174896
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
174665
174897
  };
174666
- logger190.debug(
174898
+ logger191.debug(
174667
174899
  `Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity} to ${entityId}`
174668
174900
  );
174669
174901
  }
@@ -174673,7 +174905,7 @@ var VacuumEndpoint = class _VacuumEndpoint extends DomainEndpoint {
174673
174905
  entityId: effectiveMapping?.entityId ?? entityId,
174674
174906
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
174675
174907
  };
174676
- logger190.debug(
174908
+ logger191.debug(
174677
174909
  `Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity} to ${entityId}`
174678
174910
  );
174679
174911
  }
@@ -174694,7 +174926,7 @@ var VacuumEndpoint = class _VacuumEndpoint extends DomainEndpoint {
174694
174926
  rooms: roomsObj
174695
174927
  }
174696
174928
  };
174697
- logger190.debug(
174929
+ logger191.debug(
174698
174930
  `Auto-detected ${valetudoRooms.length} Valetudo segments for ${entityId}`
174699
174931
  );
174700
174932
  } else {
@@ -174711,7 +174943,7 @@ var VacuumEndpoint = class _VacuumEndpoint extends DomainEndpoint {
174711
174943
  rooms: roomsObj
174712
174944
  }
174713
174945
  };
174714
- logger190.debug(
174946
+ logger191.debug(
174715
174947
  `Auto-detected ${roborockRooms.length} Roborock rooms for ${entityId}`
174716
174948
  );
174717
174949
  }
@@ -174758,7 +174990,7 @@ var VacuumEndpoint = class _VacuumEndpoint extends DomainEndpoint {
174758
174990
  };
174759
174991
 
174760
174992
  // src/matter/endpoints/domains/create-domain-endpoint.ts
174761
- var logger191 = Logger.get("DomainEndpointFactory");
174993
+ var logger192 = Logger.get("DomainEndpointFactory");
174762
174994
  var domainFactories = {
174763
174995
  light: LightDevice,
174764
174996
  switch: SwitchDevice,
@@ -174793,7 +175025,7 @@ async function createDomainEndpoint(registry2, entityId, mapping) {
174793
175025
  const overrideFactory = (haState) => {
174794
175026
  return createLegacyEndpointType(haState.entity, effectiveMapping);
174795
175027
  };
174796
- logger191.debug(
175028
+ logger192.debug(
174797
175029
  `Creating DomainEndpoint for ${entityId} (matterDeviceType: ${effectiveMapping.matterDeviceType})`
174798
175030
  );
174799
175031
  return GenericDomainEndpoint.create(
@@ -174805,14 +175037,14 @@ async function createDomainEndpoint(registry2, entityId, mapping) {
174805
175037
  }
174806
175038
  const domain = entityId.split(".")[0];
174807
175039
  if (domain === "vacuum") {
174808
- logger191.debug(`Creating VacuumEndpoint for ${entityId}`);
175040
+ logger192.debug(`Creating VacuumEndpoint for ${entityId}`);
174809
175041
  return VacuumEndpoint.create(registry2, entityId, effectiveMapping);
174810
175042
  }
174811
175043
  const factory = domainFactories[domain];
174812
175044
  if (!factory) {
174813
175045
  return void 0;
174814
175046
  }
174815
- logger191.debug(`Creating DomainEndpoint for ${entityId} (domain: ${domain})`);
175047
+ logger192.debug(`Creating DomainEndpoint for ${entityId} (domain: ${domain})`);
174816
175048
  return GenericDomainEndpoint.create(
174817
175049
  factory,
174818
175050
  registry2,
@@ -174833,7 +175065,7 @@ init_esm();
174833
175065
  init_esm7();
174834
175066
  import debounce3 from "debounce";
174835
175067
  init_home_assistant_entity_behavior();
174836
- var logger192 = Logger.get("ComposedAirPurifierEndpoint");
175068
+ var logger193 = Logger.get("ComposedAirPurifierEndpoint");
174837
175069
  function createTemperatureConfig(temperatureEntityId) {
174838
175070
  return {
174839
175071
  getValue(_entity, agent) {
@@ -174988,7 +175220,7 @@ var ComposedAirPurifierEndpoint = class _ComposedAirPurifierEndpoint extends End
174988
175220
  config10.humidityEntityId ? "+Hum" : "",
174989
175221
  config10.batteryEntityId ? "+Bat" : ""
174990
175222
  ].filter(Boolean).join("");
174991
- logger192.info(`Created air purifier ${primaryEntityId}: ${clusterLabels}`);
175223
+ logger193.info(`Created air purifier ${primaryEntityId}: ${clusterLabels}`);
174992
175224
  return endpoint;
174993
175225
  }
174994
175226
  constructor(type, entityId, id, trackedEntityIds) {
@@ -175056,7 +175288,7 @@ init_esm();
175056
175288
  init_esm7();
175057
175289
  import debounce4 from "debounce";
175058
175290
  init_home_assistant_entity_behavior();
175059
- var logger193 = Logger.get("ComposedSensorEndpoint");
175291
+ var logger194 = Logger.get("ComposedSensorEndpoint");
175060
175292
  var temperatureConfig3 = {
175061
175293
  getValue(entity, agent) {
175062
175294
  const fallbackUnit = agent.env.get(HomeAssistantConfig).unitSystem.temperature;
@@ -175215,7 +175447,7 @@ var ComposedSensorEndpoint = class _ComposedSensorEndpoint extends Endpoint {
175215
175447
  if (config10.pressureEntityId && pressSub) {
175216
175448
  endpoint.subEndpoints.set(config10.pressureEntityId, pressSub);
175217
175449
  }
175218
- logger193.info(
175450
+ logger194.info(
175219
175451
  `Created composed sensor ${primaryEntityId} with ${parts.length} sub-endpoint(s): T${humSub ? "+H" : ""}${pressSub ? "+P" : ""}${config10.batteryEntityId ? "+Bat" : ""}`
175220
175452
  );
175221
175453
  return endpoint;
@@ -175283,7 +175515,7 @@ var ComposedSensorEndpoint = class _ComposedSensorEndpoint extends Endpoint {
175283
175515
  };
175284
175516
 
175285
175517
  // src/matter/endpoints/legacy/legacy-endpoint.ts
175286
- var logger194 = Logger.get("LegacyEndpoint");
175518
+ var logger195 = Logger.get("LegacyEndpoint");
175287
175519
  var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175288
175520
  static async create(registry2, entityId, mapping) {
175289
175521
  const deviceRegistry = registry2.deviceOf(entityId);
@@ -175293,25 +175525,25 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175293
175525
  return;
175294
175526
  }
175295
175527
  if (registry2.isAutoBatteryMappingEnabled() && registry2.isBatteryEntityUsed(entityId)) {
175296
- logger194.debug(
175528
+ logger195.debug(
175297
175529
  `Skipping ${entityId} - already auto-assigned as battery to another device`
175298
175530
  );
175299
175531
  return;
175300
175532
  }
175301
175533
  if (registry2.isAutoHumidityMappingEnabled() && registry2.isHumidityEntityUsed(entityId)) {
175302
- logger194.debug(
175534
+ logger195.debug(
175303
175535
  `Skipping ${entityId} - already auto-assigned as humidity to a temperature sensor`
175304
175536
  );
175305
175537
  return;
175306
175538
  }
175307
175539
  if (registry2.isAutoPressureMappingEnabled() && registry2.isPressureEntityUsed(entityId)) {
175308
- logger194.debug(
175540
+ logger195.debug(
175309
175541
  `Skipping ${entityId} - already auto-assigned as pressure to a temperature sensor`
175310
175542
  );
175311
175543
  return;
175312
175544
  }
175313
175545
  if (registry2.isAutoComposedDevicesEnabled() && registry2.isComposedSubEntityUsed(entityId)) {
175314
- logger194.debug(
175546
+ logger195.debug(
175315
175547
  `Skipping ${entityId} - already consumed by a composed device`
175316
175548
  );
175317
175549
  return;
@@ -175331,7 +175563,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175331
175563
  humidityEntity: humidityEntityId
175332
175564
  };
175333
175565
  registry2.markHumidityEntityUsed(humidityEntityId);
175334
- logger194.debug(
175566
+ logger195.debug(
175335
175567
  `Auto-assigned humidity ${humidityEntityId} to ${entityId}`
175336
175568
  );
175337
175569
  }
@@ -175350,7 +175582,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175350
175582
  pressureEntity: pressureEntityId
175351
175583
  };
175352
175584
  registry2.markPressureEntityUsed(pressureEntityId);
175353
- logger194.debug(
175585
+ logger195.debug(
175354
175586
  `Auto-assigned pressure ${pressureEntityId} to ${entityId}`
175355
175587
  );
175356
175588
  }
@@ -175367,7 +175599,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175367
175599
  batteryEntity: batteryEntityId
175368
175600
  };
175369
175601
  registry2.markBatteryEntityUsed(batteryEntityId);
175370
- logger194.debug(
175602
+ logger195.debug(
175371
175603
  `Auto-assigned battery ${batteryEntityId} to ${entityId}`
175372
175604
  );
175373
175605
  }
@@ -175385,7 +175617,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175385
175617
  powerEntity: powerEntityId
175386
175618
  };
175387
175619
  registry2.markPowerEntityUsed(powerEntityId);
175388
- logger194.debug(`Auto-assigned power ${powerEntityId} to ${entityId}`);
175620
+ logger195.debug(`Auto-assigned power ${powerEntityId} to ${entityId}`);
175389
175621
  }
175390
175622
  }
175391
175623
  }
@@ -175402,7 +175634,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175402
175634
  energyEntity: energyEntityId
175403
175635
  };
175404
175636
  registry2.markEnergyEntityUsed(energyEntityId);
175405
- logger194.debug(
175637
+ logger195.debug(
175406
175638
  `Auto-assigned energy ${energyEntityId} to ${entityId}`
175407
175639
  );
175408
175640
  }
@@ -175418,7 +175650,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175418
175650
  entityId: effectiveMapping?.entityId ?? entityId,
175419
175651
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
175420
175652
  };
175421
- logger194.debug(
175653
+ logger195.debug(
175422
175654
  `Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity} to ${entityId}`
175423
175655
  );
175424
175656
  }
@@ -175428,7 +175660,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175428
175660
  entityId: effectiveMapping?.entityId ?? entityId,
175429
175661
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
175430
175662
  };
175431
- logger194.debug(
175663
+ logger195.debug(
175432
175664
  `Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity} to ${entityId}`
175433
175665
  );
175434
175666
  }
@@ -175438,7 +175670,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175438
175670
  entityId: effectiveMapping?.entityId ?? entityId,
175439
175671
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
175440
175672
  };
175441
- logger194.debug(
175673
+ logger195.debug(
175442
175674
  `Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity} to ${entityId}`
175443
175675
  );
175444
175676
  }
@@ -175459,7 +175691,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175459
175691
  rooms: roomsObj
175460
175692
  }
175461
175693
  };
175462
- logger194.debug(
175694
+ logger195.debug(
175463
175695
  `Auto-detected ${valetudoRooms.length} Valetudo segments for ${entityId}`
175464
175696
  );
175465
175697
  } else {
@@ -175476,7 +175708,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175476
175708
  rooms: roomsObj
175477
175709
  }
175478
175710
  };
175479
- logger194.debug(
175711
+ logger195.debug(
175480
175712
  `Auto-detected ${roborockRooms.length} Roborock rooms for ${entityId}`
175481
175713
  );
175482
175714
  }
@@ -175575,7 +175807,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175575
175807
  if (state.state === this.lastState?.state && JSON.stringify(state.attributes) === JSON.stringify(this.lastState?.attributes)) {
175576
175808
  return;
175577
175809
  }
175578
- logger194.debug(
175810
+ logger195.debug(
175579
175811
  `State update received for ${this.entityId}: state=${state.state}`
175580
175812
  );
175581
175813
  this.lastState = state;
@@ -175634,7 +175866,7 @@ var PluginDeviceBehavior = class extends Behavior {
175634
175866
  })(PluginDeviceBehavior || (PluginDeviceBehavior = {}));
175635
175867
 
175636
175868
  // src/plugins/plugin-device-factory.ts
175637
- var logger195 = Logger.get("PluginDeviceFactory");
175869
+ var logger196 = Logger.get("PluginDeviceFactory");
175638
175870
  var deviceTypeMap = {
175639
175871
  on_off_light: () => OnOffLightDevice.with(
175640
175872
  IdentifyServer2,
@@ -175695,7 +175927,7 @@ var deviceTypeMap = {
175695
175927
  function createPluginEndpointType(deviceType) {
175696
175928
  const factory = deviceTypeMap[deviceType];
175697
175929
  if (!factory) {
175698
- logger195.warn(`Unsupported plugin device type: "${deviceType}"`);
175930
+ logger196.warn(`Unsupported plugin device type: "${deviceType}"`);
175699
175931
  return void 0;
175700
175932
  }
175701
175933
  return factory();
@@ -175802,7 +176034,7 @@ var subscribeEntities = (conn, onChange, entityIds) => entitiesColl(conn, entity
175802
176034
 
175803
176035
  // src/services/bridges/entity-isolation-service.ts
175804
176036
  init_esm();
175805
- var logger196 = Logger.get("EntityIsolation");
176037
+ var logger197 = Logger.get("EntityIsolation");
175806
176038
  var EntityIsolationServiceImpl = class {
175807
176039
  isolatedEntities = /* @__PURE__ */ new Map();
175808
176040
  isolationCallbacks = /* @__PURE__ */ new Map();
@@ -175842,13 +176074,13 @@ var EntityIsolationServiceImpl = class {
175842
176074
  }
175843
176075
  const parsed = this.parseEndpointPath(msg);
175844
176076
  if (!parsed) {
175845
- logger196.warn("Could not parse entity from error:", msg);
176077
+ logger197.warn("Could not parse entity from error:", msg);
175846
176078
  return false;
175847
176079
  }
175848
176080
  const { bridgeId, entityName } = parsed;
175849
176081
  const callback = this.isolationCallbacks.get(bridgeId);
175850
176082
  if (!callback) {
175851
- logger196.warn(
176083
+ logger197.warn(
175852
176084
  `No isolation callback registered for bridge ${bridgeId}, entity: ${entityName}`
175853
176085
  );
175854
176086
  return false;
@@ -175859,14 +176091,14 @@ var EntityIsolationServiceImpl = class {
175859
176091
  }
175860
176092
  const reason = `Subscription timing error (Invalid intervalMs). Entity isolated to protect bridge stability.`;
175861
176093
  this.isolatedEntities.set(key, { entityId: entityName, reason });
175862
- logger196.warn(
176094
+ logger197.warn(
175863
176095
  `Isolating entity "${entityName}" from bridge ${bridgeId} due to: ${reason}`
175864
176096
  );
175865
176097
  try {
175866
176098
  await callback(entityName);
175867
176099
  return true;
175868
176100
  } catch (e) {
175869
- logger196.error(`Failed to isolate entity ${entityName}:`, e);
176101
+ logger197.error(`Failed to isolate entity ${entityName}:`, e);
175870
176102
  return false;
175871
176103
  }
175872
176104
  }
@@ -176151,6 +176383,30 @@ var BridgeEndpointManager = class extends Service {
176151
176383
  }
176152
176384
  return String(error);
176153
176385
  }
176386
+ // --- Plugin info ---
176387
+ getPluginInfo() {
176388
+ if (!this.pluginManager) {
176389
+ return { metadata: [], devices: [], circuitBreakers: {} };
176390
+ }
176391
+ const cbStates = {};
176392
+ for (const [name, state] of this.pluginManager.getCircuitBreakerStates()) {
176393
+ cbStates[name] = state;
176394
+ }
176395
+ return {
176396
+ metadata: this.pluginManager.getMetadata(),
176397
+ devices: this.pluginManager.getAllDevices(),
176398
+ circuitBreakers: cbStates
176399
+ };
176400
+ }
176401
+ enablePlugin(pluginName) {
176402
+ this.pluginManager?.enablePlugin(pluginName);
176403
+ }
176404
+ disablePlugin(pluginName) {
176405
+ this.pluginManager?.disablePlugin(pluginName);
176406
+ }
176407
+ resetPlugin(pluginName) {
176408
+ this.pluginManager?.resetPlugin(pluginName);
176409
+ }
176154
176410
  // --- Plugin integration ---
176155
176411
  wirePluginCallbacks() {
176156
176412
  if (!this.pluginManager) return;
@@ -176866,11 +177122,11 @@ var BridgeRegistry = class _BridgeRegistry {
176866
177122
  init_dist();
176867
177123
  var AUTO_FORCE_SYNC_INTERVAL_MS2 = 9e4;
176868
177124
  var ServerModeBridge = class {
176869
- constructor(logger199, dataProvider, endpointManager, server) {
177125
+ constructor(logger200, dataProvider, endpointManager, server) {
176870
177126
  this.dataProvider = dataProvider;
176871
177127
  this.endpointManager = endpointManager;
176872
177128
  this.server = server;
176873
- this.log = logger199.get(`ServerModeBridge / ${dataProvider.id}`);
177129
+ this.log = logger200.get(`ServerModeBridge / ${dataProvider.id}`);
176874
177130
  }
176875
177131
  log;
176876
177132
  status = {
@@ -177272,7 +177528,7 @@ function ServerModeVacuumDevice(homeAssistantEntity, includeOnOff = false, minim
177272
177528
  }
177273
177529
 
177274
177530
  // src/matter/endpoints/server-mode-vacuum-endpoint.ts
177275
- var logger197 = Logger.get("ServerModeVacuumEndpoint");
177531
+ var logger198 = Logger.get("ServerModeVacuumEndpoint");
177276
177532
  var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEndpoint {
177277
177533
  static async create(registry2, entityId, mapping) {
177278
177534
  const deviceRegistry = registry2.deviceOf(entityId);
@@ -177282,7 +177538,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177282
177538
  return void 0;
177283
177539
  }
177284
177540
  let effectiveMapping = mapping;
177285
- logger197.info(
177541
+ logger198.info(
177286
177542
  `${entityId}: device_id=${entity.device_id}, manualBattery=${mapping?.batteryEntity ?? "none"}`
177287
177543
  );
177288
177544
  if (entity.device_id) {
@@ -177297,9 +177553,9 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177297
177553
  batteryEntity: batteryEntityId
177298
177554
  };
177299
177555
  registry2.markBatteryEntityUsed(batteryEntityId);
177300
- logger197.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
177556
+ logger198.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
177301
177557
  } else {
177302
- logger197.warn(
177558
+ logger198.warn(
177303
177559
  `${entityId}: No battery entity found for device ${entity.device_id}`
177304
177560
  );
177305
177561
  }
@@ -177313,7 +177569,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177313
177569
  entityId: effectiveMapping?.entityId ?? entityId,
177314
177570
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
177315
177571
  };
177316
- logger197.info(
177572
+ logger198.info(
177317
177573
  `${entityId}: Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity}`
177318
177574
  );
177319
177575
  }
@@ -177323,7 +177579,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177323
177579
  entityId: effectiveMapping?.entityId ?? entityId,
177324
177580
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
177325
177581
  };
177326
- logger197.info(
177582
+ logger198.info(
177327
177583
  `${entityId}: Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity}`
177328
177584
  );
177329
177585
  }
@@ -177333,7 +177589,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177333
177589
  entityId: effectiveMapping?.entityId ?? entityId,
177334
177590
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
177335
177591
  };
177336
- logger197.info(
177592
+ logger198.info(
177337
177593
  `${entityId}: Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity}`
177338
177594
  );
177339
177595
  }
@@ -177354,7 +177610,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177354
177610
  rooms: roomsObj
177355
177611
  }
177356
177612
  };
177357
- logger197.info(
177613
+ logger198.info(
177358
177614
  `${entityId}: Auto-detected ${valetudoRooms.length} Valetudo segments`
177359
177615
  );
177360
177616
  } else {
@@ -177371,14 +177627,14 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177371
177627
  rooms: roomsObj
177372
177628
  }
177373
177629
  };
177374
- logger197.info(
177630
+ logger198.info(
177375
177631
  `${entityId}: Auto-detected ${roborockRooms.length} Roborock rooms`
177376
177632
  );
177377
177633
  }
177378
177634
  }
177379
177635
  }
177380
177636
  } else {
177381
- logger197.warn(`${entityId}: No device_id \u2014 cannot auto-assign battery`);
177637
+ logger198.warn(`${entityId}: No device_id \u2014 cannot auto-assign battery`);
177382
177638
  }
177383
177639
  const payload = {
177384
177640
  entity_id: entityId,
@@ -177433,7 +177689,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177433
177689
  if (state.state === this.lastState?.state && JSON.stringify(state.attributes) === JSON.stringify(this.lastState?.attributes)) {
177434
177690
  return;
177435
177691
  }
177436
- logger197.debug(
177692
+ logger198.debug(
177437
177693
  `State update received for ${this.entityId}: state=${state.state}`
177438
177694
  );
177439
177695
  this.lastState = state;
@@ -177814,10 +178070,10 @@ var BridgeEnvironmentFactory = class extends BridgeFactory {
177814
178070
  // src/core/ioc/app-environment.ts
177815
178071
  var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
177816
178072
  constructor(rootEnv, options) {
177817
- const logger199 = rootEnv.get(LoggerService);
178073
+ const logger200 = rootEnv.get(LoggerService);
177818
178074
  super({
177819
178075
  id: "App",
177820
- log: logger199.get("AppContainer"),
178076
+ log: logger200.get("AppContainer"),
177821
178077
  parent: rootEnv
177822
178078
  });
177823
178079
  this.options = options;
@@ -177830,8 +178086,8 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
177830
178086
  }
177831
178087
  construction;
177832
178088
  async init() {
177833
- const logger199 = this.get(LoggerService);
177834
- this.set(LoggerService, logger199);
178089
+ const logger200 = this.get(LoggerService);
178090
+ this.set(LoggerService, logger200);
177835
178091
  this.set(AppStorage, new AppStorage(await this.load(StorageService)));
177836
178092
  this.set(BridgeStorage, new BridgeStorage(await this.load(AppStorage)));
177837
178093
  this.set(
@@ -177848,7 +178104,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
177848
178104
  );
177849
178105
  this.set(
177850
178106
  HomeAssistantClient,
177851
- new HomeAssistantClient(logger199, this.options.homeAssistant)
178107
+ new HomeAssistantClient(logger200, this.options.homeAssistant)
177852
178108
  );
177853
178109
  this.set(
177854
178110
  HomeAssistantConfig,
@@ -177856,7 +178112,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
177856
178112
  );
177857
178113
  this.set(
177858
178114
  HomeAssistantActions,
177859
- new HomeAssistantActions(logger199, await this.load(HomeAssistantClient))
178115
+ new HomeAssistantActions(logger200, await this.load(HomeAssistantClient))
177860
178116
  );
177861
178117
  this.set(
177862
178118
  HomeAssistantRegistry,
@@ -177877,7 +178133,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
177877
178133
  this.set(
177878
178134
  WebApi,
177879
178135
  new WebApi(
177880
- logger199,
178136
+ logger200,
177881
178137
  await this.load(BridgeService),
177882
178138
  await this.load(HomeAssistantClient),
177883
178139
  await this.load(HomeAssistantRegistry),
@@ -177902,7 +178158,7 @@ init_nodejs();
177902
178158
  init_level_control();
177903
178159
 
177904
178160
  // src/matter/patches/patch-level-control-tlv.ts
177905
- var logger198 = Logger.get("PatchLevelControlTlv");
178161
+ var logger199 = Logger.get("PatchLevelControlTlv");
177906
178162
  function patchLevelControlTlv() {
177907
178163
  let patched = 0;
177908
178164
  const moveToLevelFields = LevelControl3.TlvMoveToLevelRequest.fieldDefinitions;
@@ -177916,11 +178172,11 @@ function patchLevelControlTlv() {
177916
178172
  patched++;
177917
178173
  }
177918
178174
  if (patched > 0) {
177919
- logger198.info(
178175
+ logger199.info(
177920
178176
  `Patched ${patched} LevelControl TLV schema(s): transitionTime is now optional (Google Home compatibility)`
177921
178177
  );
177922
178178
  } else {
177923
- logger198.warn(
178179
+ logger199.warn(
177924
178180
  "Failed to patch LevelControl TLV schemas \u2014 field definitions not found. Google Home brightness adjustment may not work."
177925
178181
  );
177926
178182
  }