@riddix/hamh 2.1.0-alpha.426 → 2.1.0-alpha.428

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(logger192) {
1747
- this.#logger = logger192;
1746
+ static set logger(logger194) {
1747
+ this.#logger = logger194;
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, logger192, options) {
3425
+ static addLogger(identifier, logger194, 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 = logger192;
3431
+ legacy.log = logger194;
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 logger192 = Logger.get(subject.constructor.name);
5542
- logger192.error(...args);
5541
+ const logger194 = Logger.get(subject.constructor.name);
5542
+ logger194.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 logger192 = loggers.get(facility);
136002
- if (!logger192) {
136003
- loggers.set(facility, logger192 = Logger.get(facility));
136001
+ let logger194 = loggers.get(facility);
136002
+ if (!logger194) {
136003
+ loggers.set(facility, logger194 = Logger.get(facility));
136004
136004
  }
136005
- logger192[level](Diagnostic.via(id || "(anon)"), message);
136005
+ logger194[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(logger192, client, config10) {
147205
+ constructor(logger194, client, config10) {
147206
147206
  super("HomeAssistantActions");
147207
147207
  this.client = client;
147208
- this.log = logger192.get(this);
147208
+ this.log = logger194.get(this);
147209
147209
  this.config = { ...defaultConfig, ...config10 };
147210
147210
  this.circuitBreaker = new CircuitBreaker(
147211
147211
  this.config.circuitBreakerThreshold,
@@ -147526,10 +147526,10 @@ var DiagnosticService = class {
147526
147526
  };
147527
147527
 
147528
147528
  // src/api/access-log.ts
147529
- function accessLogger(logger192) {
147529
+ function accessLogger(logger194) {
147530
147530
  return (req, res, next) => {
147531
147531
  res.on("finish", () => {
147532
- logger192.debug(
147532
+ logger194.debug(
147533
147533
  `${req.method} ${decodeURI(req.originalUrl)} ${res.statusCode} ${res.statusMessage} from ${req.socket.remoteAddress}`
147534
147534
  );
147535
147535
  });
@@ -149632,12 +149632,14 @@ function settingsApi(settingsStorage, envAuth) {
149632
149632
  }
149633
149633
 
149634
149634
  // src/api/system-api.ts
149635
+ init_esm();
149635
149636
  import { exec } from "node:child_process";
149636
149637
  import os2 from "node:os";
149637
149638
  import { promisify } from "node:util";
149638
149639
  import v8 from "node:v8";
149639
149640
  import express12 from "express";
149640
149641
  var execAsync = promisify(exec);
149642
+ var logger141 = Logger.get("SystemApi");
149641
149643
  function detectEnvironment2() {
149642
149644
  if (process.env.SUPERVISOR_TOKEN || process.env.HASSIO_TOKEN) {
149643
149645
  return "Home Assistant Add-on";
@@ -149701,7 +149703,7 @@ function systemApi(version) {
149701
149703
  };
149702
149704
  res.json(systemInfo);
149703
149705
  } catch (error) {
149704
- console.error("Failed to get system info:", error);
149706
+ logger141.error("Failed to get system info:", error);
149705
149707
  res.status(500).json({ error: "Failed to get system info" });
149706
149708
  }
149707
149709
  });
@@ -149744,7 +149746,7 @@ async function getStorageInfo() {
149744
149746
  return await getUnixStorageInfo(pathToCheck);
149745
149747
  }
149746
149748
  } catch (error) {
149747
- console.error("Failed to get storage info:", error);
149749
+ logger141.error("Failed to get storage info:", error);
149748
149750
  return { total: 0, used: 0, free: 0 };
149749
149751
  }
149750
149752
  }
@@ -149971,7 +149973,7 @@ var WebSocketApi = class {
149971
149973
 
149972
149974
  // src/api/web-api.ts
149973
149975
  var WebApi = class extends Service {
149974
- constructor(logger192, bridgeService, haClient, haRegistry, bridgeStorage, mappingStorage, lockCredentialStorage, settingsStorage, props) {
149976
+ constructor(logger194, bridgeService, haClient, haRegistry, bridgeStorage, mappingStorage, lockCredentialStorage, settingsStorage, props) {
149975
149977
  super("WebApi");
149976
149978
  this.bridgeService = bridgeService;
149977
149979
  this.haClient = haClient;
@@ -149981,8 +149983,8 @@ var WebApi = class extends Service {
149981
149983
  this.lockCredentialStorage = lockCredentialStorage;
149982
149984
  this.settingsStorage = settingsStorage;
149983
149985
  this.props = props;
149984
- this.logger = logger192;
149985
- this.log = logger192.get(this);
149986
+ this.logger = logger194;
149987
+ this.log = logger194.get(this);
149986
149988
  this.accessLogger = accessLogger(this.log.createChild("Access Log"));
149987
149989
  this.startTime = Date.now();
149988
149990
  this.wsApi = new WebSocketApi(
@@ -150415,12 +150417,12 @@ var CustomStorage = class extends StorageBackendDisk {
150415
150417
 
150416
150418
  // src/core/app/storage.ts
150417
150419
  function storage(environment, options) {
150418
- const logger192 = environment.get(LoggerService).get("CustomStorage");
150420
+ const logger194 = environment.get(LoggerService).get("CustomStorage");
150419
150421
  const location2 = resolveStorageLocation(options.location);
150420
150422
  fs6.mkdirSync(location2, { recursive: true });
150421
150423
  const storageService = environment.get(StorageService);
150422
150424
  storageService.location = location2;
150423
- storageService.factory = (ns) => new CustomStorage(logger192, path6.resolve(location2, ns));
150425
+ storageService.factory = (ns) => new CustomStorage(logger194, path6.resolve(location2, ns));
150424
150426
  }
150425
150427
  function resolveStorageLocation(storageLocation) {
150426
150428
  const homedir = os3.homedir();
@@ -150551,6 +150553,7 @@ var BridgeFactory = class extends Service {
150551
150553
  };
150552
150554
 
150553
150555
  // src/services/bridges/bridge-service.ts
150556
+ init_esm();
150554
150557
  init_service();
150555
150558
  import crypto3 from "node:crypto";
150556
150559
  var BridgeService = class extends Service {
@@ -150561,6 +150564,7 @@ var BridgeService = class extends Service {
150561
150564
  this.props = props;
150562
150565
  this.autoRecoveryEnabled = props.autoRecovery ?? true;
150563
150566
  }
150567
+ log = Logger.get("BridgeService");
150564
150568
  bridges = [];
150565
150569
  autoRecoveryEnabled = false;
150566
150570
  lastRecoveryAttempt;
@@ -150593,7 +150597,8 @@ var BridgeService = class extends Service {
150593
150597
  try {
150594
150598
  await bridge.start();
150595
150599
  this.recoveryCount++;
150596
- } catch {
150600
+ } catch (e) {
150601
+ this.log.warn(`Recovery attempt failed for bridge ${bridge.id}:`, e);
150597
150602
  }
150598
150603
  }
150599
150604
  }
@@ -150628,7 +150633,7 @@ var BridgeService = class extends Service {
150628
150633
  try {
150629
150634
  await bridge.start();
150630
150635
  } catch (e) {
150631
- console.error(`Failed to start bridge ${bridge.id}:`, e);
150636
+ this.log.error(`Failed to start bridge ${bridge.id}:`, e);
150632
150637
  }
150633
150638
  }
150634
150639
  }
@@ -150638,7 +150643,7 @@ var BridgeService = class extends Service {
150638
150643
  await bridge.stop();
150639
150644
  this.onBridgeChanged?.(bridge.id);
150640
150645
  } catch (e) {
150641
- console.error(`Failed to stop bridge ${bridge.id}:`, e);
150646
+ this.log.error(`Failed to stop bridge ${bridge.id}:`, e);
150642
150647
  }
150643
150648
  }
150644
150649
  }
@@ -150647,7 +150652,7 @@ var BridgeService = class extends Service {
150647
150652
  try {
150648
150653
  await bridge.stop();
150649
150654
  } catch (e) {
150650
- console.error(`Failed to stop bridge ${bridge.id} during restart:`, e);
150655
+ this.log.error(`Failed to stop bridge ${bridge.id} during restart:`, e);
150651
150656
  }
150652
150657
  }
150653
150658
  const sortedBridges = [...this.bridges].sort((a, b) => {
@@ -150660,7 +150665,10 @@ var BridgeService = class extends Service {
150660
150665
  await bridge.start();
150661
150666
  this.onBridgeChanged?.(bridge.id);
150662
150667
  } catch (e) {
150663
- console.error(`Failed to start bridge ${bridge.id} during restart:`, e);
150668
+ this.log.error(
150669
+ `Failed to start bridge ${bridge.id} during restart:`,
150670
+ e
150671
+ );
150664
150672
  }
150665
150673
  }
150666
150674
  }
@@ -150669,7 +150677,7 @@ var BridgeService = class extends Service {
150669
150677
  try {
150670
150678
  await bridge.refreshDevices();
150671
150679
  } catch (e) {
150672
- console.error(`Failed to refresh bridge ${bridge.id}:`, e);
150680
+ this.log.error(`Failed to refresh bridge ${bridge.id}:`, e);
150673
150681
  }
150674
150682
  }
150675
150683
  }
@@ -150768,10 +150776,10 @@ import {
150768
150776
  getConfig
150769
150777
  } from "home-assistant-js-websocket";
150770
150778
  var HomeAssistantClient = class extends Service {
150771
- constructor(logger192, options) {
150779
+ constructor(logger194, options) {
150772
150780
  super("HomeAssistantClient");
150773
150781
  this.options = options;
150774
- this.log = logger192.get(this);
150782
+ this.log = logger194.get(this);
150775
150783
  }
150776
150784
  static Options = /* @__PURE__ */ Symbol.for("HomeAssistantClientProps");
150777
150785
  _connection;
@@ -150917,7 +150925,7 @@ async function getAreaRegistry(connection) {
150917
150925
  }
150918
150926
 
150919
150927
  // src/services/home-assistant/home-assistant-registry.ts
150920
- var logger141 = Logger.get("HomeAssistantRegistry");
150928
+ var logger142 = Logger.get("HomeAssistantRegistry");
150921
150929
  var HomeAssistantRegistry = class extends Service {
150922
150930
  constructor(client, options) {
150923
150931
  super("HomeAssistantRegistry");
@@ -150961,7 +150969,7 @@ var HomeAssistantRegistry = class extends Service {
150961
150969
  onRefresh();
150962
150970
  }
150963
150971
  } catch (e) {
150964
- logger141.warn("Failed to refresh registry, will retry next interval:", e);
150972
+ logger142.warn("Failed to refresh registry, will retry next interval:", e);
150965
150973
  }
150966
150974
  }, this.options.refreshInterval * 1e3);
150967
150975
  }
@@ -150977,7 +150985,7 @@ var HomeAssistantRegistry = class extends Service {
150977
150985
  baseDelayMs: 2e3,
150978
150986
  maxDelayMs: 15e3,
150979
150987
  onRetry: (attempt, error, delayMs) => {
150980
- logger141.warn(
150988
+ logger142.warn(
150981
150989
  `Registry fetch failed (attempt ${attempt}), retrying in ${delayMs}ms:`,
150982
150990
  error
150983
150991
  );
@@ -151017,7 +151025,7 @@ var HomeAssistantRegistry = class extends Service {
151017
151025
  const fingerprint = hash2.digest("hex");
151018
151026
  this._states = keyBy(statesList, "entity_id");
151019
151027
  if (fingerprint === this.lastRegistryFingerprint) {
151020
- logger141.debug("Registry unchanged, skipping full refresh");
151028
+ logger142.debug("Registry unchanged, skipping full refresh");
151021
151029
  return false;
151022
151030
  }
151023
151031
  this.lastRegistryFingerprint = fingerprint;
@@ -151038,10 +151046,10 @@ var HomeAssistantRegistry = class extends Service {
151038
151046
  const missingDevices = fromPairs(missingDeviceIds.map((d) => [d, { id: d }]));
151039
151047
  this._devices = { ...missingDevices, ...realDevices };
151040
151048
  this._entities = allEntities;
151041
- logger141.debug(
151049
+ logger142.debug(
151042
151050
  `Loaded HA registry: ${keys(allEntities).length} entities, ${keys(realDevices).length} devices, ${keys(this._states).length} states`
151043
151051
  );
151044
- logMemoryUsage(logger141, "after HA registry load");
151052
+ logMemoryUsage(logger142, "after HA registry load");
151045
151053
  this._labels = labels;
151046
151054
  this._areas = new Map(areas.map((a) => [a.area_id, a.name]));
151047
151055
  return true;
@@ -151617,7 +151625,7 @@ var __privateIn2 = (member, obj) => Object(obj) !== obj ? __typeError40('Cannot
151617
151625
  var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
151618
151626
  var __privateSet2 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
151619
151627
  var __privateMethod2 = (obj, member, method) => (__accessCheck2(obj, member, "access private method"), method);
151620
- var logger142 = Logger.get("ScenesManagementServer");
151628
+ var logger143 = Logger.get("ScenesManagementServer");
151621
151629
  var UNDEFINED_SCENE_ID = 255;
151622
151630
  var GLOBAL_SCENE_ID = 0;
151623
151631
  var UNDEFINED_GROUP = GroupId(0);
@@ -151776,11 +151784,11 @@ var ScenesManagementServer = class extends ScenesManagementBase {
151776
151784
  return { status: Status2.ResourceExhausted, groupId: groupId22, sceneId };
151777
151785
  }
151778
151786
  this.state.sceneTable.push(sceneData);
151779
- logger142.debug(`Added scene ${sceneId} in group ${groupId22} for fabric ${fabricIndex}`);
151787
+ logger143.debug(`Added scene ${sceneId} in group ${groupId22} for fabric ${fabricIndex}`);
151780
151788
  this.#updateFabricSceneInfoCountsForFabric(fabricIndex);
151781
151789
  } else {
151782
151790
  this.state.sceneTable[existingSceneIndex] = sceneData;
151783
- logger142.debug(`Updated scene ${sceneId} in group ${groupId22} for fabric ${fabricIndex}`);
151791
+ logger143.debug(`Updated scene ${sceneId} in group ${groupId22} for fabric ${fabricIndex}`);
151784
151792
  }
151785
151793
  return { status: Status2.Success, groupId: groupId22, sceneId };
151786
151794
  }
@@ -152083,20 +152091,20 @@ var ScenesManagementServer = class extends ScenesManagementBase {
152083
152091
  }
152084
152092
  }
152085
152093
  if (fieldCount !== 2) {
152086
- logger142.warn(
152094
+ logger143.warn(
152087
152095
  `AttributeValuePair has invalid number (${fieldCount}) of fields (${serialize(attributeValuePair)})`
152088
152096
  );
152089
152097
  return void 0;
152090
152098
  }
152091
152099
  const value = attributeValuePair[mappedType];
152092
152100
  if (value === void 0) {
152093
- logger142.warn(
152101
+ logger143.warn(
152094
152102
  `AttributeValuePair missing value for mappedType ${mappedType} (${serialize(attributeValuePair)})`
152095
152103
  );
152096
152104
  return void 0;
152097
152105
  }
152098
152106
  if (typeof value !== "number" && typeof value !== "bigint") {
152099
- logger142.warn(
152107
+ logger143.warn(
152100
152108
  `AttributeValuePair has invalid non-numeric value for mappedType ${mappedType} (${serialize(attributeValuePair)})`
152101
152109
  // Should never happen
152102
152110
  );
@@ -152194,7 +152202,7 @@ var ScenesManagementServer = class extends ScenesManagementBase {
152194
152202
  } else if (schema6.schema.baseTypeMin < 0 && schema6.schema.min > schema6.schema.baseTypeMin) {
152195
152203
  return { attributeId, [mappedType]: schema6.schema.baseTypeMin };
152196
152204
  } else {
152197
- logger142.warn(
152205
+ logger143.warn(
152198
152206
  `Cannot determine out-of-bounds value for attribute schema, returning min value of datatype schema`
152199
152207
  );
152200
152208
  }
@@ -152215,7 +152223,7 @@ var ScenesManagementServer = class extends ScenesManagementBase {
152215
152223
  }
152216
152224
  }
152217
152225
  });
152218
- logger142.debug(`Collected scene attribute values on Endpoint ${this.endpoint.id}: ${serialize(sceneValues)}`);
152226
+ logger143.debug(`Collected scene attribute values on Endpoint ${this.endpoint.id}: ${serialize(sceneValues)}`);
152219
152227
  return sceneValues;
152220
152228
  }
152221
152229
  /**
@@ -152254,7 +152262,7 @@ var ScenesManagementServer = class extends ScenesManagementBase {
152254
152262
  }
152255
152263
  const attrType = attribute2.primitiveBase?.name;
152256
152264
  if (attrType === void 0 || DataTypeToSceneAttributeDataMap[attrType] === void 0) {
152257
- logger142.warn(
152265
+ logger143.warn(
152258
152266
  `Scene Attribute ${attribute2.name} on Cluster ${clusterName} has unsupported datatype ${attrType} for scene management on Endpoint ${this.endpoint.id}`
152259
152267
  );
152260
152268
  continue;
@@ -152269,7 +152277,7 @@ var ScenesManagementServer = class extends ScenesManagementBase {
152269
152277
  });
152270
152278
  }
152271
152279
  if (sceneClusterDetails) {
152272
- logger142.info(
152280
+ logger143.info(
152273
152281
  `Registered ${sceneClusterDetails.attributes.size} scene attributes for Cluster ${clusterName} on Endpoint ${this.endpoint.id}`
152274
152282
  );
152275
152283
  this.internal.endpointSceneableBehaviors.add(sceneClusterDetails);
@@ -152277,7 +152285,7 @@ var ScenesManagementServer = class extends ScenesManagementBase {
152277
152285
  }
152278
152286
  /** Apply scene attribute values in the various clusters on the endpoint. */
152279
152287
  #applySceneAttributeValues(sceneValues, transitionTime = null) {
152280
- logger142.debug(`Recalling scene on Endpoint ${this.endpoint.id} with values: ${serialize(sceneValues)}`);
152288
+ logger143.debug(`Recalling scene on Endpoint ${this.endpoint.id} with values: ${serialize(sceneValues)}`);
152281
152289
  const agent = this.endpoint.agentFor(this.context);
152282
152290
  const promises = [];
152283
152291
  for (const [clusterName, clusterAttributes] of Object.entries(sceneValues)) {
@@ -152288,7 +152296,7 @@ var ScenesManagementServer = class extends ScenesManagementBase {
152288
152296
  promises.push(result);
152289
152297
  }
152290
152298
  } else {
152291
- logger142.warn(
152299
+ logger143.warn(
152292
152300
  `No scenes implementation found for cluster ${clusterName} on Endpoint ${this.endpoint.id} during scene recall. Values are ignored`
152293
152301
  );
152294
152302
  }
@@ -152296,7 +152304,7 @@ var ScenesManagementServer = class extends ScenesManagementBase {
152296
152304
  if (promises.length) {
152297
152305
  return Promise.all(promises).then(
152298
152306
  () => void 0,
152299
- (error) => logger142.warn(`Error applying scene attribute values on Endpoint ${this.endpoint.id}:`, error)
152307
+ (error) => logger143.warn(`Error applying scene attribute values on Endpoint ${this.endpoint.id}:`, error)
152300
152308
  );
152301
152309
  }
152302
152310
  }
@@ -152487,7 +152495,7 @@ var GroupsBehaviorConstructor = ClusterBehavior.withInterface().for(Groups3.Clus
152487
152495
  var GroupsBehavior = GroupsBehaviorConstructor;
152488
152496
 
152489
152497
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/groups/GroupsServer.js
152490
- var logger143 = Logger.get("GroupsServer");
152498
+ var logger144 = Logger.get("GroupsServer");
152491
152499
  Groups3.Cluster.commands = {
152492
152500
  ...Groups3.Cluster.commands,
152493
152501
  addGroup: Command(
@@ -152551,7 +152559,7 @@ var GroupsServer = class extends GroupsBase {
152551
152559
  (fabric2, gkm) => gkm.addEndpointForGroup(fabric2, groupId3, endpointNumber, groupName)
152552
152560
  );
152553
152561
  } catch (error) {
152554
- logger143.error(error);
152562
+ logger144.error(error);
152555
152563
  StatusResponseError.accept(error);
152556
152564
  return { status: error.code, groupId: groupId3 };
152557
152565
  }
@@ -155591,7 +155599,7 @@ function miredsToXy(mireds) {
155591
155599
  }
155592
155600
 
155593
155601
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/color-control/ColorControlServer.js
155594
- var logger144 = Logger.get("ColorControlServer");
155602
+ var logger145 = Logger.get("ColorControlServer");
155595
155603
  var ColorControlBase = ColorControlBehavior.with(
155596
155604
  ColorControl3.Feature.HueSaturation,
155597
155605
  ColorControl3.Feature.EnhancedHue,
@@ -156772,7 +156780,7 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
156772
156780
  switch (oldMode) {
156773
156781
  case ColorControl3.ColorMode.CurrentHueAndCurrentSaturation:
156774
156782
  if (this.state.currentHue === void 0 || this.state.currentSaturation === void 0) {
156775
- logger144.warn("Could not convert from hue/saturation because one of them is undefined");
156783
+ logger145.warn("Could not convert from hue/saturation because one of them is undefined");
156776
156784
  break;
156777
156785
  }
156778
156786
  switch (newMode) {
@@ -156784,7 +156792,7 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
156784
156792
  case ColorControl3.ColorMode.ColorTemperatureMireds:
156785
156793
  const mireds = hsvToMireds(this.hue, this.saturation);
156786
156794
  if (mireds === void 0) {
156787
- logger144.warn(
156795
+ logger145.warn(
156788
156796
  `Could not convert hue/saturation (${this.hue}/${this.saturation}) to color temperature`
156789
156797
  );
156790
156798
  } else {
@@ -156795,7 +156803,7 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
156795
156803
  break;
156796
156804
  case ColorControl3.ColorMode.CurrentXAndCurrentY:
156797
156805
  if (this.state.currentX === void 0 || this.state.currentY === void 0) {
156798
- logger144.warn("Could not convert from xy because one of them is undefined");
156806
+ logger145.warn("Could not convert from xy because one of them is undefined");
156799
156807
  break;
156800
156808
  }
156801
156809
  switch (newMode) {
@@ -156807,7 +156815,7 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
156807
156815
  case ColorControl3.ColorMode.ColorTemperatureMireds:
156808
156816
  const mireds = xyToMireds(this.x, this.y);
156809
156817
  if (mireds === void 0) {
156810
- logger144.warn(`Could not convert xy ${this.x / this.y} to color temperature`);
156818
+ logger145.warn(`Could not convert xy ${this.x / this.y} to color temperature`);
156811
156819
  } else {
156812
156820
  this.mireds = mireds;
156813
156821
  }
@@ -156816,14 +156824,14 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
156816
156824
  break;
156817
156825
  case ColorControl3.ColorMode.ColorTemperatureMireds:
156818
156826
  if (this.state.colorTemperatureMireds === void 0) {
156819
- logger144.warn("Could not convert from color temperature because it is undefined");
156827
+ logger145.warn("Could not convert from color temperature because it is undefined");
156820
156828
  break;
156821
156829
  }
156822
156830
  switch (newMode) {
156823
156831
  case ColorControl3.ColorMode.CurrentHueAndCurrentSaturation:
156824
156832
  const hsvResult = miredsToHsv(this.mireds);
156825
156833
  if (hsvResult === void 0) {
156826
- logger144.warn(`Could not convert color temperature ${this.mireds} to hue/saturation`);
156834
+ logger145.warn(`Could not convert color temperature ${this.mireds} to hue/saturation`);
156827
156835
  } else {
156828
156836
  const [hue, saturation] = hsvResult;
156829
156837
  this.hue = hue;
@@ -156833,7 +156841,7 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
156833
156841
  case ColorControl3.ColorMode.CurrentXAndCurrentY:
156834
156842
  const xyResult = miredsToXy(this.mireds);
156835
156843
  if (xyResult === void 0) {
156836
- logger144.warn("Could not convert color temperature to xy");
156844
+ logger145.warn("Could not convert color temperature to xy");
156837
156845
  } else {
156838
156846
  const [x, y] = xyResult;
156839
156847
  this.x = x;
@@ -156882,7 +156890,7 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
156882
156890
  );
156883
156891
  newColorTemp = tempPhysMax - tempDelta;
156884
156892
  }
156885
- logger144.debug(`Synced color temperature with level: ${level}, new color temperature: ${newColorTemp}`);
156893
+ logger145.debug(`Synced color temperature with level: ${level}, new color temperature: ${newColorTemp}`);
156886
156894
  return this.moveToColorTemperatureLogic(newColorTemp, 0);
156887
156895
  }
156888
156896
  #assertRate(mode, rate) {
@@ -157086,7 +157094,7 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
157086
157094
  targetEnhancedColorMode = values4.enhancedColorMode;
157087
157095
  }
157088
157096
  if (!this.#supportsColorMode(targetEnhancedColorMode)) {
157089
- logger144.info(
157097
+ logger145.info(
157090
157098
  `Can not apply scene with unsupported color mode: ${ColorControl3.EnhancedColorMode[targetEnhancedColorMode]} (${targetEnhancedColorMode})`
157091
157099
  );
157092
157100
  }
@@ -157128,7 +157136,7 @@ var ColorControlBaseServer = class _ColorControlBaseServer extends ColorControlB
157128
157136
  }
157129
157137
  break;
157130
157138
  default:
157131
- logger144.info(
157139
+ logger145.info(
157132
157140
  `No supported color mode found to apply scene: ${ColorControl3.EnhancedColorMode[targetEnhancedColorMode]} (${targetEnhancedColorMode})`
157133
157141
  );
157134
157142
  break;
@@ -157221,7 +157229,7 @@ init_esm();
157221
157229
  init_ServerNode();
157222
157230
  init_esm4();
157223
157231
  init_esm3();
157224
- var logger145 = Logger.get("LevelControlServer");
157232
+ var logger146 = Logger.get("LevelControlServer");
157225
157233
  var LevelControlBase = LevelControlBehavior.with(LevelControl3.Feature.OnOff, LevelControl3.Feature.Lighting);
157226
157234
  var LevelControlBaseServer = class _LevelControlBaseServer extends LevelControlBase {
157227
157235
  /** Returns the minimum level, including feature specific fallback value handling. */
@@ -157308,17 +157316,17 @@ var LevelControlBaseServer = class _LevelControlBaseServer extends LevelControlB
157308
157316
  */
157309
157317
  initializeLighting() {
157310
157318
  if (this.state.currentLevel === 0) {
157311
- logger145.warn(
157319
+ logger146.warn(
157312
157320
  `The currentLevel value of ${this.state.currentLevel} is invalid according to Matter specification. The value must not be 0.`
157313
157321
  );
157314
157322
  }
157315
157323
  if (this.minLevel !== 1) {
157316
- logger145.warn(
157324
+ logger146.warn(
157317
157325
  `The minLevel value of ${this.minLevel} is invalid according to Matter specification. The value should be 1.`
157318
157326
  );
157319
157327
  }
157320
157328
  if (this.maxLevel !== 254) {
157321
- logger145.warn(
157329
+ logger146.warn(
157322
157330
  `The maxLevel value of ${this.maxLevel} is invalid according to Matter specification. The value should be 254.`
157323
157331
  );
157324
157332
  }
@@ -157629,7 +157637,7 @@ var LevelControlBaseServer = class _LevelControlBaseServer extends LevelControlB
157629
157637
  if (!onOff || this.state.onLevel === null) {
157630
157638
  return;
157631
157639
  }
157632
- logger145.debug(`OnOff changed to ON, setting level to onLevel value of ${this.state.onLevel}`);
157640
+ logger146.debug(`OnOff changed to ON, setting level to onLevel value of ${this.state.onLevel}`);
157633
157641
  this.state.currentLevel = this.state.onLevel;
157634
157642
  }
157635
157643
  #calculateEffectiveOptions(optionsMask, optionsOverride) {
@@ -158664,7 +158672,7 @@ var SwitchBehavior = SwitchBehaviorConstructor;
158664
158672
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/switch/SwitchServer.js
158665
158673
  var DEFAULT_MULTIPRESS_DELAY = Millis(300);
158666
158674
  var DEFAULT_LONG_PRESS_DELAY = Seconds(2);
158667
- var logger146 = Logger.get("SwitchServer");
158675
+ var logger147 = Logger.get("SwitchServer");
158668
158676
  var SwitchServerBase = SwitchBehavior.for(Switch3.Complete).with(
158669
158677
  Switch3.Feature.LatchingSwitch,
158670
158678
  Switch3.Feature.MomentarySwitch,
@@ -158718,7 +158726,7 @@ var SwitchBaseServer = class extends SwitchServerBase {
158718
158726
  this.internal.currentIsLongPress = false;
158719
158727
  this.internal.multiPressTimer?.stop();
158720
158728
  this.internal.longPressTimer?.stop();
158721
- logger146.info("State of Switch got reset");
158729
+ logger147.info("State of Switch got reset");
158722
158730
  }
158723
158731
  // TODO remove when Validator logic can assess that with 1.3 introduction
158724
158732
  #assertPositionInRange(position) {
@@ -159245,7 +159253,7 @@ var ModeSelectBehaviorConstructor = ClusterBehavior.withInterface().for(ModeSele
159245
159253
  var ModeSelectBehavior = ModeSelectBehaviorConstructor;
159246
159254
 
159247
159255
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/mode-select/ModeSelectServer.js
159248
- var logger147 = Logger.get("ModeSelectServer");
159256
+ var logger148 = Logger.get("ModeSelectServer");
159249
159257
  var ModeSelectBase = ModeSelectBehavior.with(ModeSelect3.Feature.OnOff);
159250
159258
  var ModeSelectBaseServer = class extends ModeSelectBase {
159251
159259
  initialize() {
@@ -159262,7 +159270,7 @@ var ModeSelectBaseServer = class extends ModeSelectBase {
159262
159270
  }
159263
159271
  this.reactTo(onOffServer.events.onOff$Changed, this.#handleOnOffDependency);
159264
159272
  } else {
159265
- logger147.warn("OnOffServer not found on endpoint, but OnMode is set.");
159273
+ logger148.warn("OnOffServer not found on endpoint, but OnMode is set.");
159266
159274
  }
159267
159275
  }
159268
159276
  if (!currentModeOverridden && this.state.startUpMode !== void 0 && this.state.startUpMode !== null && this.#getBootReason() !== GeneralDiagnostics3.BootReason.SoftwareUpdateCompleted) {
@@ -159483,7 +159491,7 @@ init_IdentifyServer();
159483
159491
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/occupancy-sensing/OccupancySensingServer.js
159484
159492
  init_occupancy_sensing();
159485
159493
  init_esm();
159486
- var logger148 = Logger.get("OccupancySensingServer");
159494
+ var logger149 = Logger.get("OccupancySensingServer");
159487
159495
  var holdTimeDependencies = [
159488
159496
  "holdTimeLimits",
159489
159497
  "pirOccupiedToUnoccupiedDelay",
@@ -159499,7 +159507,7 @@ var holdTimeDependencies = [
159499
159507
  var OccupancySensingServer = class extends OccupancySensingBehavior {
159500
159508
  initialize() {
159501
159509
  if (!Object.values(this.features).some((feature) => feature)) {
159502
- logger148.error(
159510
+ logger149.error(
159503
159511
  `OccupancySensingServer: Since revision 5 of the cluster features need to be set based on the detector type. Currently no features are enabled.`
159504
159512
  );
159505
159513
  } else if (!Object.values(this.state.occupancySensorTypeBitmap).some((feature) => feature) || this.state.occupancySensorType === void 0) {
@@ -159526,7 +159534,7 @@ var OccupancySensingServer = class extends OccupancySensingBehavior {
159526
159534
  } else if (this.state.occupancySensorTypeBitmap.physicalContact) {
159527
159535
  this.state.occupancySensorType = OccupancySensing3.OccupancySensorType.PhysicalContact;
159528
159536
  }
159529
- logger148.debug(
159537
+ logger149.debug(
159530
159538
  "Sync occupancySensorType to",
159531
159539
  OccupancySensing3.OccupancySensorType[this.state.occupancySensorType],
159532
159540
  "and occupancySensorTypeBitmap to",
@@ -160490,7 +160498,7 @@ init_esm3();
160490
160498
 
160491
160499
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/thermostat/AtomicWriteState.js
160492
160500
  init_esm();
160493
- var logger149 = Logger.get("AtomicWriteState");
160501
+ var logger150 = Logger.get("AtomicWriteState");
160494
160502
  var MAXIMUM_ALLOWED_TIMEOUT = Seconds(9);
160495
160503
  var AtomicWriteState = class {
160496
160504
  peerAddress;
@@ -160525,19 +160533,19 @@ var AtomicWriteState = class {
160525
160533
  });
160526
160534
  }
160527
160535
  start() {
160528
- logger149.debug(
160536
+ logger150.debug(
160529
160537
  `Starting atomic write state for peer ${this.peerAddress.toString()} on endpoint ${this.endpoint.id}`
160530
160538
  );
160531
160539
  this.#timer.start();
160532
160540
  }
160533
160541
  #timeoutTriggered() {
160534
- logger149.debug(
160542
+ logger150.debug(
160535
160543
  `Atomic write state for peer ${this.peerAddress.toString()} on endpoint ${this.endpoint.id} timed out`
160536
160544
  );
160537
160545
  this.close();
160538
160546
  }
160539
160547
  close() {
160540
- logger149.debug(
160548
+ logger150.debug(
160541
160549
  `Closing atomic write state for peer ${this.peerAddress.toString()} on endpoint ${this.endpoint.id}`
160542
160550
  );
160543
160551
  if (this.#timer.isRunning) {
@@ -160548,7 +160556,7 @@ var AtomicWriteState = class {
160548
160556
  };
160549
160557
 
160550
160558
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/thermostat/AtomicWriteHandler.js
160551
- var logger150 = Logger.get("AtomicWriteHandler");
160559
+ var logger151 = Logger.get("AtomicWriteHandler");
160552
160560
  var AtomicWriteHandler = class _AtomicWriteHandler {
160553
160561
  #observers = new ObserverGroup();
160554
160562
  #pendingWrites = new BasicSet();
@@ -160618,7 +160626,7 @@ var AtomicWriteHandler = class _AtomicWriteHandler {
160618
160626
  );
160619
160627
  this.#pendingWrites.add(state);
160620
160628
  state.closed.on(() => void this.#pendingWrites.delete(state));
160621
- logger150.debug("Added atomic write state:", state);
160629
+ logger151.debug("Added atomic write state:", state);
160622
160630
  return state;
160623
160631
  }
160624
160632
  if (existingState === void 0) {
@@ -160685,10 +160693,10 @@ var AtomicWriteHandler = class _AtomicWriteHandler {
160685
160693
  writeAttribute(context, endpoint, cluster2, attribute2, value) {
160686
160694
  const state = this.#assertPendingWriteForAttributeAndPeer(context, endpoint, cluster2, attribute2);
160687
160695
  const attributeName = state.attributeNames.get(attribute2);
160688
- logger150.debug(`Writing pending value for attribute ${attributeName}, ${attribute2} in atomic write`, value);
160696
+ logger151.debug(`Writing pending value for attribute ${attributeName}, ${attribute2} in atomic write`, value);
160689
160697
  endpoint.eventsOf(cluster2.id)[`${attributeName}$AtomicChanging`]?.emit(value, state.pendingAttributeValues[attribute2] !== void 0 ? state.pendingAttributeValues[attribute2] : state.initialValues[attribute2], context);
160690
160698
  state.pendingAttributeValues[attribute2] = value;
160691
- logger150.debug("Atomic write state after current write:", state);
160699
+ logger151.debug("Atomic write state after current write:", state);
160692
160700
  }
160693
160701
  /**
160694
160702
  * Implements the commit logic for an atomic write.
@@ -160707,7 +160715,7 @@ var AtomicWriteHandler = class _AtomicWriteHandler {
160707
160715
  await context.transaction?.commit();
160708
160716
  } catch (error) {
160709
160717
  await context.transaction?.rollback();
160710
- logger150.info(`Failed to write attribute ${attr} during atomic write commit: ${error}`);
160718
+ logger151.info(`Failed to write attribute ${attr} during atomic write commit: ${error}`);
160711
160719
  statusCode = error instanceof StatusResponseError ? error.code : Status2.Failure;
160712
160720
  commandStatusCode = commandStatusCode === Status2.Failure ? Status2.Failure : commandStatusCode === Status2.ConstraintError ? Status2.ConstraintError : Status2.Failure;
160713
160721
  }
@@ -160743,7 +160751,7 @@ var AtomicWriteHandler = class _AtomicWriteHandler {
160743
160751
  const fabricIndex = fabric.fabricIndex;
160744
160752
  for (const writeState of Array.from(this.#pendingWrites)) {
160745
160753
  if (writeState.peerAddress.fabricIndex === fabricIndex) {
160746
- logger150.debug(
160754
+ logger151.debug(
160747
160755
  `Closing atomic write state for peer ${writeState.peerAddress.toString()} on endpoint ${writeState.endpoint.id} due to fabric removal`
160748
160756
  );
160749
160757
  writeState.close();
@@ -160784,7 +160792,7 @@ var AtomicWriteHandler = class _AtomicWriteHandler {
160784
160792
  if (!PeerAddress.is(attrWriteState.peerAddress, peerAddress)) {
160785
160793
  return void 0;
160786
160794
  }
160787
- logger150.debug(
160795
+ logger151.debug(
160788
160796
  `Found pending value for attribute ${attribute2} for peer ${peerAddress.nodeId}`,
160789
160797
  serialize(attrWriteState.pendingAttributeValues[attribute2])
160790
160798
  );
@@ -160820,7 +160828,7 @@ var AtomicWriteHandler = class _AtomicWriteHandler {
160820
160828
  };
160821
160829
 
160822
160830
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/thermostat/ThermostatServer.js
160823
- var logger151 = Logger.get("ThermostatServer");
160831
+ var logger152 = Logger.get("ThermostatServer");
160824
160832
  var ThermostatBehaviorLogicBase = ThermostatBehavior.with(
160825
160833
  Thermostat3.Feature.Heating,
160826
160834
  Thermostat3.Feature.Cooling,
@@ -160849,7 +160857,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
160849
160857
  throw new ImplementationError("Setback feature is deprecated and not allowed to be enabled");
160850
160858
  }
160851
160859
  if (this.features.matterScheduleConfiguration) {
160852
- logger151.warn("MatterScheduleConfiguration feature is not yet implemented. Please do not activate it");
160860
+ logger152.warn("MatterScheduleConfiguration feature is not yet implemented. Please do not activate it");
160853
160861
  }
160854
160862
  const options = this.endpoint.behaviors.optionsFor(_ThermostatBaseServer);
160855
160863
  if (this.features.presets && this.state.persistedPresets === void 0) {
@@ -160967,7 +160975,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
160967
160975
  throw new StatusResponse.InvalidCommandError("Requested PresetHandle not found");
160968
160976
  }
160969
160977
  }
160970
- logger151.info(`Setting active preset handle to`, presetHandle);
160978
+ logger152.info(`Setting active preset handle to`, presetHandle);
160971
160979
  this.state.activePresetHandle = presetHandle;
160972
160980
  return preset;
160973
160981
  }
@@ -161037,7 +161045,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161037
161045
  }
161038
161046
  if (this.state.setpointHoldExpiryTimestamp === void 0) {
161039
161047
  } else {
161040
- logger151.warn(
161048
+ logger152.warn(
161041
161049
  "Handling for setpointHoldExpiryTimestamp is not yet implemented. To use this attribute you need to install the needed logic yourself"
161042
161050
  );
161043
161051
  }
@@ -161110,7 +161118,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161110
161118
  "RemoteSensing cannot be set to LocalTemperature when LocalTemperatureNotExposed feature is enabled"
161111
161119
  );
161112
161120
  }
161113
- logger151.debug("LocalTemperatureNotExposed feature is enabled, ignoring local temperature measurement");
161121
+ logger152.debug("LocalTemperatureNotExposed feature is enabled, ignoring local temperature measurement");
161114
161122
  this.state.localTemperature = null;
161115
161123
  }
161116
161124
  let localTemperature = null;
@@ -161119,11 +161127,11 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161119
161127
  const endpoints = this.env.get(ServerNode).endpoints;
161120
161128
  const endpoint = endpoints.has(localTempEndpoint) ? endpoints.for(localTempEndpoint) : void 0;
161121
161129
  if (endpoint !== void 0 && endpoint.behaviors.has(TemperatureMeasurementServer)) {
161122
- logger151.debug(
161130
+ logger152.debug(
161123
161131
  `Using existing TemperatureMeasurement cluster on endpoint #${localTempEndpoint} for local temperature measurement`
161124
161132
  );
161125
161133
  if (this.state.externalMeasuredIndoorTemperature !== void 0) {
161126
- logger151.warn(
161134
+ logger152.warn(
161127
161135
  "Both local TemperatureMeasurement cluster and externalMeasuredIndoorTemperature state are set, using local cluster"
161128
161136
  );
161129
161137
  }
@@ -161133,19 +161141,19 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161133
161141
  );
161134
161142
  localTemperature = endpoint.stateOf(TemperatureMeasurementServer).measuredValue;
161135
161143
  } else {
161136
- logger151.warn(
161144
+ logger152.warn(
161137
161145
  `No TemperatureMeasurement cluster found on endpoint #${localTempEndpoint}, falling back to externalMeasuredIndoorTemperature state if set`
161138
161146
  );
161139
161147
  }
161140
161148
  } else {
161141
161149
  if (this.state.externalMeasuredIndoorTemperature === void 0) {
161142
161150
  if (this.state.localTemperatureCalibration !== void 0) {
161143
- logger151.warn(
161151
+ logger152.warn(
161144
161152
  "No local TemperatureMeasurement cluster available, externalMeasuredIndoorTemperature state not set but localTemperatureCalibration is used: Ensure to correctly consider the calibration when updating the localTemperature value"
161145
161153
  );
161146
161154
  }
161147
161155
  } else {
161148
- logger151.info("Using measured temperature via externalMeasuredIndoorTemperature state");
161156
+ logger152.info("Using measured temperature via externalMeasuredIndoorTemperature state");
161149
161157
  localTemperature = this.state.externalMeasuredIndoorTemperature ?? null;
161150
161158
  }
161151
161159
  this.reactTo(this.events.externalMeasuredIndoorTemperature$Changed, this.#handleMeasuredTemperatureChange);
@@ -161185,28 +161193,28 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161185
161193
  const endpoints = this.env.get(ServerNode).endpoints;
161186
161194
  const endpoint = endpoints.has(localOccupancyEndpoint) ? endpoints.for(localOccupancyEndpoint) : void 0;
161187
161195
  if (endpoint !== void 0 && endpoint.behaviors.has(OccupancySensingServer)) {
161188
- logger151.debug(
161196
+ logger152.debug(
161189
161197
  `Using existing OccupancySensing cluster on endpoint ${localOccupancyEndpoint} for local occupancy sensing`
161190
161198
  );
161191
161199
  if (this.state.externallyMeasuredOccupancy !== void 0) {
161192
- logger151.warn(
161200
+ logger152.warn(
161193
161201
  "Both local OccupancySensing cluster and externallyMeasuredOccupancy state are set, using local cluster"
161194
161202
  );
161195
161203
  }
161196
161204
  this.reactTo(endpoint.eventsOf(OccupancySensingServer).occupancy$Changed, this.#handleOccupancyChange);
161197
161205
  currentOccupancy = !!endpoint.stateOf(OccupancySensingServer).occupancy.occupied;
161198
161206
  } else {
161199
- logger151.warn(
161207
+ logger152.warn(
161200
161208
  `No OccupancySensing cluster found on endpoint ${localOccupancyEndpoint}, falling back to externallyMeasuredOccupancy state if set`
161201
161209
  );
161202
161210
  }
161203
161211
  } else {
161204
161212
  if (this.state.externallyMeasuredOccupancy === void 0) {
161205
- logger151.warn(
161213
+ logger152.warn(
161206
161214
  "No local OccupancySensing cluster available and externallyMeasuredOccupancy state not set"
161207
161215
  );
161208
161216
  } else {
161209
- logger151.info("Using occupancy via externallyMeasuredOccupancy state");
161217
+ logger152.info("Using occupancy via externallyMeasuredOccupancy state");
161210
161218
  currentOccupancy = this.state.externallyMeasuredOccupancy;
161211
161219
  }
161212
161220
  this.reactTo(this.events.externallyMeasuredOccupancy$Changed, this.#handleExternalOccupancyChange);
@@ -161473,7 +161481,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161473
161481
  max = this.state[`max${scope}`] ?? defaults.absMax,
161474
161482
  absMax = this.state[`absMax${scope}`] ?? defaults.absMax
161475
161483
  } = details;
161476
- logger151.debug(
161484
+ logger152.debug(
161477
161485
  `Validating user setpoint limits for ${scope}: absMin=${absMin}, min=${min}, max=${max}, absMax=${absMax}`
161478
161486
  );
161479
161487
  if (absMin > min) {
@@ -161520,7 +161528,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161520
161528
  const limitMax = scope === "Heat" ? this.heatSetpointMaximum : this.coolSetpointMaximum;
161521
161529
  const result = cropValueRange(setpoint, limitMin, limitMax);
161522
161530
  if (result !== setpoint) {
161523
- logger151.debug(
161531
+ logger152.debug(
161524
161532
  `${scope} setpoint (${setpoint}) is out of limits [${limitMin}, ${limitMax}], clamping to ${result}`
161525
161533
  );
161526
161534
  }
@@ -161557,7 +161565,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161557
161565
  const otherLimit = otherType === "Heating" ? this.heatSetpointMinimum : this.coolSetpointMaximum;
161558
161566
  if (otherType === "Cooling") {
161559
161567
  const minValidSetpoint = value + deadband;
161560
- logger151.debug(
161568
+ logger152.debug(
161561
161569
  `Ensuring deadband for ${type}${otherType}Setpoint, min valid setpoint is ${minValidSetpoint}`
161562
161570
  );
161563
161571
  if (otherSetpoint >= minValidSetpoint) {
@@ -161568,11 +161576,11 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161568
161576
  `Cannot adjust cooling setpoint to maintain deadband, would exceed max cooling setpoint (${otherLimit})`
161569
161577
  );
161570
161578
  }
161571
- logger151.debug(`Adjusting ${type}${otherType}Setpoint to ${minValidSetpoint} to maintain deadband`);
161579
+ logger152.debug(`Adjusting ${type}${otherType}Setpoint to ${minValidSetpoint} to maintain deadband`);
161572
161580
  this.state[`${type}${otherType}Setpoint`] = minValidSetpoint;
161573
161581
  } else {
161574
161582
  const maxValidSetpoint = value - deadband;
161575
- logger151.debug(
161583
+ logger152.debug(
161576
161584
  `Ensuring deadband for ${type}${otherType}Setpoint, max valid setpoint is ${maxValidSetpoint}`
161577
161585
  );
161578
161586
  if (otherSetpoint <= maxValidSetpoint) {
@@ -161583,7 +161591,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161583
161591
  `Cannot adjust heating setpoint to maintain deadband, would exceed min heating setpoint (${otherLimit})`
161584
161592
  );
161585
161593
  }
161586
- logger151.debug(`Adjusting ${type}${otherType}Setpoint to ${maxValidSetpoint} to maintain deadband`);
161594
+ logger152.debug(`Adjusting ${type}${otherType}Setpoint to ${maxValidSetpoint} to maintain deadband`);
161587
161595
  this.state[`${type}${otherType}Setpoint`] = maxValidSetpoint;
161588
161596
  }
161589
161597
  }
@@ -161851,7 +161859,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161851
161859
  */
161852
161860
  #handlePersistedPresetsChanged(newPresets, oldPresets) {
161853
161861
  if (oldPresets === void 0) {
161854
- logger151.debug(
161862
+ logger152.debug(
161855
161863
  "Old presets is undefined, skipping some checks. This should only happen on setup of the behavior."
161856
161864
  );
161857
161865
  }
@@ -161860,7 +161868,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161860
161868
  const newPresetHandles = /* @__PURE__ */ new Set();
161861
161869
  for (const preset of newPresets) {
161862
161870
  if (preset.presetHandle === null) {
161863
- logger151.error("Preset is missing presetHandle, generating a new one");
161871
+ logger152.error("Preset is missing presetHandle, generating a new one");
161864
161872
  preset.presetHandle = entropy.randomBytes(16);
161865
161873
  changed = true;
161866
161874
  }
@@ -161909,7 +161917,7 @@ var ThermostatBaseServer = class _ThermostatBaseServer extends ThermostatBehavio
161909
161917
  throw new StatusResponse.InvalidInStateError(`ActivePresetHandle references non-existing presetHandle`);
161910
161918
  }
161911
161919
  if (changed) {
161912
- logger151.error("PresetHandles or BuiltIn flags were updated, updating persistedPresets");
161920
+ logger152.error("PresetHandles or BuiltIn flags were updated, updating persistedPresets");
161913
161921
  this.state.persistedPresets = deepCopy(newPresets);
161914
161922
  }
161915
161923
  }
@@ -162811,7 +162819,7 @@ init_IdentifyServer();
162811
162819
  init_window_covering();
162812
162820
  init_esm();
162813
162821
  init_esm3();
162814
- var logger152 = Logger.get("WindowCoveringServer");
162822
+ var logger153 = Logger.get("WindowCoveringServer");
162815
162823
  var WindowCoveringBase = WindowCoveringBehavior.with(
162816
162824
  WindowCovering3.Feature.Lift,
162817
162825
  WindowCovering3.Feature.Tilt,
@@ -162896,7 +162904,7 @@ var WindowCoveringBaseServer = class extends WindowCoveringBase {
162896
162904
  this.state.configStatus = configStatus;
162897
162905
  });
162898
162906
  }
162899
- logger152.debug(
162907
+ logger153.debug(
162900
162908
  `Mode changed to ${Diagnostic.json(mode)} and config status to ${Diagnostic.json(configStatus)} and internal calibration mode to ${this.internal.calibrationMode}`
162901
162909
  );
162902
162910
  }
@@ -162904,7 +162912,7 @@ var WindowCoveringBaseServer = class extends WindowCoveringBase {
162904
162912
  #handleOperationalStatusChanging(operationalStatus) {
162905
162913
  const globalStatus = operationalStatus.lift !== WindowCovering3.MovementStatus.Stopped ? operationalStatus.lift : operationalStatus.tilt;
162906
162914
  operationalStatus.global = globalStatus;
162907
- logger152.debug(
162915
+ logger153.debug(
162908
162916
  `Operational status changed to ${Diagnostic.json(operationalStatus)} with new global status ${globalStatus}`
162909
162917
  );
162910
162918
  this.state.operationalStatus = operationalStatus;
@@ -162933,10 +162941,10 @@ var WindowCoveringBaseServer = class extends WindowCoveringBase {
162933
162941
  this.state.currentPositionLiftPercentage = percent100ths3 === null ? percent100ths3 : Math.floor(percent100ths3 / WC_PERCENT100THS_COEFFICIENT);
162934
162942
  if (this.state.operationalStatus.lift !== WindowCovering3.MovementStatus.Stopped && percent100ths3 === this.state.targetPositionLiftPercent100ths) {
162935
162943
  this.state.operationalStatus.lift = WindowCovering3.MovementStatus.Stopped;
162936
- logger152.debug("Lift movement stopped, target value reached");
162944
+ logger153.debug("Lift movement stopped, target value reached");
162937
162945
  }
162938
162946
  }
162939
- logger152.debug(
162947
+ logger153.debug(
162940
162948
  `Syncing lift position ${this.state.currentPositionLiftPercent100ths === null ? null : (this.state.currentPositionLiftPercent100ths / 100).toFixed(2)} to ${this.state.currentPositionLiftPercentage}%`
162941
162949
  );
162942
162950
  }
@@ -162946,10 +162954,10 @@ var WindowCoveringBaseServer = class extends WindowCoveringBase {
162946
162954
  this.state.currentPositionTiltPercentage = percent100ths3 === null ? percent100ths3 : Math.floor(percent100ths3 / WC_PERCENT100THS_COEFFICIENT);
162947
162955
  if (this.state.operationalStatus.tilt !== WindowCovering3.MovementStatus.Stopped && percent100ths3 === this.state.targetPositionTiltPercent100ths) {
162948
162956
  this.state.operationalStatus.tilt = WindowCovering3.MovementStatus.Stopped;
162949
- logger152.debug("Tilt movement stopped, target value reached");
162957
+ logger153.debug("Tilt movement stopped, target value reached");
162950
162958
  }
162951
162959
  }
162952
- logger152.debug(
162960
+ logger153.debug(
162953
162961
  `Syncing tilt position ${this.state.currentPositionTiltPercent100ths === null ? null : (this.state.currentPositionTiltPercent100ths / 100).toFixed(2)} to ${this.state.currentPositionTiltPercentage}%`
162954
162962
  );
162955
162963
  }
@@ -163037,7 +163045,7 @@ var WindowCoveringBaseServer = class extends WindowCoveringBase {
163037
163045
  }
163038
163046
  const directionInfo = direction === 2 ? ` in direction by position` : ` in direction ${direction === 1 ? "Close" : "Open"}`;
163039
163047
  const targetInfo = targetPercent100ths === void 0 ? "" : ` to target position ${(targetPercent100ths / 100).toFixed(2)}`;
163040
- logger152.debug(
163048
+ logger153.debug(
163041
163049
  `Moving the device ${type === 0 ? "Lift" : "Tilt"}${directionInfo} (reversed=${reversed})${targetInfo}`
163042
163050
  );
163043
163051
  }
@@ -163059,7 +163067,7 @@ var WindowCoveringBaseServer = class extends WindowCoveringBase {
163059
163067
  );
163060
163068
  }
163061
163069
  if (type === 0 && this.state.configStatus.liftMovementReversed) {
163062
- logger152.debug("Lift movement is reversed");
163070
+ logger153.debug("Lift movement is reversed");
163063
163071
  }
163064
163072
  switch (type) {
163065
163073
  case 0:
@@ -163421,7 +163429,7 @@ var BridgedDeviceBasicInformationBehaviorConstructor = ClusterBehavior.withInter
163421
163429
  var BridgedDeviceBasicInformationBehavior = BridgedDeviceBasicInformationBehaviorConstructor;
163422
163430
 
163423
163431
  // ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/behaviors/bridged-device-basic-information/BridgedDeviceBasicInformationServer.js
163424
- var logger153 = Logger.get("BridgedDeviceBasicInformationServer");
163432
+ var logger154 = Logger.get("BridgedDeviceBasicInformationServer");
163425
163433
  var BridgedDeviceBasicInformationServer = class extends BridgedDeviceBasicInformationBehavior {
163426
163434
  async initialize() {
163427
163435
  if (this.endpoint.lifecycle.isInstalled) {
@@ -163436,7 +163444,7 @@ var BridgedDeviceBasicInformationServer = class extends BridgedDeviceBasicInform
163436
163444
  this.state.uniqueId = BasicInformationServer.createUniqueId();
163437
163445
  }
163438
163446
  if (serialNumber !== void 0 && uniqueId === this.state.serialNumber) {
163439
- logger153.warn("uniqueId and serialNumber shall not be the same.");
163447
+ logger154.warn("uniqueId and serialNumber shall not be the same.");
163440
163448
  }
163441
163449
  }
163442
163450
  static schema = BasicInformationServer.enableUniqueIdPersistence(
@@ -164019,10 +164027,10 @@ function ensureCommissioningConfig(server) {
164019
164027
  // src/services/bridges/bridge.ts
164020
164028
  var AUTO_FORCE_SYNC_INTERVAL_MS = 9e4;
164021
164029
  var Bridge = class {
164022
- constructor(env, logger192, dataProvider, endpointManager) {
164030
+ constructor(env, logger194, dataProvider, endpointManager) {
164023
164031
  this.dataProvider = dataProvider;
164024
164032
  this.endpointManager = endpointManager;
164025
- this.log = logger192.get(`Bridge / ${dataProvider.id}`);
164033
+ this.log = logger194.get(`Bridge / ${dataProvider.id}`);
164026
164034
  this.server = new BridgeServerNode(
164027
164035
  env,
164028
164036
  this.dataProvider,
@@ -165236,7 +165244,7 @@ import crypto5 from "node:crypto";
165236
165244
 
165237
165245
  // src/utils/apply-patch-state.ts
165238
165246
  init_esm();
165239
- var logger154 = Logger.get("ApplyPatchState");
165247
+ var logger155 = Logger.get("ApplyPatchState");
165240
165248
  function applyPatchState(state, patch, options) {
165241
165249
  return applyPatch(state, patch, options?.force);
165242
165250
  }
@@ -165263,23 +165271,23 @@ function applyPatch(state, patch, force = false) {
165263
165271
  if (errorMessage.includes(
165264
165272
  "Endpoint storage inaccessible because endpoint is not a node and is not owned by another endpoint"
165265
165273
  )) {
165266
- logger154.debug(
165274
+ logger155.debug(
165267
165275
  `Suppressed endpoint storage error, patch not applied: ${JSON.stringify(actualPatch)}`
165268
165276
  );
165269
165277
  return actualPatch;
165270
165278
  }
165271
165279
  if (errorMessage.includes("synchronous-transaction-conflict")) {
165272
- logger154.warn(
165280
+ logger155.warn(
165273
165281
  `Transaction conflict, state update DROPPED: ${JSON.stringify(actualPatch)}`
165274
165282
  );
165275
165283
  return actualPatch;
165276
165284
  }
165277
165285
  failedKeys.push(key);
165278
- logger154.warn(`Failed to set property '${key}': ${errorMessage}`);
165286
+ logger155.warn(`Failed to set property '${key}': ${errorMessage}`);
165279
165287
  }
165280
165288
  }
165281
165289
  if (failedKeys.length > 0) {
165282
- logger154.warn(
165290
+ logger155.warn(
165283
165291
  `${failedKeys.length} properties failed to update: [${failedKeys.join(", ")}]`
165284
165292
  );
165285
165293
  }
@@ -165354,7 +165362,7 @@ init_home_assistant_entity_behavior();
165354
165362
  // src/matter/behaviors/humidity-measurement-server.ts
165355
165363
  init_esm();
165356
165364
  init_home_assistant_entity_behavior();
165357
- var logger155 = Logger.get("HumidityMeasurementServer");
165365
+ var logger156 = Logger.get("HumidityMeasurementServer");
165358
165366
  var HumidityMeasurementServerBase = class extends RelativeHumidityMeasurementServer {
165359
165367
  async initialize() {
165360
165368
  await super.initialize();
@@ -165367,7 +165375,7 @@ var HumidityMeasurementServerBase = class extends RelativeHumidityMeasurementSer
165367
165375
  return;
165368
165376
  }
165369
165377
  const humidity = this.getHumidity(this.state.config, entity.state);
165370
- logger155.debug(
165378
+ logger156.debug(
165371
165379
  `Humidity ${entity.state.entity_id} raw=${entity.state.state} measuredValue=${humidity}`
165372
165380
  );
165373
165381
  applyPatchState(this.state, {
@@ -165407,7 +165415,7 @@ init_clusters();
165407
165415
 
165408
165416
  // src/matter/behaviors/power-source-server.ts
165409
165417
  init_home_assistant_entity_behavior();
165410
- var logger156 = Logger.get("PowerSourceServer");
165418
+ var logger157 = Logger.get("PowerSourceServer");
165411
165419
  var FeaturedBase = PowerSourceServer.with("Battery", "Rechargeable");
165412
165420
  var PowerSourceServerBase = class extends FeaturedBase {
165413
165421
  async initialize() {
@@ -165419,17 +165427,17 @@ var PowerSourceServerBase = class extends FeaturedBase {
165419
165427
  applyPatchState(this.state, {
165420
165428
  endpointList: [endpointNumber]
165421
165429
  });
165422
- logger156.debug(
165430
+ logger157.debug(
165423
165431
  `[${entityId}] PowerSource initialized with endpointList=[${endpointNumber}]`
165424
165432
  );
165425
165433
  } else {
165426
- logger156.warn(
165434
+ logger157.warn(
165427
165435
  `[${entityId}] PowerSource endpoint number is null during initialize - endpointList will be empty!`
165428
165436
  );
165429
165437
  }
165430
165438
  const batteryEntity = homeAssistant.state.mapping?.batteryEntity;
165431
165439
  if (batteryEntity) {
165432
- logger156.debug(
165440
+ logger157.debug(
165433
165441
  `[${entityId}] PowerSource using mapped battery entity: ${batteryEntity}`
165434
165442
  );
165435
165443
  }
@@ -166113,7 +166121,7 @@ var lastTurnOnTimestamps = /* @__PURE__ */ new Map();
166113
166121
  function notifyLightTurnedOn(entityId) {
166114
166122
  lastTurnOnTimestamps.set(entityId, Date.now());
166115
166123
  }
166116
- var logger157 = Logger.get("LevelControlServer");
166124
+ var logger158 = Logger.get("LevelControlServer");
166117
166125
  var FeaturedBase4 = LevelControlServer.with("OnOff", "Lighting");
166118
166126
  var LevelControlServerBase = class extends FeaturedBase4 {
166119
166127
  pendingTransitionTime;
@@ -166128,12 +166136,12 @@ var LevelControlServerBase = class extends FeaturedBase4 {
166128
166136
  this.state.maxLevel = 254;
166129
166137
  }
166130
166138
  this.state.onLevel = null;
166131
- logger157.debug(`initialize: calling super.initialize()`);
166139
+ logger158.debug(`initialize: calling super.initialize()`);
166132
166140
  try {
166133
166141
  await super.initialize();
166134
- logger157.debug(`initialize: super.initialize() completed successfully`);
166142
+ logger158.debug(`initialize: super.initialize() completed successfully`);
166135
166143
  } catch (error) {
166136
- logger157.error(`initialize: super.initialize() FAILED:`, error);
166144
+ logger158.error(`initialize: super.initialize() FAILED:`, error);
166137
166145
  throw error;
166138
166146
  }
166139
166147
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
@@ -166199,7 +166207,7 @@ var LevelControlServerBase = class extends FeaturedBase4 {
166199
166207
  const timeSinceTurnOn = lastTurnOn ? Date.now() - lastTurnOn : Infinity;
166200
166208
  const isMaxBrightness = level >= this.maxLevel;
166201
166209
  if (isMaxBrightness && timeSinceTurnOn < 200) {
166202
- logger157.debug(
166210
+ logger158.debug(
166203
166211
  `[${entityId}] Ignoring moveToLevel(${level}) - Alexa brightness reset detected (${timeSinceTurnOn}ms after turn-on)`
166204
166212
  );
166205
166213
  return;
@@ -166238,7 +166246,7 @@ function LevelControlServer2(config10) {
166238
166246
  }
166239
166247
 
166240
166248
  // src/matter/behaviors/on-off-server.ts
166241
- var logger158 = Logger.get("OnOffServer");
166249
+ var logger159 = Logger.get("OnOffServer");
166242
166250
  var OnOffServerBase = class extends OnOffServer {
166243
166251
  async initialize() {
166244
166252
  await super.initialize();
@@ -166264,7 +166272,7 @@ var OnOffServerBase = class extends OnOffServer {
166264
166272
  const action = turnOn?.(void 0, this.agent) ?? {
166265
166273
  action: "homeassistant.turn_on"
166266
166274
  };
166267
- logger158.info(`[${homeAssistant.entityId}] Turning ON -> ${action.action}`);
166275
+ logger159.info(`[${homeAssistant.entityId}] Turning ON -> ${action.action}`);
166268
166276
  notifyLightTurnedOn(homeAssistant.entityId);
166269
166277
  applyPatchState(this.state, { onOff: true });
166270
166278
  homeAssistant.callAction(action);
@@ -166282,7 +166290,7 @@ var OnOffServerBase = class extends OnOffServer {
166282
166290
  const action = turnOff?.(void 0, this.agent) ?? {
166283
166291
  action: "homeassistant.turn_off"
166284
166292
  };
166285
- logger158.info(`[${homeAssistant.entityId}] Turning OFF -> ${action.action}`);
166293
+ logger159.info(`[${homeAssistant.entityId}] Turning OFF -> ${action.action}`);
166286
166294
  applyPatchState(this.state, { onOff: false });
166287
166295
  homeAssistant.callAction(action);
166288
166296
  }
@@ -166308,7 +166316,7 @@ var FanOnOffServer = OnOffServer2({
166308
166316
  });
166309
166317
 
166310
166318
  // src/matter/endpoints/composed/composed-air-purifier-endpoint.ts
166311
- var logger159 = Logger.get("ComposedAirPurifierEndpoint");
166319
+ var logger160 = Logger.get("ComposedAirPurifierEndpoint");
166312
166320
  function createTemperatureConfig(temperatureEntityId) {
166313
166321
  return {
166314
166322
  getValue(_entity, agent) {
@@ -166463,7 +166471,7 @@ var ComposedAirPurifierEndpoint = class _ComposedAirPurifierEndpoint extends End
166463
166471
  config10.humidityEntityId ? "+Hum" : "",
166464
166472
  config10.batteryEntityId ? "+Bat" : ""
166465
166473
  ].filter(Boolean).join("");
166466
- logger159.info(`Created air purifier ${primaryEntityId}: ${clusterLabels}`);
166474
+ logger160.info(`Created air purifier ${primaryEntityId}: ${clusterLabels}`);
166467
166475
  return endpoint;
166468
166476
  }
166469
166477
  constructor(type, entityId, id, trackedEntityIds) {
@@ -166558,7 +166566,7 @@ init_home_assistant_entity_behavior();
166558
166566
  // src/matter/behaviors/pressure-measurement-server.ts
166559
166567
  init_esm();
166560
166568
  init_home_assistant_entity_behavior();
166561
- var logger160 = Logger.get("PressureMeasurementServer");
166569
+ var logger161 = Logger.get("PressureMeasurementServer");
166562
166570
  var MIN_PRESSURE = 300;
166563
166571
  var MAX_PRESSURE = 1100;
166564
166572
  var PressureMeasurementServerBase = class extends PressureMeasurementServer {
@@ -166586,7 +166594,7 @@ var PressureMeasurementServerBase = class extends PressureMeasurementServer {
166586
166594
  }
166587
166595
  const rounded = Math.round(value);
166588
166596
  if (rounded < MIN_PRESSURE || rounded > MAX_PRESSURE) {
166589
- logger160.warn(
166597
+ logger161.warn(
166590
166598
  `Pressure value ${rounded} (raw: ${value}) for ${entity.entity_id} is outside valid range [${MIN_PRESSURE}-${MAX_PRESSURE}], ignoring`
166591
166599
  );
166592
166600
  return null;
@@ -166605,7 +166613,7 @@ function PressureMeasurementServer2(config10) {
166605
166613
  }
166606
166614
 
166607
166615
  // src/matter/endpoints/composed/composed-sensor-endpoint.ts
166608
- var logger161 = Logger.get("ComposedSensorEndpoint");
166616
+ var logger162 = Logger.get("ComposedSensorEndpoint");
166609
166617
  var temperatureConfig = {
166610
166618
  getValue(entity, agent) {
166611
166619
  const fallbackUnit = agent.env.get(HomeAssistantConfig).unitSystem.temperature;
@@ -166764,7 +166772,7 @@ var ComposedSensorEndpoint = class _ComposedSensorEndpoint extends Endpoint {
166764
166772
  if (config10.pressureEntityId && pressSub) {
166765
166773
  endpoint.subEndpoints.set(config10.pressureEntityId, pressSub);
166766
166774
  }
166767
- logger161.info(
166775
+ logger162.info(
166768
166776
  `Created composed sensor ${primaryEntityId} with ${parts.length} sub-endpoint(s): T${humSub ? "+H" : ""}${pressSub ? "+P" : ""}${config10.batteryEntityId ? "+Bat" : ""}`
166769
166777
  );
166770
166778
  return endpoint;
@@ -166890,7 +166898,7 @@ init_home_assistant_entity_behavior();
166890
166898
  // src/matter/behaviors/mode-select-server.ts
166891
166899
  init_esm();
166892
166900
  init_home_assistant_entity_behavior();
166893
- var logger162 = Logger.get("ModeSelectServer");
166901
+ var logger163 = Logger.get("ModeSelectServer");
166894
166902
  var ModeSelectServerBase = class extends ModeSelectServer {
166895
166903
  async initialize() {
166896
166904
  await super.initialize();
@@ -166919,13 +166927,13 @@ var ModeSelectServerBase = class extends ModeSelectServer {
166919
166927
  const options = config10.getOptions(homeAssistant.entity);
166920
166928
  const { newMode } = request;
166921
166929
  if (newMode < 0 || newMode >= options.length) {
166922
- logger162.warn(
166930
+ logger163.warn(
166923
166931
  `[${homeAssistant.entityId}] Invalid mode ${newMode}, options: [${options.join(", ")}]`
166924
166932
  );
166925
166933
  return;
166926
166934
  }
166927
166935
  const option = options[newMode];
166928
- logger162.info(
166936
+ logger163.info(
166929
166937
  `[${homeAssistant.entityId}] changeToMode(${newMode}) -> "${option}"`
166930
166938
  );
166931
166939
  applyPatchState(this.state, { currentMode: newMode });
@@ -167370,7 +167378,7 @@ var WaterLeakDetectorType = WaterLeakDetectorDevice.with(
167370
167378
  );
167371
167379
 
167372
167380
  // src/matter/endpoints/legacy/binary-sensor/index.ts
167373
- var logger163 = Logger.get("BinarySensorDevice");
167381
+ var logger164 = Logger.get("BinarySensorDevice");
167374
167382
  var deviceClasses = {
167375
167383
  [BinarySensorDeviceClass.CarbonMonoxide]: CoAlarmType,
167376
167384
  [BinarySensorDeviceClass.Gas]: CoAlarmType,
@@ -167420,11 +167428,11 @@ function BinarySensorDevice(homeAssistantEntity) {
167420
167428
  const originalTypeName = type.name;
167421
167429
  if (hasBattery && batteryTypes.has(type)) {
167422
167430
  type = batteryTypes.get(type);
167423
- logger163.info(
167431
+ logger164.info(
167424
167432
  `[${entityId}] Using battery variant: ${originalTypeName} -> ${type.name}, batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"}`
167425
167433
  );
167426
167434
  } else if (hasBattery) {
167427
- logger163.warn(
167435
+ logger164.warn(
167428
167436
  `[${entityId}] Has battery but no variant available for ${originalTypeName}`
167429
167437
  );
167430
167438
  }
@@ -167571,7 +167579,7 @@ init_home_assistant_entity_behavior();
167571
167579
  // src/matter/behaviors/thermostat-server.ts
167572
167580
  init_esm();
167573
167581
  init_home_assistant_entity_behavior();
167574
- var logger164 = Logger.get("ThermostatServer");
167582
+ var logger165 = Logger.get("ThermostatServer");
167575
167583
  var SystemMode = Thermostat3.SystemMode;
167576
167584
  var RunningMode = Thermostat3.ThermostatRunningMode;
167577
167585
  var nudgingSetpoints = /* @__PURE__ */ new Set();
@@ -167629,7 +167637,7 @@ var HeatingAndCoolingFeaturedBase = ThermostatServer.with("Heating", "Cooling").
167629
167637
  );
167630
167638
  function thermostatPreInitialize(self) {
167631
167639
  const currentLocal = self.state.localTemperature;
167632
- logger164.debug(
167640
+ logger165.debug(
167633
167641
  `initialize: features - heating=${self.features.heating}, cooling=${self.features.cooling}`
167634
167642
  );
167635
167643
  const localValue = typeof currentLocal === "number" && !Number.isNaN(currentLocal) ? currentLocal : currentLocal === null ? null : 2100;
@@ -167652,7 +167660,7 @@ function thermostatPreInitialize(self) {
167652
167660
  const coolingValue = typeof currentCooling === "number" && !Number.isNaN(currentCooling) ? currentCooling : 2400;
167653
167661
  self.state.occupiedCoolingSetpoint = coolingValue;
167654
167662
  }
167655
- logger164.debug(
167663
+ logger165.debug(
167656
167664
  `initialize: after force-set - local=${self.state.localTemperature}`
167657
167665
  );
167658
167666
  self.state.thermostatRunningState = runningStateAllOff;
@@ -167734,7 +167742,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167734
167742
  maxCoolLimit,
167735
167743
  "cool"
167736
167744
  );
167737
- logger164.debug(
167745
+ logger165.debug(
167738
167746
  `update: limits heat=[${minHeatLimit}, ${maxHeatLimit}], cool=[${minCoolLimit}, ${maxCoolLimit}], systemMode=${systemMode}, runningMode=${runningMode}`
167739
167747
  );
167740
167748
  const controlSequence = config10.getControlSequence(entity.state, this.agent);
@@ -167806,18 +167814,18 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167806
167814
  */
167807
167815
  // biome-ignore lint/correctness/noUnusedPrivateClassMembers: Called via thermostatPostInitialize + prototype copy
167808
167816
  heatingSetpointChanging(value, _oldValue, context) {
167809
- logger164.debug(
167817
+ logger165.debug(
167810
167818
  `heatingSetpointChanging: value=${value}, oldValue=${_oldValue}, isOffline=${transactionIsOffline(context)}`
167811
167819
  );
167812
167820
  if (transactionIsOffline(context)) {
167813
- logger164.debug(
167821
+ logger165.debug(
167814
167822
  "heatingSetpointChanging: skipping - transaction is offline"
167815
167823
  );
167816
167824
  return;
167817
167825
  }
167818
167826
  const next = Temperature.celsius(value / 100);
167819
167827
  if (!next) {
167820
- logger164.debug("heatingSetpointChanging: skipping - invalid temperature");
167828
+ logger165.debug("heatingSetpointChanging: skipping - invalid temperature");
167821
167829
  return;
167822
167830
  }
167823
167831
  this.agent.asLocalActor(() => {
@@ -167828,7 +167836,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167828
167836
  this.agent
167829
167837
  );
167830
167838
  const currentMode = this.state.systemMode;
167831
- logger164.debug(
167839
+ logger165.debug(
167832
167840
  `heatingSetpointChanging: supportsRange=${supportsRange}, systemMode=${currentMode}, features.heating=${this.features.heating}, features.cooling=${this.features.cooling}`
167833
167841
  );
167834
167842
  if (!supportsRange) {
@@ -167838,12 +167846,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167838
167846
  const isOff = currentMode === Thermostat3.SystemMode.Off;
167839
167847
  if (isOff && this.features.heating) {
167840
167848
  if (nudgingSetpoints.has(homeAssistant.entityId)) {
167841
- logger164.debug(
167849
+ logger165.debug(
167842
167850
  `heatingSetpointChanging: skipping auto-resume - nudge write in progress`
167843
167851
  );
167844
167852
  return;
167845
167853
  }
167846
- logger164.info(
167854
+ logger165.info(
167847
167855
  `heatingSetpointChanging: auto-resume - switching to Heat (was Off)`
167848
167856
  );
167849
167857
  const modeAction = config10.setSystemMode(
@@ -167852,17 +167860,17 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167852
167860
  );
167853
167861
  homeAssistant.callAction(modeAction);
167854
167862
  } else if (!isAutoMode && !isHeatingMode) {
167855
- logger164.debug(
167863
+ logger165.debug(
167856
167864
  `heatingSetpointChanging: skipping - not in heating/auto mode (mode=${currentMode}, haMode=${haHvacMode})`
167857
167865
  );
167858
167866
  return;
167859
167867
  }
167860
- logger164.debug(
167868
+ logger165.debug(
167861
167869
  `heatingSetpointChanging: proceeding - isAutoMode=${isAutoMode}, isHeatingMode=${isHeatingMode}, isOff=${isOff}, haMode=${haHvacMode}`
167862
167870
  );
167863
167871
  }
167864
167872
  const coolingSetpoint = this.features.cooling ? this.state.occupiedCoolingSetpoint : value;
167865
- logger164.debug(
167873
+ logger165.debug(
167866
167874
  `heatingSetpointChanging: calling setTemperature with heat=${next.celsius(true)}, cool=${coolingSetpoint}`
167867
167875
  );
167868
167876
  this.setTemperature(
@@ -167901,12 +167909,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167901
167909
  const isOff = currentMode === Thermostat3.SystemMode.Off;
167902
167910
  if (isOff && !this.features.heating && this.features.cooling) {
167903
167911
  if (nudgingSetpoints.has(homeAssistant.entityId)) {
167904
- logger164.debug(
167912
+ logger165.debug(
167905
167913
  `coolingSetpointChanging: skipping auto-resume - nudge write in progress`
167906
167914
  );
167907
167915
  return;
167908
167916
  }
167909
- logger164.info(
167917
+ logger165.info(
167910
167918
  `coolingSetpointChanging: auto-resume - switching to Cool (was Off)`
167911
167919
  );
167912
167920
  const modeAction = config10.setSystemMode(
@@ -167915,12 +167923,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167915
167923
  );
167916
167924
  homeAssistant.callAction(modeAction);
167917
167925
  } else if (!isAutoMode && !isCoolingMode) {
167918
- logger164.debug(
167926
+ logger165.debug(
167919
167927
  `coolingSetpointChanging: skipping - not in cooling/auto mode (mode=${currentMode}, haMode=${haHvacMode})`
167920
167928
  );
167921
167929
  return;
167922
167930
  }
167923
- logger164.debug(
167931
+ logger165.debug(
167924
167932
  `coolingSetpointChanging: proceeding - isAutoMode=${isAutoMode}, isCoolingMode=${isCoolingMode}, isOff=${isOff}, haMode=${haHvacMode}`
167925
167933
  );
167926
167934
  }
@@ -167997,7 +168005,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
167997
168005
  const effectiveMax = max ?? 5e3;
167998
168006
  if (value == null || Number.isNaN(value)) {
167999
168007
  const defaultValue = type === "heat" ? 2e3 : 2400;
168000
- logger164.debug(
168008
+ logger165.debug(
168001
168009
  `${type} setpoint is undefined, using default: ${defaultValue}`
168002
168010
  );
168003
168011
  return Math.max(effectiveMin, Math.min(effectiveMax, defaultValue));
@@ -168461,7 +168469,7 @@ init_home_assistant_entity_behavior();
168461
168469
  init_esm();
168462
168470
  init_home_assistant_actions();
168463
168471
  init_home_assistant_entity_behavior();
168464
- var logger165 = Logger.get("WindowCoveringServer");
168472
+ var logger166 = Logger.get("WindowCoveringServer");
168465
168473
  var MovementStatus = WindowCovering3.MovementStatus;
168466
168474
  var FeaturedBase5 = WindowCoveringServer.with(
168467
168475
  "Lift",
@@ -168545,7 +168553,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168545
168553
  );
168546
168554
  const currentTilt100ths = currentTilt != null ? currentTilt * 100 : null;
168547
168555
  const isStopped = movementStatus === MovementStatus.Stopped;
168548
- logger165.debug(
168556
+ logger166.debug(
168549
168557
  `Cover update for ${entity.entity_id}: state=${state.state}, lift=${currentLift}%, tilt=${currentTilt}%, movement=${MovementStatus[movementStatus]}`
168550
168558
  );
168551
168559
  const appliedPatch = applyPatchState(
@@ -168584,9 +168592,9 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168584
168592
  );
168585
168593
  if (Object.keys(appliedPatch).length > 0) {
168586
168594
  const hasOperationalChange = "operationalStatus" in appliedPatch;
168587
- const log = hasOperationalChange ? logger165.info : logger165.debug;
168595
+ const log = hasOperationalChange ? logger166.info : logger166.debug;
168588
168596
  log.call(
168589
- logger165,
168597
+ logger166,
168590
168598
  `Cover ${entity.entity_id} state changed: ${JSON.stringify(appliedPatch)}`
168591
168599
  );
168592
168600
  }
@@ -168594,7 +168602,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168594
168602
  async handleMovement(type, _, direction, targetPercent100ths) {
168595
168603
  const currentLift = this.state.currentPositionLiftPercent100ths ?? 0;
168596
168604
  const currentTilt = this.state.currentPositionTiltPercent100ths ?? 0;
168597
- logger165.info(
168605
+ logger166.info(
168598
168606
  `handleMovement: type=${MovementType[type]}, direction=${MovementDirection[direction]}, target=${targetPercent100ths}, currentLift=${currentLift}, currentTilt=${currentTilt}, absolutePosition=${this.features.absolutePosition}`
168599
168607
  );
168600
168608
  if (type === MovementType.Lift) {
@@ -168630,13 +168638,13 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168630
168638
  handleLiftOpen() {
168631
168639
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
168632
168640
  const action = this.state.config.openCoverLift(void 0, this.agent);
168633
- logger165.info(`handleLiftOpen: calling action=${action.action}`);
168641
+ logger166.info(`handleLiftOpen: calling action=${action.action}`);
168634
168642
  homeAssistant.callAction(action);
168635
168643
  }
168636
168644
  handleLiftClose() {
168637
168645
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
168638
168646
  const action = this.state.config.closeCoverLift(void 0, this.agent);
168639
- logger165.info(`handleLiftClose: calling action=${action.action}`);
168647
+ logger166.info(`handleLiftClose: calling action=${action.action}`);
168640
168648
  homeAssistant.callAction(action);
168641
168649
  }
168642
168650
  handleGoToLiftPosition(targetPercent100ths) {
@@ -168657,7 +168665,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168657
168665
  this.lastLiftCommandTime = now;
168658
168666
  const isFirstInSequence = timeSinceLastCommand > _WindowCoveringServerBase.COMMAND_SEQUENCE_THRESHOLD_MS;
168659
168667
  const debounceMs = isFirstInSequence ? _WindowCoveringServerBase.DEBOUNCE_INITIAL_MS : _WindowCoveringServerBase.DEBOUNCE_SUBSEQUENT_MS;
168660
- logger165.debug(
168668
+ logger166.debug(
168661
168669
  `Lift command: target=${targetPosition}%, debounce=${debounceMs}ms (${isFirstInSequence ? "initial" : "subsequent"})`
168662
168670
  );
168663
168671
  if (this.liftDebounceTimer) {
@@ -168706,7 +168714,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
168706
168714
  this.lastTiltCommandTime = now;
168707
168715
  const isFirstInSequence = timeSinceLastCommand > _WindowCoveringServerBase.COMMAND_SEQUENCE_THRESHOLD_MS;
168708
168716
  const debounceMs = isFirstInSequence ? _WindowCoveringServerBase.DEBOUNCE_INITIAL_MS : _WindowCoveringServerBase.DEBOUNCE_SUBSEQUENT_MS;
168709
- logger165.debug(
168717
+ logger166.debug(
168710
168718
  `Tilt command: target=${targetPosition}%, debounce=${debounceMs}ms (${isFirstInSequence ? "initial" : "subsequent"})`
168711
168719
  );
168712
168720
  if (this.tiltDebounceTimer) {
@@ -168765,7 +168773,7 @@ function adjustPositionForWriting(position, flags2, matterSemantics) {
168765
168773
  }
168766
168774
 
168767
168775
  // src/matter/endpoints/legacy/cover/behaviors/cover-window-covering-server.ts
168768
- var logger166 = Logger.get("CoverWindowCoveringServer");
168776
+ var logger167 = Logger.get("CoverWindowCoveringServer");
168769
168777
  var attributes5 = (entity) => entity.attributes;
168770
168778
  var MATTER_SEMANTIC_PLATFORMS = [
168771
168779
  // Currently empty - no known platforms use Matter semantics by default
@@ -168783,7 +168791,7 @@ var adjustPositionForReading2 = (position, agent) => {
168783
168791
  const { featureFlags } = agent.env.get(BridgeDataProvider);
168784
168792
  const matterSem = usesMatterSemantics(agent);
168785
168793
  const result = adjustPositionForReading(position, featureFlags, matterSem);
168786
- logger166.debug(`adjustPositionForReading: HA=${position}%, result=${result}%`);
168794
+ logger167.debug(`adjustPositionForReading: HA=${position}%, result=${result}%`);
168787
168795
  return result;
168788
168796
  };
168789
168797
  var adjustPositionForWriting2 = (position, agent) => {
@@ -168887,7 +168895,7 @@ var config5 = {
168887
168895
  var CoverWindowCoveringServer = WindowCoveringServer2(config5);
168888
168896
 
168889
168897
  // src/matter/endpoints/legacy/cover/index.ts
168890
- var logger167 = Logger.get("CoverDevice");
168898
+ var logger168 = Logger.get("CoverDevice");
168891
168899
  var CoverPowerSourceServer = PowerSourceServer2({
168892
168900
  getBatteryPercent: (entity, agent) => {
168893
168901
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
@@ -168914,7 +168922,7 @@ var CoverDeviceType = (supportedFeatures, hasBattery, entityId) => {
168914
168922
  features2.add("PositionAwareLift");
168915
168923
  features2.add("AbsolutePosition");
168916
168924
  } else {
168917
- logger167.warn(
168925
+ logger168.warn(
168918
168926
  `[${entityId}] Cover has no support_open feature (supported_features=${supportedFeatures}), adding Lift anyway`
168919
168927
  );
168920
168928
  features2.add("Lift");
@@ -168931,7 +168939,7 @@ var CoverDeviceType = (supportedFeatures, hasBattery, entityId) => {
168931
168939
  features2.add("AbsolutePosition");
168932
168940
  }
168933
168941
  }
168934
- logger167.info(
168942
+ logger168.info(
168935
168943
  `[${entityId}] Creating WindowCovering with features: [${[...features2].join(", ")}], supported_features=${supportedFeatures}`
168936
168944
  );
168937
168945
  const baseBehaviors = [
@@ -168952,11 +168960,11 @@ function CoverDevice(homeAssistantEntity) {
168952
168960
  const hasBatteryEntity = !!homeAssistantEntity.mapping?.batteryEntity;
168953
168961
  const hasBattery = hasBatteryAttr || hasBatteryEntity;
168954
168962
  if (hasBattery) {
168955
- logger167.info(
168963
+ logger168.info(
168956
168964
  `[${entityId}] Creating cover with PowerSource cluster, batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"}`
168957
168965
  );
168958
168966
  } else {
168959
- logger167.debug(
168967
+ logger168.debug(
168960
168968
  `[${entityId}] Creating cover without battery (batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"})`
168961
168969
  );
168962
168970
  }
@@ -168972,7 +168980,7 @@ function CoverDevice(homeAssistantEntity) {
168972
168980
  // src/matter/behaviors/generic-switch-server.ts
168973
168981
  init_esm();
168974
168982
  init_home_assistant_entity_behavior();
168975
- var logger168 = Logger.get("GenericSwitchServer");
168983
+ var logger169 = Logger.get("GenericSwitchServer");
168976
168984
  var FeaturedBase6 = SwitchServer.with(
168977
168985
  "MomentarySwitch",
168978
168986
  "MomentarySwitchRelease",
@@ -168983,7 +168991,7 @@ var GenericSwitchServerBase = class extends FeaturedBase6 {
168983
168991
  await super.initialize();
168984
168992
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
168985
168993
  const entityId = homeAssistant.entityId;
168986
- logger168.debug(`[${entityId}] GenericSwitch initialized`);
168994
+ logger169.debug(`[${entityId}] GenericSwitch initialized`);
168987
168995
  this.reactTo(homeAssistant.onChange, this.handleEventChange);
168988
168996
  }
168989
168997
  handleEventChange() {
@@ -168994,7 +169002,7 @@ var GenericSwitchServerBase = class extends FeaturedBase6 {
168994
169002
  const eventType = attrs.event_type;
168995
169003
  if (!eventType) return;
168996
169004
  const entityId = homeAssistant.entityId;
168997
- logger168.debug(`[${entityId}] Event fired: ${eventType}`);
169005
+ logger169.debug(`[${entityId}] Event fired: ${eventType}`);
168998
169006
  this.triggerPress(eventType);
168999
169007
  }
169000
169008
  triggerPress(eventType) {
@@ -169308,7 +169316,7 @@ init_nodejs();
169308
169316
 
169309
169317
  // src/matter/behaviors/color-control-server.ts
169310
169318
  init_home_assistant_entity_behavior();
169311
- var logger169 = Logger.get("ColorControlServer");
169319
+ var logger170 = Logger.get("ColorControlServer");
169312
169320
  var FeaturedBase7 = ColorControlServer.with("ColorTemperature", "HueSaturation");
169313
169321
  var ColorControlServerBase = class extends FeaturedBase7 {
169314
169322
  pendingTransitionTime;
@@ -169332,7 +169340,7 @@ var ColorControlServerBase = class extends FeaturedBase7 {
169332
169340
  if (this.state.startUpColorTemperatureMireds == null) {
169333
169341
  this.state.startUpColorTemperatureMireds = defaultMireds;
169334
169342
  }
169335
- logger169.debug(
169343
+ logger170.debug(
169336
169344
  `initialize: set ColorTemperature defaults - min=${this.state.colorTempPhysicalMinMireds}, max=${this.state.colorTempPhysicalMaxMireds}, current=${this.state.colorTemperatureMireds}`
169337
169345
  );
169338
169346
  }
@@ -169724,7 +169732,7 @@ init_dist();
169724
169732
  // src/matter/behaviors/electrical-energy-measurement-server.ts
169725
169733
  init_esm();
169726
169734
  init_home_assistant_entity_behavior();
169727
- var logger170 = Logger.get("ElectricalEnergyMeasurementServer");
169735
+ var logger171 = Logger.get("ElectricalEnergyMeasurementServer");
169728
169736
  var FeaturedBase8 = ElectricalEnergyMeasurementServer.with("CumulativeEnergy", "ImportedEnergy");
169729
169737
  var ElectricalEnergyMeasurementServerBase = class extends FeaturedBase8 {
169730
169738
  async initialize() {
@@ -169733,7 +169741,7 @@ var ElectricalEnergyMeasurementServerBase = class extends FeaturedBase8 {
169733
169741
  const entityId = homeAssistant.entityId;
169734
169742
  const energyEntity = homeAssistant.state.mapping?.energyEntity;
169735
169743
  if (energyEntity) {
169736
- logger170.debug(
169744
+ logger171.debug(
169737
169745
  `[${entityId}] ElectricalEnergyMeasurement using mapped energy entity: ${energyEntity}`
169738
169746
  );
169739
169747
  }
@@ -169785,7 +169793,7 @@ var HaElectricalEnergyMeasurementServer = ElectricalEnergyMeasurementServerBase.
169785
169793
  // src/matter/behaviors/electrical-power-measurement-server.ts
169786
169794
  init_esm();
169787
169795
  init_home_assistant_entity_behavior();
169788
- var logger171 = Logger.get("ElectricalPowerMeasurementServer");
169796
+ var logger172 = Logger.get("ElectricalPowerMeasurementServer");
169789
169797
  var ElectricalPowerMeasurementServerBase = class extends ElectricalPowerMeasurementServer {
169790
169798
  async initialize() {
169791
169799
  await super.initialize();
@@ -169793,7 +169801,7 @@ var ElectricalPowerMeasurementServerBase = class extends ElectricalPowerMeasurem
169793
169801
  const entityId = homeAssistant.entityId;
169794
169802
  const powerEntity = homeAssistant.state.mapping?.powerEntity;
169795
169803
  if (powerEntity) {
169796
- logger171.debug(
169804
+ logger172.debug(
169797
169805
  `[${entityId}] ElectricalPowerMeasurement using mapped power entity: ${powerEntity}`
169798
169806
  );
169799
169807
  }
@@ -169889,7 +169897,7 @@ init_home_assistant_entity_behavior();
169889
169897
  // src/matter/behaviors/lock-server.ts
169890
169898
  init_esm();
169891
169899
  init_home_assistant_entity_behavior();
169892
- var logger172 = Logger.get("LockServer");
169900
+ var logger173 = Logger.get("LockServer");
169893
169901
  function hasStoredCredentialHelper(env, entityId) {
169894
169902
  try {
169895
169903
  const storage2 = env.get(LockCredentialStorage);
@@ -170047,7 +170055,7 @@ var LockServerWithPinBase = class extends PinCredentialBase {
170047
170055
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
170048
170056
  const action = this.state.config.lock(void 0, this.agent);
170049
170057
  const hasPinProvided = !!request.pinCode;
170050
- logger172.debug(
170058
+ logger173.debug(
170051
170059
  `lockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}`
170052
170060
  );
170053
170061
  if (request.pinCode) {
@@ -170060,12 +170068,12 @@ var LockServerWithPinBase = class extends PinCredentialBase {
170060
170068
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
170061
170069
  const action = this.state.config.unlock(void 0, this.agent);
170062
170070
  const hasPinProvided = !!request.pinCode;
170063
- logger172.debug(
170071
+ logger173.debug(
170064
170072
  `unlockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}`
170065
170073
  );
170066
170074
  if (this.state.requirePinForRemoteOperation) {
170067
170075
  if (!request.pinCode) {
170068
- logger172.info(
170076
+ logger173.info(
170069
170077
  `unlockDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
170070
170078
  );
170071
170079
  throw new StatusResponseError(
@@ -170075,12 +170083,12 @@ var LockServerWithPinBase = class extends PinCredentialBase {
170075
170083
  }
170076
170084
  const providedPin = new TextDecoder().decode(request.pinCode);
170077
170085
  if (!this.verifyStoredPin(homeAssistant.entityId, providedPin)) {
170078
- logger172.info(
170086
+ logger173.info(
170079
170087
  `unlockDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
170080
170088
  );
170081
170089
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
170082
170090
  }
170083
- logger172.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170091
+ logger173.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170084
170092
  action.data = { ...action.data, code: providedPin };
170085
170093
  }
170086
170094
  homeAssistant.callAction(action);
@@ -170241,7 +170249,7 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170241
170249
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
170242
170250
  const action = this.state.config.lock(void 0, this.agent);
170243
170251
  const hasPinProvided = !!request.pinCode;
170244
- logger172.debug(
170252
+ logger173.debug(
170245
170253
  `lockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}`
170246
170254
  );
170247
170255
  if (request.pinCode) {
@@ -170255,12 +170263,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170255
170263
  const unlatchConfig = this.state.config.unlatch;
170256
170264
  const action = unlatchConfig ? unlatchConfig(void 0, this.agent) : this.state.config.unlock(void 0, this.agent);
170257
170265
  const hasPinProvided = !!request.pinCode;
170258
- logger172.debug(
170266
+ logger173.debug(
170259
170267
  `unlockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}, usingUnlatch: ${!!unlatchConfig}`
170260
170268
  );
170261
170269
  if (this.state.requirePinForRemoteOperation) {
170262
170270
  if (!request.pinCode) {
170263
- logger172.info(
170271
+ logger173.info(
170264
170272
  `unlockDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
170265
170273
  );
170266
170274
  throw new StatusResponseError(
@@ -170270,12 +170278,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170270
170278
  }
170271
170279
  const providedPin = new TextDecoder().decode(request.pinCode);
170272
170280
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
170273
- logger172.info(
170281
+ logger173.info(
170274
170282
  `unlockDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
170275
170283
  );
170276
170284
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
170277
170285
  }
170278
- logger172.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170286
+ logger173.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170279
170287
  action.data = { ...action.data, code: providedPin };
170280
170288
  }
170281
170289
  homeAssistant.callAction(action);
@@ -170290,12 +170298,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170290
170298
  }
170291
170299
  const action = unlatchConfig(void 0, this.agent);
170292
170300
  const hasPinProvided = !!request.pinCode;
170293
- logger172.debug(
170301
+ logger173.debug(
170294
170302
  `unboltDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}`
170295
170303
  );
170296
170304
  if (this.state.requirePinForRemoteOperation) {
170297
170305
  if (!request.pinCode) {
170298
- logger172.info(
170306
+ logger173.info(
170299
170307
  `unboltDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
170300
170308
  );
170301
170309
  throw new StatusResponseError(
@@ -170305,12 +170313,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170305
170313
  }
170306
170314
  const providedPin = new TextDecoder().decode(request.pinCode);
170307
170315
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
170308
- logger172.info(
170316
+ logger173.info(
170309
170317
  `unboltDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
170310
170318
  );
170311
170319
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
170312
170320
  }
170313
- logger172.debug(`unboltDoor PIN verified for ${homeAssistant.entityId}`);
170321
+ logger173.debug(`unboltDoor PIN verified for ${homeAssistant.entityId}`);
170314
170322
  action.data = { ...action.data, code: providedPin };
170315
170323
  }
170316
170324
  homeAssistant.callAction(action);
@@ -170480,7 +170488,7 @@ init_home_assistant_entity_behavior();
170480
170488
  init_dist();
170481
170489
  init_esm();
170482
170490
  init_home_assistant_entity_behavior();
170483
- var logger173 = Logger.get("MediaPlayerKeypadInputServer");
170491
+ var logger174 = Logger.get("MediaPlayerKeypadInputServer");
170484
170492
  var MediaPlayerKeypadInputServer = class extends KeypadInputServer {
170485
170493
  sendKey(request) {
170486
170494
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
@@ -170491,12 +170499,12 @@ var MediaPlayerKeypadInputServer = class extends KeypadInputServer {
170491
170499
  const features2 = attributes7.supported_features ?? 0;
170492
170500
  const action = this.mapKeyToAction(request.keyCode, features2);
170493
170501
  if (!action) {
170494
- logger173.debug(
170502
+ logger174.debug(
170495
170503
  `Unsupported key code ${request.keyCode} for ${homeAssistant.entityId}`
170496
170504
  );
170497
170505
  return { status: KeypadInput3.Status.UnsupportedKey };
170498
170506
  }
170499
- logger173.debug(
170507
+ logger174.debug(
170500
170508
  `sendKey(${request.keyCode}) \u2192 ${action} for ${homeAssistant.entityId}`
170501
170509
  );
170502
170510
  homeAssistant.callAction({ action });
@@ -170775,7 +170783,7 @@ init_home_assistant_entity_behavior();
170775
170783
  // src/matter/behaviors/speaker-level-control-server.ts
170776
170784
  init_esm();
170777
170785
  init_home_assistant_entity_behavior();
170778
- var logger174 = Logger.get("SpeakerLevelControlServer");
170786
+ var logger175 = Logger.get("SpeakerLevelControlServer");
170779
170787
  var FeaturedBase9 = LevelControlServer.with("OnOff");
170780
170788
  var SpeakerLevelControlServerBase = class extends FeaturedBase9 {
170781
170789
  async initialize() {
@@ -170808,7 +170816,7 @@ var SpeakerLevelControlServerBase = class extends FeaturedBase9 {
170808
170816
  currentLevel = Math.min(Math.max(minLevel, currentLevel), maxLevel);
170809
170817
  }
170810
170818
  const entityId = this.agent.get(HomeAssistantEntityBehavior).entity.entity_id;
170811
- logger174.debug(
170819
+ logger175.debug(
170812
170820
  `[${entityId}] Volume update: HA=${currentLevelPercent != null ? Math.round(currentLevelPercent * 100) : "null"}% -> currentLevel=${currentLevel}`
170813
170821
  );
170814
170822
  applyPatchState(this.state, {
@@ -170846,7 +170854,7 @@ var SpeakerLevelControlServerBase = class extends FeaturedBase9 {
170846
170854
  const config10 = this.state.config;
170847
170855
  const entityId = homeAssistant.entity.entity_id;
170848
170856
  const levelPercent = level / 254;
170849
- logger174.debug(
170857
+ logger175.debug(
170850
170858
  `[${entityId}] Volume command: level=${level} -> HA volume_level=${levelPercent}`
170851
170859
  );
170852
170860
  const current = config10.getValuePercent(
@@ -171505,7 +171513,7 @@ var TvocConcentrationMeasurementServer = class extends TvocConcentrationMeasurem
171505
171513
  };
171506
171514
 
171507
171515
  // src/matter/endpoints/legacy/sensor/devices/tvoc-sensor.ts
171508
- var logger175 = Logger.get("TvocSensor");
171516
+ var logger176 = Logger.get("TvocSensor");
171509
171517
  function airQualityFromUgm3(value) {
171510
171518
  if (value <= 300) return AirQuality3.AirQualityEnum.Good;
171511
171519
  if (value <= 1e3) return AirQuality3.AirQualityEnum.Fair;
@@ -171543,17 +171551,17 @@ var TvocAirQualityServer = class extends TvocAirQualityServerBase {
171543
171551
  const attributes7 = entity.state.attributes;
171544
171552
  const deviceClass = attributes7.device_class;
171545
171553
  let airQuality = AirQuality3.AirQualityEnum.Unknown;
171546
- logger175.debug(
171554
+ logger176.debug(
171547
171555
  `[${entity.entity_id}] TVOC update: state="${state}", device_class="${deviceClass}"`
171548
171556
  );
171549
171557
  if (state != null && !Number.isNaN(+state)) {
171550
171558
  const value = +state;
171551
171559
  airQuality = deviceClass === SensorDeviceClass.volatile_organic_compounds ? airQualityFromUgm3(value) : airQualityFromPpb(value);
171552
- logger175.debug(
171560
+ logger176.debug(
171553
171561
  `[${entity.entity_id}] TVOC value=${value} (${deviceClass}) -> airQuality=${AirQuality3.AirQualityEnum[airQuality]}`
171554
171562
  );
171555
171563
  } else {
171556
- logger175.warn(
171564
+ logger176.warn(
171557
171565
  `[${entity.entity_id}] TVOC state not a valid number: "${state}"`
171558
171566
  );
171559
171567
  }
@@ -171766,7 +171774,7 @@ init_home_assistant_entity_behavior();
171766
171774
  // src/matter/behaviors/pm25-concentration-measurement-server.ts
171767
171775
  init_esm();
171768
171776
  init_home_assistant_entity_behavior();
171769
- var logger176 = Logger.get("Pm25ConcentrationMeasurementServer");
171777
+ var logger177 = Logger.get("Pm25ConcentrationMeasurementServer");
171770
171778
  var Pm25ConcentrationMeasurementServerBase = Pm25ConcentrationMeasurementServer.with(
171771
171779
  ConcentrationMeasurement3.Feature.NumericMeasurement
171772
171780
  );
@@ -171790,11 +171798,11 @@ var Pm25ConcentrationMeasurementServer2 = class extends Pm25ConcentrationMeasure
171790
171798
  if (this.state.measurementMedium === void 0) {
171791
171799
  this.state.measurementMedium = ConcentrationMeasurement3.MeasurementMedium.Air;
171792
171800
  }
171793
- logger176.debug(
171801
+ logger177.debug(
171794
171802
  "Pm25ConcentrationMeasurementServer: before super.initialize()"
171795
171803
  );
171796
171804
  await super.initialize();
171797
- logger176.debug(
171805
+ logger177.debug(
171798
171806
  "Pm25ConcentrationMeasurementServer: after super.initialize()"
171799
171807
  );
171800
171808
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
@@ -171817,7 +171825,7 @@ var Pm25ConcentrationMeasurementServer2 = class extends Pm25ConcentrationMeasure
171817
171825
  };
171818
171826
 
171819
171827
  // src/matter/endpoints/legacy/sensor/devices/pm25-sensor.ts
171820
- var logger177 = Logger.get("Pm25AirQualityServer");
171828
+ var logger178 = Logger.get("Pm25AirQualityServer");
171821
171829
  var Pm25AirQualityServerBase = AirQualityServer.with(
171822
171830
  AirQuality3.Feature.Fair,
171823
171831
  AirQuality3.Feature.Moderate,
@@ -171829,9 +171837,9 @@ var Pm25AirQualityServer = class extends Pm25AirQualityServerBase {
171829
171837
  if (this.state.airQuality === void 0) {
171830
171838
  this.state.airQuality = AirQuality3.AirQualityEnum.Unknown;
171831
171839
  }
171832
- logger177.debug("Pm25AirQualityServer: before super.initialize()");
171840
+ logger178.debug("Pm25AirQualityServer: before super.initialize()");
171833
171841
  await super.initialize();
171834
- logger177.debug("Pm25AirQualityServer: after super.initialize()");
171842
+ logger178.debug("Pm25AirQualityServer: after super.initialize()");
171835
171843
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
171836
171844
  this.update(homeAssistant.entity);
171837
171845
  this.reactTo(homeAssistant.onChange, this.update);
@@ -172171,7 +172179,7 @@ init_home_assistant_entity_behavior();
172171
172179
  init_dist();
172172
172180
  init_esm();
172173
172181
  init_home_assistant_entity_behavior();
172174
- var logger178 = Logger.get("VacuumIdentifyServer");
172182
+ var logger179 = Logger.get("VacuumIdentifyServer");
172175
172183
  var VacuumIdentifyServer = class extends IdentifyServer2 {
172176
172184
  triggerEffect(effect) {
172177
172185
  this.#locate("triggerEffect");
@@ -172188,11 +172196,11 @@ var VacuumIdentifyServer = class extends IdentifyServer2 {
172188
172196
  const features2 = homeAssistant.entity.state.attributes.supported_features ?? 0;
172189
172197
  const hasLocate = testBit(features2, VacuumDeviceFeature.LOCATE);
172190
172198
  if (!hasLocate) {
172191
- logger178.warn(
172199
+ logger179.warn(
172192
172200
  `${source} for ${homeAssistant.entityId} \u2014 LOCATE not in supported_features (${features2}), calling vacuum.locate anyway`
172193
172201
  );
172194
172202
  } else {
172195
- logger178.info(`${source} \u2192 vacuum.locate for ${homeAssistant.entityId}`);
172203
+ logger179.info(`${source} \u2192 vacuum.locate for ${homeAssistant.entityId}`);
172196
172204
  }
172197
172205
  homeAssistant.callAction({ action: "vacuum.locate" });
172198
172206
  }
@@ -172483,11 +172491,11 @@ init_esm();
172483
172491
 
172484
172492
  // src/matter/behaviors/service-area-server.ts
172485
172493
  init_esm();
172486
- var logger179 = Logger.get("ServiceAreaServer");
172494
+ var logger180 = Logger.get("ServiceAreaServer");
172487
172495
  var ServiceAreaServerBase = class extends ServiceAreaBehavior {
172488
172496
  selectAreas(request) {
172489
172497
  const { newAreas } = request;
172490
- logger179.info(
172498
+ logger180.info(
172491
172499
  `ServiceArea selectAreas called with: ${JSON.stringify(newAreas)}`
172492
172500
  );
172493
172501
  const uniqueAreas = [...new Set(newAreas)];
@@ -172496,14 +172504,14 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
172496
172504
  (id) => !supportedAreaIds.includes(id)
172497
172505
  );
172498
172506
  if (invalidAreas.length > 0) {
172499
- logger179.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
172507
+ logger180.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
172500
172508
  return {
172501
172509
  status: ServiceArea3.SelectAreasStatus.UnsupportedArea,
172502
172510
  statusText: `Invalid area IDs: ${invalidAreas.join(", ")}`
172503
172511
  };
172504
172512
  }
172505
172513
  this.state.selectedAreas = uniqueAreas;
172506
- logger179.info(
172514
+ logger180.info(
172507
172515
  `ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
172508
172516
  );
172509
172517
  return {
@@ -172524,7 +172532,7 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
172524
172532
  ServiceAreaServerBase2.State = State;
172525
172533
  })(ServiceAreaServerBase || (ServiceAreaServerBase = {}));
172526
172534
  function ServiceAreaServer2(initialState) {
172527
- logger179.info(
172535
+ logger180.info(
172528
172536
  `Creating ServiceAreaServer with ${initialState.supportedAreas.length} areas`
172529
172537
  );
172530
172538
  return ServiceAreaServerBase.set({
@@ -172537,7 +172545,7 @@ var ServiceAreaWithMaps = ServiceAreaBehavior.with(ServiceArea3.Feature.Maps);
172537
172545
  var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
172538
172546
  selectAreas(request) {
172539
172547
  const { newAreas } = request;
172540
- logger179.info(
172548
+ logger180.info(
172541
172549
  `ServiceArea selectAreas called with: ${JSON.stringify(newAreas)}`
172542
172550
  );
172543
172551
  const uniqueAreas = [...new Set(newAreas)];
@@ -172546,14 +172554,14 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
172546
172554
  (id) => !supportedAreaIds.includes(id)
172547
172555
  );
172548
172556
  if (invalidAreas.length > 0) {
172549
- logger179.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
172557
+ logger180.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
172550
172558
  return {
172551
172559
  status: ServiceArea3.SelectAreasStatus.UnsupportedArea,
172552
172560
  statusText: `Invalid area IDs: ${invalidAreas.join(", ")}`
172553
172561
  };
172554
172562
  }
172555
172563
  this.state.selectedAreas = uniqueAreas;
172556
- logger179.info(
172564
+ logger180.info(
172557
172565
  `ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
172558
172566
  );
172559
172567
  return {
@@ -172574,14 +172582,14 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
172574
172582
  ServiceAreaServerWithMapsBase2.State = State;
172575
172583
  })(ServiceAreaServerWithMapsBase || (ServiceAreaServerWithMapsBase = {}));
172576
172584
  function ServiceAreaServerWithMaps(initialState) {
172577
- logger179.info(
172585
+ logger180.info(
172578
172586
  `Creating ServiceAreaServer with Maps: ${initialState.supportedAreas.length} areas, ${initialState.supportedMaps.length} maps`
172579
172587
  );
172580
172588
  for (const map of initialState.supportedMaps) {
172581
172589
  const areaCount = initialState.supportedAreas.filter(
172582
172590
  (a) => a.mapId === map.mapId
172583
172591
  ).length;
172584
- logger179.info(` Map ${map.mapId}: "${map.name}" (${areaCount} areas)`);
172592
+ logger180.info(` Map ${map.mapId}: "${map.name}" (${areaCount} areas)`);
172585
172593
  }
172586
172594
  return ServiceAreaServerWithMapsBase.set({
172587
172595
  supportedAreas: initialState.supportedAreas,
@@ -172592,7 +172600,7 @@ function ServiceAreaServerWithMaps(initialState) {
172592
172600
  }
172593
172601
 
172594
172602
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-service-area-server.ts
172595
- var logger180 = Logger.get("VacuumServiceAreaServer");
172603
+ var logger181 = Logger.get("VacuumServiceAreaServer");
172596
172604
  function toAreaId(roomId) {
172597
172605
  if (typeof roomId === "number") {
172598
172606
  return roomId;
@@ -172671,13 +172679,13 @@ function createVacuumServiceAreaServer(attributes7, roomEntities, includeUnnamed
172671
172679
  let rooms;
172672
172680
  if (roomEntities && roomEntities.length > 0) {
172673
172681
  rooms = buttonEntitiesToRooms(roomEntities, attributes7);
172674
- logger180.info(
172682
+ logger181.info(
172675
172683
  `Using ${rooms.length} button entities as rooms: ${rooms.map((r) => r.name).join(", ")}`
172676
172684
  );
172677
172685
  } else {
172678
172686
  rooms = parseVacuumRooms(attributes7, includeUnnamedRooms);
172679
172687
  if (rooms.length > 0) {
172680
- logger180.info(
172688
+ logger181.info(
172681
172689
  `Using ${rooms.length} rooms from attributes: ${rooms.map((r) => r.name).join(", ")}`
172682
172690
  );
172683
172691
  }
@@ -172731,7 +172739,7 @@ function createCustomServiceAreaServer(customAreas) {
172731
172739
  landmarkInfo: null
172732
172740
  }
172733
172741
  }));
172734
- logger180.info(
172742
+ logger181.info(
172735
172743
  `Using ${customAreas.length} custom service areas: ${customAreas.map((a) => a.name).join(", ")}`
172736
172744
  );
172737
172745
  return ServiceAreaServer2({
@@ -172742,7 +172750,7 @@ function createCustomServiceAreaServer(customAreas) {
172742
172750
  }
172743
172751
 
172744
172752
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-run-mode-server.ts
172745
- var logger181 = Logger.get("VacuumRvcRunModeServer");
172753
+ var logger182 = Logger.get("VacuumRvcRunModeServer");
172746
172754
  function buildSupportedModes2(attributes7, includeUnnamedRooms = false, customAreas) {
172747
172755
  const modes = [
172748
172756
  {
@@ -172788,12 +172796,12 @@ function handleCustomServiceAreas(selectedAreas, customAreas, homeAssistant, ser
172788
172796
  const matched = selectedAreas.map((areaId) => customAreas[areaId - 1]).filter(Boolean);
172789
172797
  serviceArea.state.selectedAreas = [];
172790
172798
  if (matched.length === 0) {
172791
- logger181.warn(
172799
+ logger182.warn(
172792
172800
  `Custom service areas: no match for selected IDs ${selectedAreas.join(", ")}`
172793
172801
  );
172794
172802
  return { action: "vacuum.start" };
172795
172803
  }
172796
- logger181.info(
172804
+ logger182.info(
172797
172805
  `Custom service areas: calling ${matched.length} service(s): ${matched.map((a) => `${a.service} (${a.name})`).join(", ")}`
172798
172806
  );
172799
172807
  for (let i = 1; i < matched.length; i++) {
@@ -172822,7 +172830,7 @@ var vacuumRvcRunModeConfig = {
172822
172830
  VacuumState.mop_cleaning
172823
172831
  ];
172824
172832
  const isCleaning = cleaningStates.includes(state);
172825
- logger181.debug(
172833
+ logger182.debug(
172826
172834
  `Vacuum state: "${state}", isCleaning: ${isCleaning}, currentMode: ${isCleaning ? "Cleaning" : "Idle"}`
172827
172835
  );
172828
172836
  return isCleaning ? 1 /* Cleaning */ : 0 /* Idle */;
@@ -172861,7 +172869,7 @@ var vacuumRvcRunModeConfig = {
172861
172869
  }
172862
172870
  }
172863
172871
  if (buttonEntityIds.length > 0) {
172864
- logger181.info(
172872
+ logger182.info(
172865
172873
  `Roborock: Pressing button entities for selected rooms: ${buttonEntityIds.join(", ")}`
172866
172874
  );
172867
172875
  serviceArea.state.selectedAreas = [];
@@ -172890,14 +172898,14 @@ var vacuumRvcRunModeConfig = {
172890
172898
  }
172891
172899
  }
172892
172900
  if (roomIds.length > 0) {
172893
- logger181.info(
172901
+ logger182.info(
172894
172902
  `Starting cleaning with selected areas: ${roomIds.join(", ")}`
172895
172903
  );
172896
172904
  serviceArea.state.selectedAreas = [];
172897
172905
  const vacuumEntityId = homeAssistant.entityId;
172898
172906
  if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
172899
172907
  const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
172900
- logger181.info(
172908
+ logger182.info(
172901
172909
  `Valetudo vacuum: Using mqtt.publish segment_cleanup for rooms: ${roomIds.join(", ")}`
172902
172910
  );
172903
172911
  return {
@@ -172917,7 +172925,7 @@ var vacuumRvcRunModeConfig = {
172917
172925
  if (targetMapName) {
172918
172926
  const vacName = vacuumEntityId.replace("vacuum.", "");
172919
172927
  const selectedMapEntity = `select.${vacName}_selected_map`;
172920
- logger181.info(
172928
+ logger182.info(
172921
172929
  `Dreame multi-floor: switching to map "${targetMapName}" via ${selectedMapEntity}`
172922
172930
  );
172923
172931
  homeAssistant.callAction({
@@ -172944,7 +172952,7 @@ var vacuumRvcRunModeConfig = {
172944
172952
  }
172945
172953
  if (isEcovacsVacuum(attributes7)) {
172946
172954
  const roomIdStr = roomIds.join(",");
172947
- logger181.info(
172955
+ logger182.info(
172948
172956
  `Ecovacs vacuum: Using spot_area for rooms: ${roomIdStr}`
172949
172957
  );
172950
172958
  return {
@@ -172959,14 +172967,14 @@ var vacuumRvcRunModeConfig = {
172959
172967
  }
172960
172968
  };
172961
172969
  }
172962
- logger181.warn(
172970
+ logger182.warn(
172963
172971
  `Room cleaning via send_command not supported for this vacuum type. Rooms: ${roomIds.join(", ")}. Falling back to vacuum.start`
172964
172972
  );
172965
172973
  }
172966
172974
  }
172967
172975
  } catch {
172968
172976
  }
172969
- logger181.info("Starting regular cleaning (no areas selected)");
172977
+ logger182.info("Starting regular cleaning (no areas selected)");
172970
172978
  return { action: "vacuum.start" };
172971
172979
  },
172972
172980
  returnToBase: () => ({ action: "vacuum.return_to_base" }),
@@ -172981,7 +172989,7 @@ var vacuumRvcRunModeConfig = {
172981
172989
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
172982
172990
  const entity = homeAssistant.entity;
172983
172991
  const attributes7 = entity.state.attributes;
172984
- logger181.info(`cleanRoom called: roomMode=${roomMode}`);
172992
+ logger182.info(`cleanRoom called: roomMode=${roomMode}`);
172985
172993
  const customAreas = homeAssistant.state.mapping?.customServiceAreas;
172986
172994
  if (customAreas && customAreas.length > 0) {
172987
172995
  const sorted = [...customAreas].sort(
@@ -172990,7 +172998,7 @@ var vacuumRvcRunModeConfig = {
172990
172998
  const areaIndex = roomMode - ROOM_MODE_BASE2 - 1;
172991
172999
  if (areaIndex >= 0 && areaIndex < sorted.length) {
172992
173000
  const area = sorted[areaIndex];
172993
- logger181.info(
173001
+ logger182.info(
172994
173002
  `cleanRoom: custom service area "${area.name}" \u2192 ${area.service}`
172995
173003
  );
172996
173004
  return {
@@ -173002,7 +173010,7 @@ var vacuumRvcRunModeConfig = {
173002
173010
  }
173003
173011
  const rooms = parseVacuumRooms(attributes7);
173004
173012
  const numericIdFromMode = getRoomIdFromMode(roomMode);
173005
- logger181.info(
173013
+ logger182.info(
173006
173014
  `cleanRoom: numericIdFromMode=${numericIdFromMode}, available rooms: ${JSON.stringify(rooms.map((r) => ({ id: r.id, name: r.name, modeValue: getRoomModeValue(r) })))}`
173007
173015
  );
173008
173016
  const room = rooms.find((r) => getRoomModeValue(r) === roomMode);
@@ -173011,7 +173019,7 @@ var vacuumRvcRunModeConfig = {
173011
173019
  const vacuumEntityId = entity.entity_id;
173012
173020
  if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
173013
173021
  const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
173014
- logger181.info(
173022
+ logger182.info(
173015
173023
  `Valetudo vacuum: Using mqtt.publish segment_cleanup for room ${room.name} (id: ${commandId3})`
173016
173024
  );
173017
173025
  return {
@@ -173031,7 +173039,7 @@ var vacuumRvcRunModeConfig = {
173031
173039
  if (room.mapName) {
173032
173040
  const vacuumName = vacuumEntityId.replace("vacuum.", "");
173033
173041
  const selectedMapEntity = `select.${vacuumName}_selected_map`;
173034
- logger181.info(
173042
+ logger182.info(
173035
173043
  `Dreame multi-floor: switching to map "${room.mapName}" via ${selectedMapEntity}`
173036
173044
  );
173037
173045
  homeAssistant.callAction({
@@ -173040,7 +173048,7 @@ var vacuumRvcRunModeConfig = {
173040
173048
  data: { option: room.mapName }
173041
173049
  });
173042
173050
  }
173043
- logger181.debug(
173051
+ logger182.debug(
173044
173052
  `Dreame vacuum detected, using dreame_vacuum.vacuum_clean_segment for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
173045
173053
  );
173046
173054
  return {
@@ -173051,7 +173059,7 @@ var vacuumRvcRunModeConfig = {
173051
173059
  };
173052
173060
  }
173053
173061
  if (isRoborockVacuum(attributes7) || isXiaomiMiotVacuum(attributes7)) {
173054
- logger181.debug(
173062
+ logger182.debug(
173055
173063
  `Using vacuum.send_command with app_segment_clean for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
173056
173064
  );
173057
173065
  return {
@@ -173064,7 +173072,7 @@ var vacuumRvcRunModeConfig = {
173064
173072
  }
173065
173073
  if (isEcovacsVacuum(attributes7)) {
173066
173074
  const roomIdStr = String(commandId3);
173067
- logger181.info(
173075
+ logger182.info(
173068
173076
  `Ecovacs vacuum: Using spot_area for room ${room.name} (id: ${roomIdStr})`
173069
173077
  );
173070
173078
  return {
@@ -173079,7 +173087,7 @@ var vacuumRvcRunModeConfig = {
173079
173087
  }
173080
173088
  };
173081
173089
  }
173082
- logger181.warn(
173090
+ logger182.warn(
173083
173091
  `Room cleaning via send_command not supported for this vacuum type. Room: ${room.name} (id=${commandId3}). Falling back to vacuum.start`
173084
173092
  );
173085
173093
  }
@@ -173095,20 +173103,20 @@ function createVacuumRvcRunModeServer(attributes7, includeUnnamedRooms = false,
173095
173103
  includeUnnamedRooms,
173096
173104
  customAreas
173097
173105
  );
173098
- logger181.info(
173106
+ logger182.info(
173099
173107
  `Creating VacuumRvcRunModeServer with ${rooms.length} rooms, ${supportedModes.length} total modes`
173100
173108
  );
173101
173109
  if (rooms.length > 0) {
173102
- logger181.info(`Rooms found: ${rooms.map((r) => r.name).join(", ")}`);
173110
+ logger182.info(`Rooms found: ${rooms.map((r) => r.name).join(", ")}`);
173103
173111
  }
173104
173112
  if (filteredCount > 0) {
173105
173113
  const filtered = allRooms.filter((r) => !rooms.some((x) => x.id === r.id));
173106
- logger181.info(
173114
+ logger182.info(
173107
173115
  `Filtered out ${filteredCount} unnamed room(s): ${filtered.map((r) => r.name).join(", ")}`
173108
173116
  );
173109
173117
  }
173110
173118
  if (allRooms.length === 0) {
173111
- logger181.debug(
173119
+ logger182.debug(
173112
173120
  `No rooms found. Attributes: rooms=${JSON.stringify(attributes7.rooms)}, segments=${JSON.stringify(attributes7.segments)}, room_list=${attributes7.room_list}`
173113
173121
  );
173114
173122
  }
@@ -173166,7 +173174,7 @@ init_rvc_clean_mode();
173166
173174
 
173167
173175
  // src/matter/behaviors/rvc-clean-mode-server.ts
173168
173176
  init_home_assistant_entity_behavior();
173169
- var logger182 = Logger.get("RvcCleanModeServerBase");
173177
+ var logger183 = Logger.get("RvcCleanModeServerBase");
173170
173178
  var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeServer {
173171
173179
  // Pending mode from a recent changeToMode command.
173172
173180
  // Prevents stale HA state (from a different entity like select.xxx)
@@ -173209,14 +173217,14 @@ var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeS
173209
173217
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
173210
173218
  const { newMode } = request;
173211
173219
  if (newMode !== this.state.currentMode && !this.state.supportedModes.some((m) => m.mode === newMode)) {
173212
- logger182.warn(`changeToMode(${newMode}) rejected: unsupported mode`);
173220
+ logger183.warn(`changeToMode(${newMode}) rejected: unsupported mode`);
173213
173221
  return {
173214
173222
  status: ModeBase3.ModeChangeStatus.UnsupportedMode,
173215
173223
  statusText: `Unsupported mode: ${newMode}`
173216
173224
  };
173217
173225
  }
173218
173226
  const modeLabel = this.state.supportedModes.find((m) => m.mode === newMode);
173219
- logger182.info(
173227
+ logger183.info(
173220
173228
  `changeToMode(${newMode}) "${modeLabel?.label ?? "unknown"}" for ${homeAssistant.entityId}`
173221
173229
  );
173222
173230
  this.pendingMode = newMode;
@@ -173224,7 +173232,7 @@ var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeS
173224
173232
  this.state.currentMode = newMode;
173225
173233
  const action = this.state.config.setCleanMode(newMode, this.agent);
173226
173234
  if (action) {
173227
- logger182.info(
173235
+ logger183.info(
173228
173236
  `changeToMode: dispatching action ${action.action} \u2192 ${action.target ?? homeAssistant.entityId}`
173229
173237
  );
173230
173238
  homeAssistant.callAction(action);
@@ -173257,7 +173265,7 @@ function RvcCleanModeServer2(config10, initialState) {
173257
173265
  }
173258
173266
 
173259
173267
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-clean-mode-server.ts
173260
- var logger183 = Logger.get("VacuumRvcCleanModeServer");
173268
+ var logger184 = Logger.get("VacuumRvcCleanModeServer");
173261
173269
  var MODE_VACUUM = 0;
173262
173270
  var MODE_VACUUM_AND_MOP = 1;
173263
173271
  var MODE_MOP = 2;
@@ -173556,7 +173564,7 @@ function findMatchingCleanOption(ct, availableOptions) {
173556
173564
  if (match) return match;
173557
173565
  }
173558
173566
  }
173559
- logger183.warn(
173567
+ logger184.warn(
173560
173568
  `No match for ${CLEAN_TYPE_LABELS[ct]} in [${availableOptions.join(", ")}]`
173561
173569
  );
173562
173570
  return aliases[0];
@@ -173565,7 +173573,7 @@ function buildCleaningModeAction(targetCleanType, agent) {
173565
173573
  const selectEntityId = getCleaningModeSelectEntity(agent);
173566
173574
  const { options } = readSelectEntity(selectEntityId, agent);
173567
173575
  const optionToUse = findMatchingCleanOption(targetCleanType, options);
173568
- logger183.info(
173576
+ logger184.info(
173569
173577
  `Switching cleaning mode to: ${optionToUse} via ${selectEntityId}`
173570
173578
  );
173571
173579
  return {
@@ -173654,7 +173662,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173654
173662
  }
173655
173663
  }
173656
173664
  if (speedMode !== void 0) {
173657
- logger183.debug(
173665
+ logger184.debug(
173658
173666
  `Current mode: Vacuum + fan_speed="${speedState}" -> mode ${speedMode}`
173659
173667
  );
173660
173668
  return speedMode;
@@ -173675,7 +173683,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173675
173683
  }
173676
173684
  }
173677
173685
  if (mopMode !== void 0) {
173678
- logger183.debug(
173686
+ logger184.debug(
173679
173687
  `Current mode: Mop + intensity="${state}" -> mode ${mopMode}`
173680
173688
  );
173681
173689
  return mopMode;
@@ -173693,14 +173701,14 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173693
173701
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
173694
173702
  const vacuumEntityId = homeAssistant.entityId;
173695
173703
  const mapping = homeAssistant.state.mapping;
173696
- logger183.info(
173704
+ logger184.info(
173697
173705
  `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 ?? {})}`
173698
173706
  );
173699
173707
  if (mopIntensityList && mopIntensityList.length > 0 && isMopIntensityMode(mode)) {
173700
173708
  const mopIndex = mode - MOP_INTENSITY_MODE_BASE;
173701
173709
  const mopName = mopIntensityList[mopIndex];
173702
173710
  if (!mopName) {
173703
- logger183.warn(`Invalid mop intensity mode index: ${mopIndex}`);
173711
+ logger184.warn(`Invalid mop intensity mode index: ${mopIndex}`);
173704
173712
  return void 0;
173705
173713
  }
173706
173714
  if (hasCleanTypes) {
@@ -173713,18 +173721,18 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173713
173721
  mapping.mopIntensityEntity,
173714
173722
  agent
173715
173723
  );
173716
- logger183.info(
173724
+ logger184.info(
173717
173725
  `Mop intensity entity ${mapping.mopIntensityEntity}: current="${state}", options=${JSON.stringify(options ?? [])}`
173718
173726
  );
173719
173727
  let option = matchMopIntensityOption(mopName, options);
173720
173728
  if (!option && options && mopIndex < options.length) {
173721
173729
  option = options[mopIndex];
173722
- logger183.info(
173730
+ logger184.info(
173723
173731
  `Positional match for mop "${mopName}" -> "${option}" (index ${mopIndex})`
173724
173732
  );
173725
173733
  }
173726
173734
  if (option) {
173727
- logger183.info(
173735
+ logger184.info(
173728
173736
  `Setting mop intensity to: ${option} via ${mapping.mopIntensityEntity}`
173729
173737
  );
173730
173738
  return {
@@ -173733,11 +173741,11 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173733
173741
  target: mapping.mopIntensityEntity
173734
173742
  };
173735
173743
  }
173736
- logger183.warn(
173744
+ logger184.warn(
173737
173745
  `No match for mop intensity "${mopName}" in options: [${(options ?? []).join(", ")}]`
173738
173746
  );
173739
173747
  } else {
173740
- logger183.warn(
173748
+ logger184.warn(
173741
173749
  `Mop intensity mode ${mode} requested but no mopIntensityEntity configured`
173742
173750
  );
173743
173751
  }
@@ -173747,7 +173755,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173747
173755
  const fanSpeedIndex = mode - FAN_SPEED_MODE_BASE;
173748
173756
  const fanSpeedName = fanSpeedList[fanSpeedIndex];
173749
173757
  if (!fanSpeedName) {
173750
- logger183.warn(`Invalid fan speed mode index: ${fanSpeedIndex}`);
173758
+ logger184.warn(`Invalid fan speed mode index: ${fanSpeedIndex}`);
173751
173759
  return void 0;
173752
173760
  }
173753
173761
  if (mapping?.suctionLevelEntity) {
@@ -173760,7 +173768,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173760
173768
  mapping.suctionLevelEntity,
173761
173769
  agent
173762
173770
  );
173763
- logger183.info(
173771
+ logger184.info(
173764
173772
  `Suction entity ${mapping.suctionLevelEntity}: current="${state}", options=${JSON.stringify(options ?? [])}`
173765
173773
  );
173766
173774
  let option = matchFanSpeedOption(
@@ -173770,12 +173778,12 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173770
173778
  );
173771
173779
  if (!option && options && fanSpeedIndex < options.length) {
173772
173780
  option = options[fanSpeedIndex];
173773
- logger183.info(
173781
+ logger184.info(
173774
173782
  `Positional match for fan "${fanSpeedName}" -> "${option}" (index ${fanSpeedIndex})`
173775
173783
  );
173776
173784
  }
173777
173785
  if (option) {
173778
- logger183.info(
173786
+ logger184.info(
173779
173787
  `Setting suction to: ${option} via ${mapping.suctionLevelEntity}`
173780
173788
  );
173781
173789
  return {
@@ -173784,7 +173792,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173784
173792
  target: mapping.suctionLevelEntity
173785
173793
  };
173786
173794
  }
173787
- logger183.warn(
173795
+ logger184.warn(
173788
173796
  `No match for fan speed "${fanSpeedName}" in suction options: [${(options ?? []).join(", ")}]`
173789
173797
  );
173790
173798
  return void 0;
@@ -173794,7 +173802,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173794
173802
  buildCleaningModeAction(0 /* Sweeping */, agent)
173795
173803
  );
173796
173804
  }
173797
- logger183.info(
173805
+ logger184.info(
173798
173806
  `Setting fan speed to: ${fanSpeedName} via vacuum.set_fan_speed`
173799
173807
  );
173800
173808
  return {
@@ -173804,7 +173812,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173804
173812
  };
173805
173813
  }
173806
173814
  if (!hasCleanTypes) {
173807
- logger183.debug(
173815
+ logger184.debug(
173808
173816
  `Ignoring cleaning type change (mode=${mode}): no cleaning mode entity`
173809
173817
  );
173810
173818
  return void 0;
@@ -173816,7 +173824,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
173816
173824
  agent
173817
173825
  );
173818
173826
  const optionToUse = findMatchingCleanOption(cleanType, availableOptions);
173819
- logger183.info(
173827
+ logger184.info(
173820
173828
  `Setting cleaning mode to: ${optionToUse} (mode=${mode}) via ${selectEntityId}`
173821
173829
  );
173822
173830
  return {
@@ -173834,10 +173842,10 @@ function createVacuumRvcCleanModeServer(_attributes, fanSpeedList, mopIntensityL
173834
173842
  cleaningModeOptions,
173835
173843
  customFanSpeedTags
173836
173844
  );
173837
- logger183.info(
173845
+ logger184.info(
173838
173846
  `Creating VacuumRvcCleanModeServer with ${supportedModes.length} modes (fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])}, cleaningModeOptions=${JSON.stringify(cleaningModeOptions ?? [])}, customTags=${JSON.stringify(customFanSpeedTags ?? {})})`
173839
173847
  );
173840
- logger183.info(
173848
+ logger184.info(
173841
173849
  `Modes: ${supportedModes.map((m) => `${m.mode}:${m.label}[${m.modeTags.map((t) => t.value).join(",")}]`).join(", ")}`
173842
173850
  );
173843
173851
  const initialState = {
@@ -173915,7 +173923,7 @@ init_rvc_operational_state();
173915
173923
  init_home_assistant_entity_behavior();
173916
173924
  var OperationalState4 = RvcOperationalState3.OperationalState;
173917
173925
  var ErrorState = RvcOperationalState3.ErrorState;
173918
- var logger184 = Logger.get("RvcOperationalStateServer");
173926
+ var logger185 = Logger.get("RvcOperationalStateServer");
173919
173927
  var activeStates = /* @__PURE__ */ new Set([
173920
173928
  OperationalState4.Running,
173921
173929
  OperationalState4.SeekingCharger
@@ -173957,7 +173965,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
173957
173965
  }
173958
173966
  });
173959
173967
  if (activeStates.has(previousState) && !activeStates.has(newState)) {
173960
- logger184.info(
173968
+ logger185.info(
173961
173969
  `Operation completed: ${OperationalState4[previousState]} -> ${OperationalState4[newState]}`
173962
173970
  );
173963
173971
  try {
@@ -173970,7 +173978,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
173970
173978
  this.context
173971
173979
  );
173972
173980
  } catch (e) {
173973
- logger184.debug("Failed to emit operationCompletion event:", e);
173981
+ logger185.debug("Failed to emit operationCompletion event:", e);
173974
173982
  }
173975
173983
  }
173976
173984
  }
@@ -174005,7 +174013,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
174005
174013
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
174006
174014
  homeAssistant.callAction(goHomeAction(void 0, this.agent));
174007
174015
  } else {
174008
- logger184.warn("GoHome command received but no goHome action configured");
174016
+ logger185.warn("GoHome command received but no goHome action configured");
174009
174017
  }
174010
174018
  return {
174011
174019
  commandResponseState: {
@@ -174025,7 +174033,7 @@ function RvcOperationalStateServer2(config10) {
174025
174033
  }
174026
174034
 
174027
174035
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-operational-state-server.ts
174028
- var logger185 = Logger.get("VacuumRvcOperationalStateServer");
174036
+ var logger186 = Logger.get("VacuumRvcOperationalStateServer");
174029
174037
  function isCharging(entity) {
174030
174038
  const attrs = entity.attributes;
174031
174039
  if (attrs.battery_icon?.includes("charging")) return true;
@@ -174067,16 +174075,16 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
174067
174075
  operationalState = RvcOperationalState3.OperationalState.Error;
174068
174076
  } else {
174069
174077
  if (state.toLowerCase().includes("clean")) {
174070
- logger185.info(
174078
+ logger186.info(
174071
174079
  `Unknown vacuum state "${state}" contains 'clean', treating as Running`
174072
174080
  );
174073
174081
  operationalState = RvcOperationalState3.OperationalState.Running;
174074
174082
  } else {
174075
- logger185.info(`Unknown vacuum state "${state}", treating as Paused`);
174083
+ logger186.info(`Unknown vacuum state "${state}", treating as Paused`);
174076
174084
  operationalState = RvcOperationalState3.OperationalState.Paused;
174077
174085
  }
174078
174086
  }
174079
- logger185.debug(
174087
+ logger186.debug(
174080
174088
  `Vacuum operationalState: "${state}" -> ${RvcOperationalState3.OperationalState[operationalState]}`
174081
174089
  );
174082
174090
  return operationalState;
@@ -174097,7 +174105,7 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
174097
174105
  });
174098
174106
 
174099
174107
  // src/matter/endpoints/legacy/vacuum/index.ts
174100
- var logger186 = Logger.get("VacuumDevice");
174108
+ var logger187 = Logger.get("VacuumDevice");
174101
174109
  var VacuumEndpointType = RoboticVacuumCleanerDevice.with(
174102
174110
  BasicInformationServer2,
174103
174111
  VacuumIdentifyServer,
@@ -174111,7 +174119,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174111
174119
  const entityId = homeAssistantEntity.entity.entity_id;
174112
174120
  const attributes7 = homeAssistantEntity.entity.state.attributes;
174113
174121
  const customAreas = homeAssistantEntity.mapping?.customServiceAreas;
174114
- logger186.info(
174122
+ logger187.info(
174115
174123
  `Creating vacuum endpoint for ${entityId}, mapping: ${JSON.stringify(homeAssistantEntity.mapping ?? "none")}`
174116
174124
  );
174117
174125
  let device = VacuumEndpointType.with(
@@ -174122,7 +174130,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174122
174130
  )
174123
174131
  ).set({ homeAssistantEntity });
174124
174132
  if (includeOnOff) {
174125
- logger186.info(`${entityId}: Adding OnOff cluster (vacuumOnOff flag enabled)`);
174133
+ logger187.info(`${entityId}: Adding OnOff cluster (vacuumOnOff flag enabled)`);
174126
174134
  device = device.with(VacuumOnOffServer);
174127
174135
  }
174128
174136
  if (!minimalClusters) {
@@ -174130,24 +174138,24 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174130
174138
  }
174131
174139
  const roomEntities = homeAssistantEntity.mapping?.roomEntities;
174132
174140
  const rooms = parseVacuumRooms(attributes7);
174133
- logger186.info(
174141
+ logger187.info(
174134
174142
  `${entityId}: customAreas=${customAreas?.length ?? 0}, roomEntities=${JSON.stringify(roomEntities ?? [])}, parsedRooms=${rooms.length}`
174135
174143
  );
174136
174144
  if (customAreas && customAreas.length > 0) {
174137
- logger186.info(
174145
+ logger187.info(
174138
174146
  `${entityId}: Adding ServiceArea (${customAreas.length} custom areas)`
174139
174147
  );
174140
174148
  device = device.with(createCustomServiceAreaServer(customAreas));
174141
174149
  } else if (rooms.length > 0 || roomEntities && roomEntities.length > 0) {
174142
- logger186.info(`${entityId}: Adding ServiceArea (${rooms.length} rooms)`);
174150
+ logger187.info(`${entityId}: Adding ServiceArea (${rooms.length} rooms)`);
174143
174151
  device = device.with(
174144
174152
  createVacuumServiceAreaServer(attributes7, roomEntities)
174145
174153
  );
174146
174154
  } else if (!minimalClusters) {
174147
- logger186.info(`${entityId}: Adding ServiceArea (default single-area)`);
174155
+ logger187.info(`${entityId}: Adding ServiceArea (default single-area)`);
174148
174156
  device = device.with(createDefaultServiceAreaServer());
174149
174157
  } else {
174150
- logger186.info(`${entityId}: Skipping ServiceArea (minimal clusters mode)`);
174158
+ logger187.info(`${entityId}: Skipping ServiceArea (minimal clusters mode)`);
174151
174159
  }
174152
174160
  const fanSpeedList = resolveFanSpeedList(
174153
174161
  attributes7,
@@ -174157,7 +174165,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174157
174165
  homeAssistantEntity.mapping?.mopIntensityEntity
174158
174166
  );
174159
174167
  if (cleaningModeOptions || fanSpeedList || mopIntensityList) {
174160
- logger186.info(
174168
+ logger187.info(
174161
174169
  `${entityId}: Adding RvcCleanMode (multi-mode, cleaningModeOptions=${JSON.stringify(cleaningModeOptions ?? [])}, fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])})`
174162
174170
  );
174163
174171
  device = device.with(
@@ -174170,7 +174178,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
174170
174178
  )
174171
174179
  );
174172
174180
  } else {
174173
- logger186.info(`${entityId}: Adding RvcCleanMode (default single-mode)`);
174181
+ logger187.info(`${entityId}: Adding RvcCleanMode (default single-mode)`);
174174
174182
  device = device.with(createDefaultRvcCleanModeServer());
174175
174183
  }
174176
174184
  return device;
@@ -174325,7 +174333,7 @@ var WaterHeaterThermostatServer = ThermostatServer2(
174325
174333
  );
174326
174334
 
174327
174335
  // src/matter/endpoints/legacy/water-heater/index.ts
174328
- var logger187 = Logger.get("WaterHeaterDevice");
174336
+ var logger188 = Logger.get("WaterHeaterDevice");
174329
174337
  var WaterHeaterDeviceType = ThermostatDevice.with(
174330
174338
  BasicInformationServer2,
174331
174339
  IdentifyServer2,
@@ -174341,7 +174349,7 @@ function toMatterTemp2(value) {
174341
174349
  }
174342
174350
  function WaterHeaterDevice(homeAssistantEntity) {
174343
174351
  const attributes7 = homeAssistantEntity.entity.state.attributes;
174344
- logger187.debug(
174352
+ logger188.debug(
174345
174353
  `Creating device for ${homeAssistantEntity.entity.entity_id}, min_temp=${attributes7.min_temp}, max_temp=${attributes7.max_temp}`
174346
174354
  );
174347
174355
  const minLimit = toMatterTemp2(attributes7.min_temp) ?? 0;
@@ -174507,7 +174515,7 @@ var matterDeviceTypeFactories = {
174507
174515
  };
174508
174516
 
174509
174517
  // src/matter/endpoints/legacy/legacy-endpoint.ts
174510
- var logger188 = Logger.get("LegacyEndpoint");
174518
+ var logger189 = Logger.get("LegacyEndpoint");
174511
174519
  var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174512
174520
  static async create(registry2, entityId, mapping) {
174513
174521
  const deviceRegistry = registry2.deviceOf(entityId);
@@ -174517,25 +174525,25 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174517
174525
  return;
174518
174526
  }
174519
174527
  if (registry2.isAutoBatteryMappingEnabled() && registry2.isBatteryEntityUsed(entityId)) {
174520
- logger188.debug(
174528
+ logger189.debug(
174521
174529
  `Skipping ${entityId} - already auto-assigned as battery to another device`
174522
174530
  );
174523
174531
  return;
174524
174532
  }
174525
174533
  if (registry2.isAutoHumidityMappingEnabled() && registry2.isHumidityEntityUsed(entityId)) {
174526
- logger188.debug(
174534
+ logger189.debug(
174527
174535
  `Skipping ${entityId} - already auto-assigned as humidity to a temperature sensor`
174528
174536
  );
174529
174537
  return;
174530
174538
  }
174531
174539
  if (registry2.isAutoPressureMappingEnabled() && registry2.isPressureEntityUsed(entityId)) {
174532
- logger188.debug(
174540
+ logger189.debug(
174533
174541
  `Skipping ${entityId} - already auto-assigned as pressure to a temperature sensor`
174534
174542
  );
174535
174543
  return;
174536
174544
  }
174537
174545
  if (registry2.isAutoComposedDevicesEnabled() && registry2.isComposedSubEntityUsed(entityId)) {
174538
- logger188.debug(
174546
+ logger189.debug(
174539
174547
  `Skipping ${entityId} - already consumed by a composed device`
174540
174548
  );
174541
174549
  return;
@@ -174555,7 +174563,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174555
174563
  humidityEntity: humidityEntityId
174556
174564
  };
174557
174565
  registry2.markHumidityEntityUsed(humidityEntityId);
174558
- logger188.debug(
174566
+ logger189.debug(
174559
174567
  `Auto-assigned humidity ${humidityEntityId} to ${entityId}`
174560
174568
  );
174561
174569
  }
@@ -174574,7 +174582,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174574
174582
  pressureEntity: pressureEntityId
174575
174583
  };
174576
174584
  registry2.markPressureEntityUsed(pressureEntityId);
174577
- logger188.debug(
174585
+ logger189.debug(
174578
174586
  `Auto-assigned pressure ${pressureEntityId} to ${entityId}`
174579
174587
  );
174580
174588
  }
@@ -174591,7 +174599,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174591
174599
  batteryEntity: batteryEntityId
174592
174600
  };
174593
174601
  registry2.markBatteryEntityUsed(batteryEntityId);
174594
- logger188.debug(
174602
+ logger189.debug(
174595
174603
  `Auto-assigned battery ${batteryEntityId} to ${entityId}`
174596
174604
  );
174597
174605
  }
@@ -174609,7 +174617,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174609
174617
  powerEntity: powerEntityId
174610
174618
  };
174611
174619
  registry2.markPowerEntityUsed(powerEntityId);
174612
- logger188.debug(`Auto-assigned power ${powerEntityId} to ${entityId}`);
174620
+ logger189.debug(`Auto-assigned power ${powerEntityId} to ${entityId}`);
174613
174621
  }
174614
174622
  }
174615
174623
  }
@@ -174626,7 +174634,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174626
174634
  energyEntity: energyEntityId
174627
174635
  };
174628
174636
  registry2.markEnergyEntityUsed(energyEntityId);
174629
- logger188.debug(
174637
+ logger189.debug(
174630
174638
  `Auto-assigned energy ${energyEntityId} to ${entityId}`
174631
174639
  );
174632
174640
  }
@@ -174642,7 +174650,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174642
174650
  entityId: effectiveMapping?.entityId ?? entityId,
174643
174651
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
174644
174652
  };
174645
- logger188.debug(
174653
+ logger189.debug(
174646
174654
  `Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity} to ${entityId}`
174647
174655
  );
174648
174656
  }
@@ -174652,7 +174660,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174652
174660
  entityId: effectiveMapping?.entityId ?? entityId,
174653
174661
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
174654
174662
  };
174655
- logger188.debug(
174663
+ logger189.debug(
174656
174664
  `Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity} to ${entityId}`
174657
174665
  );
174658
174666
  }
@@ -174662,7 +174670,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174662
174670
  entityId: effectiveMapping?.entityId ?? entityId,
174663
174671
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
174664
174672
  };
174665
- logger188.debug(
174673
+ logger189.debug(
174666
174674
  `Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity} to ${entityId}`
174667
174675
  );
174668
174676
  }
@@ -174683,7 +174691,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174683
174691
  rooms: roomsObj
174684
174692
  }
174685
174693
  };
174686
- logger188.debug(
174694
+ logger189.debug(
174687
174695
  `Auto-detected ${valetudoRooms.length} Valetudo segments for ${entityId}`
174688
174696
  );
174689
174697
  } else {
@@ -174700,7 +174708,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174700
174708
  rooms: roomsObj
174701
174709
  }
174702
174710
  };
174703
- logger188.debug(
174711
+ logger189.debug(
174704
174712
  `Auto-detected ${roborockRooms.length} Roborock rooms for ${entityId}`
174705
174713
  );
174706
174714
  }
@@ -174799,7 +174807,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174799
174807
  if (state.state === this.lastState?.state && JSON.stringify(state.attributes) === JSON.stringify(this.lastState?.attributes)) {
174800
174808
  return;
174801
174809
  }
174802
- logger188.debug(
174810
+ logger189.debug(
174803
174811
  `State update received for ${this.entityId}: state=${state.state}`
174804
174812
  );
174805
174813
  this.lastState = state;
@@ -174832,11 +174840,13 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
174832
174840
  };
174833
174841
 
174834
174842
  // src/services/home-assistant/api/subscribe-entities.ts
174843
+ init_esm();
174835
174844
  import crypto6 from "node:crypto";
174836
174845
  import {
174837
174846
  getCollection
174838
174847
  } from "home-assistant-js-websocket";
174839
174848
  import { atLeastHaVersion } from "home-assistant-js-websocket/dist/util.js";
174849
+ var logger190 = Logger.get("SubscribeEntities");
174840
174850
  function processEvent(store, updates) {
174841
174851
  const state = { ...store.state };
174842
174852
  if (updates.a) {
@@ -174862,7 +174872,7 @@ function processEvent(store, updates) {
174862
174872
  for (const entityId in updates.c) {
174863
174873
  let entityState = state[entityId];
174864
174874
  if (!entityState) {
174865
- console.warn("Received state update for unknown entity", entityId);
174875
+ logger190.warn("Received state update for unknown entity", entityId);
174866
174876
  continue;
174867
174877
  }
174868
174878
  entityState = { ...entityState };
@@ -174932,7 +174942,7 @@ var subscribeEntities = (conn, onChange, entityIds) => entitiesColl(conn, entity
174932
174942
 
174933
174943
  // src/services/bridges/entity-isolation-service.ts
174934
174944
  init_esm();
174935
- var logger189 = Logger.get("EntityIsolation");
174945
+ var logger191 = Logger.get("EntityIsolation");
174936
174946
  var EntityIsolationServiceImpl = class {
174937
174947
  isolatedEntities = /* @__PURE__ */ new Map();
174938
174948
  isolationCallbacks = /* @__PURE__ */ new Map();
@@ -174972,13 +174982,13 @@ var EntityIsolationServiceImpl = class {
174972
174982
  }
174973
174983
  const parsed = this.parseEndpointPath(msg);
174974
174984
  if (!parsed) {
174975
- logger189.warn("Could not parse entity from error:", msg);
174985
+ logger191.warn("Could not parse entity from error:", msg);
174976
174986
  return false;
174977
174987
  }
174978
174988
  const { bridgeId, entityName } = parsed;
174979
174989
  const callback = this.isolationCallbacks.get(bridgeId);
174980
174990
  if (!callback) {
174981
- logger189.warn(
174991
+ logger191.warn(
174982
174992
  `No isolation callback registered for bridge ${bridgeId}, entity: ${entityName}`
174983
174993
  );
174984
174994
  return false;
@@ -174989,14 +174999,14 @@ var EntityIsolationServiceImpl = class {
174989
174999
  }
174990
175000
  const reason = `Subscription timing error (Invalid intervalMs). Entity isolated to protect bridge stability.`;
174991
175001
  this.isolatedEntities.set(key, { entityId: entityName, reason });
174992
- logger189.warn(
175002
+ logger191.warn(
174993
175003
  `Isolating entity "${entityName}" from bridge ${bridgeId} due to: ${reason}`
174994
175004
  );
174995
175005
  try {
174996
175006
  await callback(entityName);
174997
175007
  return true;
174998
175008
  } catch (e) {
174999
- logger189.error(`Failed to isolate entity ${entityName}:`, e);
175009
+ logger191.error(`Failed to isolate entity ${entityName}:`, e);
175000
175010
  return false;
175001
175011
  }
175002
175012
  }
@@ -175841,11 +175851,11 @@ var BridgeRegistry = class _BridgeRegistry {
175841
175851
  init_dist();
175842
175852
  var AUTO_FORCE_SYNC_INTERVAL_MS2 = 9e4;
175843
175853
  var ServerModeBridge = class {
175844
- constructor(logger192, dataProvider, endpointManager, server) {
175854
+ constructor(logger194, dataProvider, endpointManager, server) {
175845
175855
  this.dataProvider = dataProvider;
175846
175856
  this.endpointManager = endpointManager;
175847
175857
  this.server = server;
175848
- this.log = logger192.get(`ServerModeBridge / ${dataProvider.id}`);
175858
+ this.log = logger194.get(`ServerModeBridge / ${dataProvider.id}`);
175849
175859
  }
175850
175860
  log;
175851
175861
  status = {
@@ -176247,7 +176257,7 @@ function ServerModeVacuumDevice(homeAssistantEntity, includeOnOff = false, minim
176247
176257
  }
176248
176258
 
176249
176259
  // src/matter/endpoints/server-mode-vacuum-endpoint.ts
176250
- var logger190 = Logger.get("ServerModeVacuumEndpoint");
176260
+ var logger192 = Logger.get("ServerModeVacuumEndpoint");
176251
176261
  var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEndpoint {
176252
176262
  static async create(registry2, entityId, mapping) {
176253
176263
  const deviceRegistry = registry2.deviceOf(entityId);
@@ -176257,7 +176267,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
176257
176267
  return void 0;
176258
176268
  }
176259
176269
  let effectiveMapping = mapping;
176260
- logger190.info(
176270
+ logger192.info(
176261
176271
  `${entityId}: device_id=${entity.device_id}, manualBattery=${mapping?.batteryEntity ?? "none"}`
176262
176272
  );
176263
176273
  if (entity.device_id) {
@@ -176272,9 +176282,9 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
176272
176282
  batteryEntity: batteryEntityId
176273
176283
  };
176274
176284
  registry2.markBatteryEntityUsed(batteryEntityId);
176275
- logger190.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
176285
+ logger192.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
176276
176286
  } else {
176277
- logger190.warn(
176287
+ logger192.warn(
176278
176288
  `${entityId}: No battery entity found for device ${entity.device_id}`
176279
176289
  );
176280
176290
  }
@@ -176288,7 +176298,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
176288
176298
  entityId: effectiveMapping?.entityId ?? entityId,
176289
176299
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
176290
176300
  };
176291
- logger190.info(
176301
+ logger192.info(
176292
176302
  `${entityId}: Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity}`
176293
176303
  );
176294
176304
  }
@@ -176298,7 +176308,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
176298
176308
  entityId: effectiveMapping?.entityId ?? entityId,
176299
176309
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
176300
176310
  };
176301
- logger190.info(
176311
+ logger192.info(
176302
176312
  `${entityId}: Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity}`
176303
176313
  );
176304
176314
  }
@@ -176308,7 +176318,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
176308
176318
  entityId: effectiveMapping?.entityId ?? entityId,
176309
176319
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
176310
176320
  };
176311
- logger190.info(
176321
+ logger192.info(
176312
176322
  `${entityId}: Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity}`
176313
176323
  );
176314
176324
  }
@@ -176329,7 +176339,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
176329
176339
  rooms: roomsObj
176330
176340
  }
176331
176341
  };
176332
- logger190.info(
176342
+ logger192.info(
176333
176343
  `${entityId}: Auto-detected ${valetudoRooms.length} Valetudo segments`
176334
176344
  );
176335
176345
  } else {
@@ -176346,14 +176356,14 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
176346
176356
  rooms: roomsObj
176347
176357
  }
176348
176358
  };
176349
- logger190.info(
176359
+ logger192.info(
176350
176360
  `${entityId}: Auto-detected ${roborockRooms.length} Roborock rooms`
176351
176361
  );
176352
176362
  }
176353
176363
  }
176354
176364
  }
176355
176365
  } else {
176356
- logger190.warn(`${entityId}: No device_id \u2014 cannot auto-assign battery`);
176366
+ logger192.warn(`${entityId}: No device_id \u2014 cannot auto-assign battery`);
176357
176367
  }
176358
176368
  const payload = {
176359
176369
  entity_id: entityId,
@@ -176408,7 +176418,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
176408
176418
  if (state.state === this.lastState?.state && JSON.stringify(state.attributes) === JSON.stringify(this.lastState?.attributes)) {
176409
176419
  return;
176410
176420
  }
176411
- logger190.debug(
176421
+ logger192.debug(
176412
176422
  `State update received for ${this.entityId}: state=${state.state}`
176413
176423
  );
176414
176424
  this.lastState = state;
@@ -176784,10 +176794,10 @@ var BridgeEnvironmentFactory = class extends BridgeFactory {
176784
176794
  // src/core/ioc/app-environment.ts
176785
176795
  var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
176786
176796
  constructor(rootEnv, options) {
176787
- const logger192 = rootEnv.get(LoggerService);
176797
+ const logger194 = rootEnv.get(LoggerService);
176788
176798
  super({
176789
176799
  id: "App",
176790
- log: logger192.get("AppContainer"),
176800
+ log: logger194.get("AppContainer"),
176791
176801
  parent: rootEnv
176792
176802
  });
176793
176803
  this.options = options;
@@ -176800,8 +176810,8 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
176800
176810
  }
176801
176811
  construction;
176802
176812
  async init() {
176803
- const logger192 = this.get(LoggerService);
176804
- this.set(LoggerService, logger192);
176813
+ const logger194 = this.get(LoggerService);
176814
+ this.set(LoggerService, logger194);
176805
176815
  this.set(AppStorage, new AppStorage(await this.load(StorageService)));
176806
176816
  this.set(BridgeStorage, new BridgeStorage(await this.load(AppStorage)));
176807
176817
  this.set(
@@ -176818,7 +176828,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
176818
176828
  );
176819
176829
  this.set(
176820
176830
  HomeAssistantClient,
176821
- new HomeAssistantClient(logger192, this.options.homeAssistant)
176831
+ new HomeAssistantClient(logger194, this.options.homeAssistant)
176822
176832
  );
176823
176833
  this.set(
176824
176834
  HomeAssistantConfig,
@@ -176826,7 +176836,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
176826
176836
  );
176827
176837
  this.set(
176828
176838
  HomeAssistantActions,
176829
- new HomeAssistantActions(logger192, await this.load(HomeAssistantClient))
176839
+ new HomeAssistantActions(logger194, await this.load(HomeAssistantClient))
176830
176840
  );
176831
176841
  this.set(
176832
176842
  HomeAssistantRegistry,
@@ -176847,7 +176857,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
176847
176857
  this.set(
176848
176858
  WebApi,
176849
176859
  new WebApi(
176850
- logger192,
176860
+ logger194,
176851
176861
  await this.load(BridgeService),
176852
176862
  await this.load(HomeAssistantClient),
176853
176863
  await this.load(HomeAssistantRegistry),
@@ -176872,7 +176882,7 @@ init_nodejs();
176872
176882
  init_level_control();
176873
176883
 
176874
176884
  // src/matter/patches/patch-level-control-tlv.ts
176875
- var logger191 = Logger.get("PatchLevelControlTlv");
176885
+ var logger193 = Logger.get("PatchLevelControlTlv");
176876
176886
  function patchLevelControlTlv() {
176877
176887
  let patched = 0;
176878
176888
  const moveToLevelFields = LevelControl3.TlvMoveToLevelRequest.fieldDefinitions;
@@ -176886,11 +176896,11 @@ function patchLevelControlTlv() {
176886
176896
  patched++;
176887
176897
  }
176888
176898
  if (patched > 0) {
176889
- logger191.info(
176899
+ logger193.info(
176890
176900
  `Patched ${patched} LevelControl TLV schema(s): transitionTime is now optional (Google Home compatibility)`
176891
176901
  );
176892
176902
  } else {
176893
- logger191.warn(
176903
+ logger193.warn(
176894
176904
  "Failed to patch LevelControl TLV schemas \u2014 field definitions not found. Google Home brightness adjustment may not work."
176895
176905
  );
176896
176906
  }