@riddix/hamh 2.1.0-alpha.777 → 2.1.0-alpha.779

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.
@@ -1767,8 +1767,8 @@ var init_Cancelable = __esm({
1767
1767
  };
1768
1768
  return result;
1769
1769
  }
1770
- static set logger(logger234) {
1771
- this.#logger = logger234;
1770
+ static set logger(logger235) {
1771
+ this.#logger = logger235;
1772
1772
  }
1773
1773
  static get logger() {
1774
1774
  return this.#logger;
@@ -3459,13 +3459,13 @@ var init_Logger = __esm({
3459
3459
  *
3460
3460
  * @deprecated use {@link destinations}
3461
3461
  */
3462
- static addLogger(identifier, logger234, options) {
3462
+ static addLogger(identifier, logger235, options) {
3463
3463
  if (identifier in this.destinations) {
3464
3464
  throw new ImplementationError(`Logger "${identifier}" already exists`);
3465
3465
  }
3466
3466
  const dest = LogDestination({ name: identifier });
3467
3467
  const legacy = adaptDestinationToLegacy(dest);
3468
- legacy.log = logger234;
3468
+ legacy.log = logger235;
3469
3469
  if (options?.defaultLogLevel !== void 0) {
3470
3470
  legacy.defaultLogLevel = options.defaultLogLevel;
3471
3471
  }
@@ -5661,8 +5661,8 @@ var init_Construction = __esm({
5661
5661
  }
5662
5662
  }
5663
5663
  #unhandledError(...args) {
5664
- const logger234 = Logger.get(this.#subject.constructor.name);
5665
- logger234.error(...args);
5664
+ const logger235 = Logger.get(this.#subject.constructor.name);
5665
+ logger235.error(...args);
5666
5666
  }
5667
5667
  #createErrorHandler(name) {
5668
5668
  return (e) => {
@@ -62271,8 +62271,8 @@ var init_NodeSession = __esm({
62271
62271
  return session?.type === SessionType.Unicast;
62272
62272
  }
62273
62273
  NodeSession2.is = is;
62274
- function logNew(logger234, operation, session, messenger, fabric, peerNodeId) {
62275
- logger234.info(
62274
+ function logNew(logger235, operation, session, messenger, fabric, peerNodeId) {
62275
+ logger235.info(
62276
62276
  session.via,
62277
62277
  `${operation} session with`,
62278
62278
  Diagnostic.strong(PeerAddress({ fabricIndex: fabric.fabricIndex, nodeId: peerNodeId }).toString()),
@@ -111651,11 +111651,11 @@ var init_Api = __esm({
111651
111651
  }
111652
111652
  Api2.resourceFor = resourceFor;
111653
111653
  function log(level, facility, id, ...message) {
111654
- let logger234 = loggers.get(facility);
111655
- if (!logger234) {
111656
- loggers.set(facility, logger234 = Logger.get(facility));
111654
+ let logger235 = loggers.get(facility);
111655
+ if (!logger235) {
111656
+ loggers.set(facility, logger235 = Logger.get(facility));
111657
111657
  }
111658
- logger234[level](Diagnostic.via(id || "(anon)"), message);
111658
+ logger235[level](Diagnostic.via(id || "(anon)"), message);
111659
111659
  }
111660
111660
  Api2.log = log;
111661
111661
  function logRequest(facility, id, method, target) {
@@ -125790,10 +125790,10 @@ var init_home_assistant_actions = __esm({
125790
125790
  circuitBreakerResetMs: 3e4
125791
125791
  };
125792
125792
  HomeAssistantActions = class extends Service {
125793
- constructor(logger234, client, config11) {
125793
+ constructor(logger235, client, config11) {
125794
125794
  super("HomeAssistantActions");
125795
125795
  this.client = client;
125796
- this.log = logger234.get(this);
125796
+ this.log = logger235.get(this);
125797
125797
  this.config = { ...defaultConfig, ...config11 };
125798
125798
  this.circuitBreaker = new CircuitBreaker(
125799
125799
  this.config.circuitBreakerThreshold,
@@ -126133,10 +126133,10 @@ var DiagnosticService = class {
126133
126133
  };
126134
126134
 
126135
126135
  // src/api/access-log.ts
126136
- function accessLogger(logger234) {
126136
+ function accessLogger(logger235) {
126137
126137
  return (req, res, next) => {
126138
126138
  res.on("finish", () => {
126139
- logger234.debug(
126139
+ logger235.debug(
126140
126140
  `${req.method} ${decodeURI(req.originalUrl)} ${res.statusCode} ${res.statusMessage} from ${req.socket.remoteAddress}`
126141
126141
  );
126142
126142
  });
@@ -130252,7 +130252,7 @@ var WebSocketApi = class {
130252
130252
 
130253
130253
  // src/api/web-api.ts
130254
130254
  var WebApi = class extends Service {
130255
- constructor(logger234, bridgeService, haClient, haRegistry, bridgeStorage, mappingStorage, lockCredentialStorage, settingsStorage, backupService, props) {
130255
+ constructor(logger235, bridgeService, haClient, haRegistry, bridgeStorage, mappingStorage, lockCredentialStorage, settingsStorage, backupService, props) {
130256
130256
  super("WebApi");
130257
130257
  this.bridgeService = bridgeService;
130258
130258
  this.haClient = haClient;
@@ -130263,8 +130263,8 @@ var WebApi = class extends Service {
130263
130263
  this.settingsStorage = settingsStorage;
130264
130264
  this.backupService = backupService;
130265
130265
  this.props = props;
130266
- this.logger = logger234;
130267
- this.log = logger234.get(this);
130266
+ this.logger = logger235;
130267
+ this.log = logger235.get(this);
130268
130268
  this.accessLogger = accessLogger(this.log.createChild("Access Log"));
130269
130269
  this.startTime = Date.now();
130270
130270
  this.wsApi = new WebSocketApi(
@@ -131428,10 +131428,10 @@ function isTransientConnectError(reason) {
131428
131428
  return msg.includes("socket hang up") || msg.includes("tls") || msg.includes("TLS");
131429
131429
  }
131430
131430
  var HomeAssistantClient = class extends Service {
131431
- constructor(logger234, options) {
131431
+ constructor(logger235, options) {
131432
131432
  super("HomeAssistantClient");
131433
131433
  this.options = options;
131434
- this.log = logger234.get(this);
131434
+ this.log = logger235.get(this);
131435
131435
  }
131436
131436
  options;
131437
131437
  static Options = /* @__PURE__ */ Symbol.for("HomeAssistantClientProps");
@@ -148875,10 +148875,10 @@ function deadSessionTimeoutMs(flags2) {
148875
148875
  }
148876
148876
  var SHUTDOWN_SESSION_CLOSE_TIMEOUT_MS = 2500;
148877
148877
  var Bridge = class {
148878
- constructor(env, logger234, dataProvider, endpointManager) {
148878
+ constructor(env, logger235, dataProvider, endpointManager) {
148879
148879
  this.dataProvider = dataProvider;
148880
148880
  this.endpointManager = endpointManager;
148881
- this.log = logger234.get(`Bridge / ${dataProvider.id}`);
148881
+ this.log = logger235.get(`Bridge / ${dataProvider.id}`);
148882
148882
  this.server = new BridgeServerNode(
148883
148883
  env,
148884
148884
  this.dataProvider,
@@ -149881,9 +149881,11 @@ function testBit(value, bitValue) {
149881
149881
  }
149882
149882
 
149883
149883
  // src/matter/behaviors/basic-information-server.ts
149884
+ init_esm();
149884
149885
  init_esm7();
149885
149886
  import crypto6 from "node:crypto";
149886
149887
  init_home_assistant_entity_behavior();
149888
+ var logger191 = Logger.get("BasicInformationServer");
149887
149889
  var BasicInformationServer2 = class extends BridgedDeviceBasicInformationServer {
149888
149890
  async initialize() {
149889
149891
  await super.initialize();
@@ -149913,7 +149915,7 @@ var BasicInformationServer2 = class extends BridgedDeviceBasicInformationServer
149913
149915
  vendorId: VendorId(vendorId3),
149914
149916
  vendorName: ellipse(32, mapping?.customVendorName) ?? ellipse(32, device?.manufacturer) ?? hash(32, basicInformation.vendorName),
149915
149917
  productName: ellipse(32, mapping?.customProductName) ?? productNameFromNodeLabel ?? ellipse(32, device?.model_id) ?? ellipse(32, device?.model) ?? hash(32, basicInformation.productName),
149916
- productLabel: ellipse(64, device?.model) ?? hash(64, basicInformation.productLabel),
149918
+ productLabel: ellipse(64, mapping?.customProductName) ?? ellipse(64, device?.model) ?? hash(64, basicInformation.productLabel),
149917
149919
  hardwareVersion: basicInformation.hardwareVersion,
149918
149920
  softwareVersion: basicInformation.softwareVersion,
149919
149921
  hardwareVersionString: ellipse(64, device?.hw_version),
@@ -149925,6 +149927,9 @@ var BasicInformationServer2 = class extends BridgedDeviceBasicInformationServer
149925
149927
  // multiple fabric connections. Using MD5 hash of entity_id for stability.
149926
149928
  uniqueId: crypto6.createHash("md5").update(entity.entity_id).digest("hex").substring(0, 32)
149927
149929
  });
149930
+ logger191.debug(
149931
+ `[${entity.entity_id}] basicInfo vendor=${this.state.vendorName} product=${this.state.productName} label=${this.state.productLabel} serial=${this.state.serialNumber} node=${this.state.nodeLabel}`
149932
+ );
149928
149933
  }
149929
149934
  };
149930
149935
  function ellipse(maxLength, value) {
@@ -150013,7 +150018,7 @@ init_wi_fi_network_diagnostics();
150013
150018
 
150014
150019
  // src/matter/behaviors/electrical-energy-measurement-server.ts
150015
150020
  init_home_assistant_entity_behavior();
150016
- var logger191 = Logger.get("ElectricalEnergyMeasurementServer");
150021
+ var logger192 = Logger.get("ElectricalEnergyMeasurementServer");
150017
150022
  var FeaturedBase = ElectricalEnergyMeasurementServer.with("CumulativeEnergy", "ImportedEnergy");
150018
150023
  var ElectricalEnergyMeasurementServerBase = class extends FeaturedBase {
150019
150024
  async initialize() {
@@ -150022,7 +150027,7 @@ var ElectricalEnergyMeasurementServerBase = class extends FeaturedBase {
150022
150027
  const entityId = homeAssistant.entityId;
150023
150028
  const energyEntity = homeAssistant.state.mapping?.energyEntity;
150024
150029
  if (energyEntity) {
150025
- logger191.debug(
150030
+ logger192.debug(
150026
150031
  `[${entityId}] ElectricalEnergyMeasurement using mapped energy entity: ${energyEntity}`
150027
150032
  );
150028
150033
  }
@@ -150078,7 +150083,7 @@ var HaElectricalEnergyMeasurementServer = ElectricalEnergyMeasurementServerBase.
150078
150083
  // src/matter/behaviors/electrical-power-measurement-server.ts
150079
150084
  init_esm();
150080
150085
  init_home_assistant_entity_behavior();
150081
- var logger192 = Logger.get("ElectricalPowerMeasurementServer");
150086
+ var logger193 = Logger.get("ElectricalPowerMeasurementServer");
150082
150087
  var ElectricalPowerMeasurementServerBase = class extends ElectricalPowerMeasurementServer {
150083
150088
  async initialize() {
150084
150089
  await super.initialize();
@@ -150086,7 +150091,7 @@ var ElectricalPowerMeasurementServerBase = class extends ElectricalPowerMeasurem
150086
150091
  const entityId = homeAssistant.entityId;
150087
150092
  const powerEntity = homeAssistant.state.mapping?.powerEntity;
150088
150093
  if (powerEntity) {
150089
- logger192.debug(
150094
+ logger193.debug(
150090
150095
  `[${entityId}] ElectricalPowerMeasurement using mapped power entity: ${powerEntity}`
150091
150096
  );
150092
150097
  }
@@ -150138,7 +150143,7 @@ init_home_assistant_entity_behavior();
150138
150143
  // src/matter/behaviors/humidity-measurement-server.ts
150139
150144
  init_esm();
150140
150145
  init_home_assistant_entity_behavior();
150141
- var logger193 = Logger.get("HumidityMeasurementServer");
150146
+ var logger194 = Logger.get("HumidityMeasurementServer");
150142
150147
  var HumidityMeasurementServerBase = class extends RelativeHumidityMeasurementServer {
150143
150148
  async initialize() {
150144
150149
  await super.initialize();
@@ -150151,7 +150156,7 @@ var HumidityMeasurementServerBase = class extends RelativeHumidityMeasurementSer
150151
150156
  return;
150152
150157
  }
150153
150158
  const humidity = this.getHumidity(this.state.config, entity.state);
150154
- logger193.debug(
150159
+ logger194.debug(
150155
150160
  `Humidity ${entity.state.entity_id} raw=${entity.state.state} measuredValue=${humidity}`
150156
150161
  );
150157
150162
  applyPatchState(this.state, {
@@ -150181,7 +150186,7 @@ function HumidityMeasurementServer(config11) {
150181
150186
  // src/matter/behaviors/power-source-server.ts
150182
150187
  init_esm();
150183
150188
  init_home_assistant_entity_behavior();
150184
- var logger194 = Logger.get("PowerSourceServer");
150189
+ var logger195 = Logger.get("PowerSourceServer");
150185
150190
  var FeaturedBase2 = PowerSourceServer.with("Battery", "Rechargeable");
150186
150191
  var PowerSourceServerBase = class extends FeaturedBase2 {
150187
150192
  async initialize() {
@@ -150193,17 +150198,17 @@ var PowerSourceServerBase = class extends FeaturedBase2 {
150193
150198
  applyPatchState(this.state, {
150194
150199
  endpointList: [endpointNumber]
150195
150200
  });
150196
- logger194.debug(
150201
+ logger195.debug(
150197
150202
  `[${entityId}] PowerSource initialized with endpointList=[${endpointNumber}]`
150198
150203
  );
150199
150204
  } else {
150200
- logger194.warn(
150205
+ logger195.warn(
150201
150206
  `[${entityId}] PowerSource endpoint number is null during initialize - endpointList will be empty!`
150202
150207
  );
150203
150208
  }
150204
150209
  const batteryEntity = homeAssistant.state.mapping?.batteryEntity;
150205
150210
  if (batteryEntity) {
150206
- logger194.debug(
150211
+ logger195.debug(
150207
150212
  `[${entityId}] PowerSource using mapped battery entity: ${batteryEntity}`
150208
150213
  );
150209
150214
  }
@@ -150629,7 +150634,7 @@ function notifyLightTurnedOn(entityId) {
150629
150634
  sweepLastTurnOn(now);
150630
150635
  lastTurnOnTimestamps.set(entityId, now);
150631
150636
  }
150632
- var logger195 = Logger.get("LevelControlServer");
150637
+ var logger196 = Logger.get("LevelControlServer");
150633
150638
  var FeaturedBase4 = LevelControlServer.with("OnOff", "Lighting");
150634
150639
  var LevelControlServerBase = class extends FeaturedBase4 {
150635
150640
  pendingTransitionTime;
@@ -150647,7 +150652,7 @@ var LevelControlServerBase = class extends FeaturedBase4 {
150647
150652
  try {
150648
150653
  await super.initialize();
150649
150654
  } catch (error) {
150650
- logger195.error("super.initialize() failed:", error);
150655
+ logger196.error("super.initialize() failed:", error);
150651
150656
  throw error;
150652
150657
  }
150653
150658
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
@@ -150724,7 +150729,7 @@ var LevelControlServerBase = class extends FeaturedBase4 {
150724
150729
  const lastTurnOn = lastTurnOnTimestamps.get(entityId);
150725
150730
  const timeSinceTurnOn = lastTurnOn ? Date.now() - lastTurnOn : Infinity;
150726
150731
  if (level >= this.maxLevel && timeSinceTurnOn < 200) {
150727
- logger195.debug(
150732
+ logger196.debug(
150728
150733
  `[${entityId}] Ignoring moveToLevel(${level}) - Alexa brightness reset detected (${timeSinceTurnOn}ms after turn-on)`
150729
150734
  );
150730
150735
  return;
@@ -150770,7 +150775,7 @@ function LevelControlServer2(config11) {
150770
150775
  }
150771
150776
 
150772
150777
  // src/matter/behaviors/on-off-server.ts
150773
- var logger196 = Logger.get("OnOffServer");
150778
+ var logger197 = Logger.get("OnOffServer");
150774
150779
  var optimisticOnOffState = /* @__PURE__ */ new Map();
150775
150780
  var OPTIMISTIC_TIMEOUT_MS2 = 3e3;
150776
150781
  function sweepOptimisticOnOff(now) {
@@ -150821,7 +150826,7 @@ var OnOffServerBase = class extends OnOffServer {
150821
150826
  if (!action) {
150822
150827
  return;
150823
150828
  }
150824
- logger196.info(`[${homeAssistant.entityId}] Turning ON -> ${action.action}`);
150829
+ logger197.info(`[${homeAssistant.entityId}] Turning ON -> ${action.action}`);
150825
150830
  notifyLightTurnedOn(homeAssistant.entityId);
150826
150831
  const now = Date.now();
150827
150832
  sweepOptimisticOnOff(now);
@@ -150846,7 +150851,7 @@ var OnOffServerBase = class extends OnOffServer {
150846
150851
  if (!action) {
150847
150852
  return;
150848
150853
  }
150849
- logger196.info(`[${homeAssistant.entityId}] Turning OFF -> ${action.action}`);
150854
+ logger197.info(`[${homeAssistant.entityId}] Turning OFF -> ${action.action}`);
150850
150855
  const now = Date.now();
150851
150856
  sweepOptimisticOnOff(now);
150852
150857
  optimisticOnOffState.set(homeAssistant.entityId, {
@@ -150880,7 +150885,7 @@ function setOptimisticOnOff(entityId, expectedOnOff) {
150880
150885
  }
150881
150886
 
150882
150887
  // src/matter/behaviors/fan-control-server.ts
150883
- var logger197 = Logger.get("FanControlServer");
150888
+ var logger198 = Logger.get("FanControlServer");
150884
150889
  var defaultStepSize = 33.33;
150885
150890
  var minSpeedMax = 3;
150886
150891
  var maxSpeedMax = 100;
@@ -151267,7 +151272,7 @@ var FanControlServerBase = class extends FeaturedBase5 {
151267
151272
  const entityId = this.agent.get(HomeAssistantEntityBehavior).entity.entity_id;
151268
151273
  setOptimisticOnOff(entityId, on);
151269
151274
  } catch (e) {
151270
- logger197.debug(
151275
+ logger198.debug(
151271
151276
  `syncOnOff(${on}) failed: ${e instanceof Error ? e.message : String(e)}`
151272
151277
  );
151273
151278
  }
@@ -151390,7 +151395,7 @@ var FanOnOffServer = OnOffServer2({
151390
151395
  });
151391
151396
 
151392
151397
  // src/matter/endpoints/composed/composed-air-purifier-endpoint.ts
151393
- var logger198 = Logger.get("ComposedAirPurifierEndpoint");
151398
+ var logger199 = Logger.get("ComposedAirPurifierEndpoint");
151394
151399
  var temperatureConfig = {
151395
151400
  getValue(entity, agent) {
151396
151401
  const fallbackUnit = agent.env.get(HomeAssistantConfig).unitSystem.temperature;
@@ -151606,7 +151611,7 @@ var ComposedAirPurifierEndpoint = class _ComposedAirPurifierEndpoint extends End
151606
151611
  config11.powerEntityId ? "+Pwr" : "",
151607
151612
  config11.energyEntityId ? "+Nrg" : ""
151608
151613
  ].filter(Boolean).join("");
151609
- logger198.info(
151614
+ logger199.info(
151610
151615
  `Created composed air purifier ${primaryEntityId}: ${clusterLabels}`
151611
151616
  );
151612
151617
  return endpoint;
@@ -151914,7 +151919,7 @@ init_home_assistant_entity_behavior();
151914
151919
  // src/matter/behaviors/thermostat-server.ts
151915
151920
  init_esm();
151916
151921
  init_home_assistant_entity_behavior();
151917
- var logger199 = Logger.get("ThermostatServer");
151922
+ var logger200 = Logger.get("ThermostatServer");
151918
151923
  var SystemMode = Thermostat3.SystemMode;
151919
151924
  var RunningMode = Thermostat3.ThermostatRunningMode;
151920
151925
  var nudgingSetpoints = /* @__PURE__ */ new Set();
@@ -151993,7 +151998,7 @@ function clearInactiveSetpointState(self, scope) {
151993
151998
  }
151994
151999
  function thermostatPreInitialize(self) {
151995
152000
  const currentLocal = self.state.localTemperature;
151996
- logger199.debug(
152001
+ logger200.debug(
151997
152002
  `initialize: features - heating=${self.features.heating}, cooling=${self.features.cooling}`
151998
152003
  );
151999
152004
  const localValue = typeof currentLocal === "number" && !Number.isNaN(currentLocal) ? currentLocal : currentLocal === null ? null : 2100;
@@ -152040,7 +152045,7 @@ function thermostatPreInitialize(self) {
152040
152045
  } else {
152041
152046
  clearInactiveSetpointState(self, "Cool");
152042
152047
  }
152043
- logger199.debug(
152048
+ logger200.debug(
152044
152049
  `initialize: after force-set - local=${self.state.localTemperature}`
152045
152050
  );
152046
152051
  self.state.thermostatRunningState = runningStateAllOff;
@@ -152133,7 +152138,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
152133
152138
  maxCoolLimit,
152134
152139
  "cool"
152135
152140
  );
152136
- logger199.debug(
152141
+ logger200.debug(
152137
152142
  `update: limits heat=[${minHeatLimit}, ${maxHeatLimit}], cool=[${minCoolLimit}, ${maxCoolLimit}], systemMode=${systemMode}, runningMode=${runningMode}`
152138
152143
  );
152139
152144
  let controlSequence = config11.getControlSequence(entity.state, this.agent);
@@ -152206,18 +152211,18 @@ var ThermostatServerBase = class extends FullFeaturedBase {
152206
152211
  */
152207
152212
  // biome-ignore lint/correctness/noUnusedPrivateClassMembers: Called via thermostatPostInitialize + prototype copy
152208
152213
  heatingSetpointChanging(value, _oldValue, context) {
152209
- logger199.debug(
152214
+ logger200.debug(
152210
152215
  `heatingSetpointChanging: value=${value}, oldValue=${_oldValue}, isOffline=${transactionIsOffline(context)}`
152211
152216
  );
152212
152217
  if (transactionIsOffline(context)) {
152213
- logger199.debug(
152218
+ logger200.debug(
152214
152219
  "heatingSetpointChanging: skipping - transaction is offline"
152215
152220
  );
152216
152221
  return;
152217
152222
  }
152218
152223
  const next = Temperature.celsius(value / 100);
152219
152224
  if (!next) {
152220
- logger199.debug("heatingSetpointChanging: skipping - invalid temperature");
152225
+ logger200.debug("heatingSetpointChanging: skipping - invalid temperature");
152221
152226
  return;
152222
152227
  }
152223
152228
  this.agent.asLocalActor(() => {
@@ -152228,7 +152233,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
152228
152233
  this.agent
152229
152234
  );
152230
152235
  const currentMode = this.state.systemMode;
152231
- logger199.debug(
152236
+ logger200.debug(
152232
152237
  `heatingSetpointChanging: supportsRange=${supportsRange}, systemMode=${currentMode}, features.heating=${this.features.heating}, features.cooling=${this.features.cooling}`
152233
152238
  );
152234
152239
  if (!supportsRange) {
@@ -152238,12 +152243,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
152238
152243
  const isOff = currentMode === Thermostat3.SystemMode.Off;
152239
152244
  if (isOff && this.features.heating) {
152240
152245
  if (nudgingSetpoints.has(homeAssistant.entityId)) {
152241
- logger199.debug(
152246
+ logger200.debug(
152242
152247
  `heatingSetpointChanging: skipping auto-resume - nudge write in progress`
152243
152248
  );
152244
152249
  return;
152245
152250
  }
152246
- logger199.info(
152251
+ logger200.info(
152247
152252
  `heatingSetpointChanging: auto-resume - switching to Heat (was Off)`
152248
152253
  );
152249
152254
  const modeAction = config11.setSystemMode(
@@ -152252,17 +152257,17 @@ var ThermostatServerBase = class extends FullFeaturedBase {
152252
152257
  );
152253
152258
  homeAssistant.callAction(modeAction);
152254
152259
  } else if (!isAutoMode && !isHeatingMode) {
152255
- logger199.debug(
152260
+ logger200.debug(
152256
152261
  `heatingSetpointChanging: skipping - not in heating/auto mode (mode=${currentMode}, haMode=${haHvacMode})`
152257
152262
  );
152258
152263
  return;
152259
152264
  }
152260
- logger199.debug(
152265
+ logger200.debug(
152261
152266
  `heatingSetpointChanging: proceeding - isAutoMode=${isAutoMode}, isHeatingMode=${isHeatingMode}, isOff=${isOff}, haMode=${haHvacMode}`
152262
152267
  );
152263
152268
  }
152264
152269
  const coolingSetpoint = this.features.cooling ? this.state.occupiedCoolingSetpoint : value;
152265
- logger199.debug(
152270
+ logger200.debug(
152266
152271
  `heatingSetpointChanging: calling setTemperature with heat=${next.celsius(true)}, cool=${coolingSetpoint}`
152267
152272
  );
152268
152273
  this.setTemperature(
@@ -152301,12 +152306,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
152301
152306
  const isOff = currentMode === Thermostat3.SystemMode.Off;
152302
152307
  if (isOff && !this.features.heating && this.features.cooling) {
152303
152308
  if (nudgingSetpoints.has(homeAssistant.entityId)) {
152304
- logger199.debug(
152309
+ logger200.debug(
152305
152310
  `coolingSetpointChanging: skipping auto-resume - nudge write in progress`
152306
152311
  );
152307
152312
  return;
152308
152313
  }
152309
- logger199.info(
152314
+ logger200.info(
152310
152315
  `coolingSetpointChanging: auto-resume - switching to Cool (was Off)`
152311
152316
  );
152312
152317
  const modeAction = config11.setSystemMode(
@@ -152315,12 +152320,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
152315
152320
  );
152316
152321
  homeAssistant.callAction(modeAction);
152317
152322
  } else if (!isAutoMode && !isCoolingMode) {
152318
- logger199.debug(
152323
+ logger200.debug(
152319
152324
  `coolingSetpointChanging: skipping - not in cooling/auto mode (mode=${currentMode}, haMode=${haHvacMode})`
152320
152325
  );
152321
152326
  return;
152322
152327
  }
152323
- logger199.debug(
152328
+ logger200.debug(
152324
152329
  `coolingSetpointChanging: proceeding - isAutoMode=${isAutoMode}, isCoolingMode=${isCoolingMode}, isOff=${isOff}, haMode=${haHvacMode}`
152325
152330
  );
152326
152331
  }
@@ -152434,7 +152439,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
152434
152439
  const effectiveMax = max ?? 5e3;
152435
152440
  if (value == null || Number.isNaN(value)) {
152436
152441
  const defaultValue = type === "heat" ? 2e3 : 2400;
152437
- logger199.debug(
152442
+ logger200.debug(
152438
152443
  `${type} setpoint is undefined, using default: ${defaultValue}`
152439
152444
  );
152440
152445
  return Math.max(effectiveMin, Math.min(effectiveMax, defaultValue));
@@ -153006,7 +153011,7 @@ function ClimateDevice(homeAssistantEntity, includeBasicInformation = true) {
153006
153011
  }
153007
153012
 
153008
153013
  // src/matter/endpoints/composed/composed-climate-fan-endpoint.ts
153009
- var logger200 = Logger.get("ComposedClimateFanEndpoint");
153014
+ var logger201 = Logger.get("ComposedClimateFanEndpoint");
153010
153015
  function createEndpointId3(entityId, customName) {
153011
153016
  const baseName = customName || entityId;
153012
153017
  return baseName.replace(/\./g, "_").replace(/\s+/g, "_");
@@ -153044,7 +153049,7 @@ var ComposedClimateFanEndpoint = class _ComposedClimateFanEndpoint extends Endpo
153044
153049
  climateSub = new Endpoint(climateType, { id: `${endpointId}_climate` });
153045
153050
  } catch (error) {
153046
153051
  const message = error instanceof Error ? error.message : String(error);
153047
- logger200.warn(
153052
+ logger201.warn(
153048
153053
  `Companion fan: climate sub build failed for ${primaryEntityId}: ${message}`
153049
153054
  );
153050
153055
  return void 0;
@@ -153084,7 +153089,7 @@ var ComposedClimateFanEndpoint = class _ComposedClimateFanEndpoint extends Endpo
153084
153089
  endpointId,
153085
153090
  [climateSub, fanSub]
153086
153091
  );
153087
- logger200.info(`Created composed climate+fan endpoint ${primaryEntityId}`);
153092
+ logger201.info(`Created composed climate+fan endpoint ${primaryEntityId}`);
153088
153093
  return endpoint;
153089
153094
  }
153090
153095
  constructor(type, entityId, id, parts) {
@@ -153179,7 +153184,7 @@ init_home_assistant_entity_behavior();
153179
153184
  // src/matter/behaviors/pressure-measurement-server.ts
153180
153185
  init_esm();
153181
153186
  init_home_assistant_entity_behavior();
153182
- var logger201 = Logger.get("PressureMeasurementServer");
153187
+ var logger202 = Logger.get("PressureMeasurementServer");
153183
153188
  var MIN_PRESSURE = 300;
153184
153189
  var MAX_PRESSURE = 1100;
153185
153190
  var PressureMeasurementServerBase = class extends PressureMeasurementServer {
@@ -153207,7 +153212,7 @@ var PressureMeasurementServerBase = class extends PressureMeasurementServer {
153207
153212
  }
153208
153213
  const rounded = Math.round(value);
153209
153214
  if (rounded < MIN_PRESSURE || rounded > MAX_PRESSURE) {
153210
- logger201.warn(
153215
+ logger202.warn(
153211
153216
  `Pressure value ${rounded} (raw: ${value}) for ${entity.entity_id} is outside valid range [${MIN_PRESSURE}-${MAX_PRESSURE}], ignoring`
153212
153217
  );
153213
153218
  return null;
@@ -153226,7 +153231,7 @@ function PressureMeasurementServer2(config11) {
153226
153231
  }
153227
153232
 
153228
153233
  // src/matter/endpoints/composed/composed-sensor-endpoint.ts
153229
- var logger202 = Logger.get("ComposedSensorEndpoint");
153234
+ var logger203 = Logger.get("ComposedSensorEndpoint");
153230
153235
  var temperatureConfig2 = {
153231
153236
  getValue(entity, agent) {
153232
153237
  const fallbackUnit = agent.env.get(HomeAssistantConfig).unitSystem.temperature;
@@ -153403,7 +153408,7 @@ var ComposedSensorEndpoint = class _ComposedSensorEndpoint extends Endpoint {
153403
153408
  if (config11.pressureEntityId && pressSub) {
153404
153409
  endpoint.subEndpoints.set(config11.pressureEntityId, pressSub);
153405
153410
  }
153406
- logger202.info(
153411
+ logger203.info(
153407
153412
  `Created composed sensor ${primaryEntityId} with ${parts.length} sub-endpoint(s): T${humSub ? "+H" : ""}${pressSub ? "+P" : ""}${config11.batteryEntityId ? "+Bat" : ""}${config11.powerEntityId ? "+Pwr" : ""}${config11.energyEntityId ? "+Nrg" : ""}`
153408
153413
  );
153409
153414
  return endpoint;
@@ -153539,7 +153544,7 @@ init_home_assistant_entity_behavior();
153539
153544
  // src/matter/behaviors/mode-select-server.ts
153540
153545
  init_esm();
153541
153546
  init_home_assistant_entity_behavior();
153542
- var logger203 = Logger.get("ModeSelectServer");
153547
+ var logger204 = Logger.get("ModeSelectServer");
153543
153548
  function buildSupportedModes(options) {
153544
153549
  return options.map((label, index) => ({
153545
153550
  label: label.length > 64 ? label.substring(0, 64) : label,
@@ -153576,13 +153581,13 @@ var ModeSelectServerBase = class extends ModeSelectServer {
153576
153581
  const options = config11.getOptions(homeAssistant.entity);
153577
153582
  const { newMode } = request;
153578
153583
  if (newMode < 0 || newMode >= options.length) {
153579
- logger203.warn(
153584
+ logger204.warn(
153580
153585
  `[${homeAssistant.entityId}] Invalid mode ${newMode}, options: [${options.join(", ")}]`
153581
153586
  );
153582
153587
  return;
153583
153588
  }
153584
153589
  const option = options[newMode];
153585
- logger203.info(
153590
+ logger204.info(
153586
153591
  `[${homeAssistant.entityId}] changeToMode(${newMode}) -> "${option}"`
153587
153592
  );
153588
153593
  applyPatchState(this.state, { currentMode: newMode });
@@ -154085,7 +154090,7 @@ var CoAlarmWithBatteryType = SmokeCoAlarmDevice.with(
154085
154090
  );
154086
154091
 
154087
154092
  // src/matter/endpoints/legacy/binary-sensor/index.ts
154088
- var logger204 = Logger.get("BinarySensorDevice");
154093
+ var logger205 = Logger.get("BinarySensorDevice");
154089
154094
  var deviceClasses = {
154090
154095
  [BinarySensorDeviceClass.CarbonMonoxide]: CoAlarmType,
154091
154096
  [BinarySensorDeviceClass.Gas]: CoAlarmType,
@@ -154136,11 +154141,11 @@ function BinarySensorDevice(homeAssistantEntity) {
154136
154141
  const originalTypeName = type.name;
154137
154142
  if (hasBattery && batteryTypes.has(type)) {
154138
154143
  type = batteryTypes.get(type);
154139
- logger204.info(
154144
+ logger205.info(
154140
154145
  `[${entityId}] Using battery variant: ${originalTypeName} -> ${type.name}, batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"}`
154141
154146
  );
154142
154147
  } else if (hasBattery) {
154143
- logger204.warn(
154148
+ logger205.warn(
154144
154149
  `[${entityId}] Has battery but no variant available for ${originalTypeName}`
154145
154150
  );
154146
154151
  }
@@ -154271,7 +154276,7 @@ init_home_assistant_entity_behavior();
154271
154276
  init_esm();
154272
154277
  init_home_assistant_actions();
154273
154278
  init_home_assistant_entity_behavior();
154274
- var logger205 = Logger.get("WindowCoveringServer");
154279
+ var logger206 = Logger.get("WindowCoveringServer");
154275
154280
  var MovementStatus = WindowCovering3.MovementStatus;
154276
154281
  var FeaturedBase6 = WindowCoveringServer.with(
154277
154282
  "Lift",
@@ -154391,7 +154396,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
154391
154396
  }
154392
154397
  return existing100ths ?? current100ths;
154393
154398
  };
154394
- logger205.debug(
154399
+ logger206.debug(
154395
154400
  `Cover update for ${entity.entity_id}: state=${state.state}, lift=${currentLift}%, tilt=${currentTilt}%, movement=${MovementStatus[movementStatus]}`
154396
154401
  );
154397
154402
  const overrideType = config11.getCoverType?.(state, this.agent);
@@ -154434,9 +154439,9 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
154434
154439
  );
154435
154440
  if (Object.keys(appliedPatch).length > 0) {
154436
154441
  const hasOperationalChange = "operationalStatus" in appliedPatch;
154437
- const log = hasOperationalChange ? logger205.info : logger205.debug;
154442
+ const log = hasOperationalChange ? logger206.info : logger206.debug;
154438
154443
  log.call(
154439
- logger205,
154444
+ logger206,
154440
154445
  `Cover ${entity.entity_id} state changed: ${JSON.stringify(appliedPatch)}`
154441
154446
  );
154442
154447
  }
@@ -154444,7 +154449,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
154444
154449
  async handleMovement(type, _, direction, targetPercent100ths) {
154445
154450
  const currentLift = this.state.currentPositionLiftPercent100ths ?? 0;
154446
154451
  const currentTilt = this.state.currentPositionTiltPercent100ths ?? 0;
154447
- logger205.info(
154452
+ logger206.info(
154448
154453
  `handleMovement: type=${MovementType[type]}, direction=${MovementDirection[direction]}, target=${targetPercent100ths}, currentLift=${currentLift}, currentTilt=${currentTilt}`
154449
154454
  );
154450
154455
  if (type === MovementType.Lift) {
@@ -154463,7 +154468,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
154463
154468
  }
154464
154469
  } else if (type === MovementType.Tilt) {
154465
154470
  if (targetPercent100ths == null && this.lastLiftMovementDirection === direction && Date.now() - this.lastLiftMovementMs < 50) {
154466
- logger205.info(
154471
+ logger206.info(
154467
154472
  `Skipping tilt ${MovementDirection[direction]}, lift already moving in same direction`
154468
154473
  );
154469
154474
  return;
@@ -154488,13 +154493,13 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
154488
154493
  handleLiftOpen() {
154489
154494
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
154490
154495
  const action = this.state.config.openCoverLift(void 0, this.agent);
154491
- logger205.info(`handleLiftOpen: calling action=${action.action}`);
154496
+ logger206.info(`handleLiftOpen: calling action=${action.action}`);
154492
154497
  homeAssistant.callAction(action);
154493
154498
  }
154494
154499
  handleLiftClose() {
154495
154500
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
154496
154501
  const action = this.state.config.closeCoverLift(void 0, this.agent);
154497
- logger205.info(`handleLiftClose: calling action=${action.action}`);
154502
+ logger206.info(`handleLiftClose: calling action=${action.action}`);
154498
154503
  homeAssistant.callAction(action);
154499
154504
  }
154500
154505
  handleGoToLiftPosition(targetPercent100ths) {
@@ -154516,7 +154521,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
154516
154521
  const isFirstInSequence = timeSinceLastCommand > _WindowCoveringServerBase.COMMAND_SEQUENCE_THRESHOLD_MS;
154517
154522
  const overrideMs = this.resolveDebounceOverride(homeAssistant);
154518
154523
  const debounceMs = overrideMs != null ? overrideMs : isFirstInSequence ? _WindowCoveringServerBase.DEBOUNCE_INITIAL_MS : _WindowCoveringServerBase.DEBOUNCE_SUBSEQUENT_MS;
154519
- logger205.debug(
154524
+ logger206.debug(
154520
154525
  `Lift command: target=${targetPosition}%, debounce=${debounceMs}ms (${overrideMs != null ? "override" : isFirstInSequence ? "initial" : "subsequent"})`
154521
154526
  );
154522
154527
  if (this.liftDebounceTimer) {
@@ -154566,7 +154571,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
154566
154571
  const isFirstInSequence = timeSinceLastCommand > _WindowCoveringServerBase.COMMAND_SEQUENCE_THRESHOLD_MS;
154567
154572
  const overrideMs = this.resolveDebounceOverride(homeAssistant);
154568
154573
  const debounceMs = overrideMs != null ? overrideMs : isFirstInSequence ? _WindowCoveringServerBase.DEBOUNCE_INITIAL_MS : _WindowCoveringServerBase.DEBOUNCE_SUBSEQUENT_MS;
154569
- logger205.debug(
154574
+ logger206.debug(
154570
154575
  `Tilt command: target=${targetPosition}%, debounce=${debounceMs}ms (${overrideMs != null ? "override" : isFirstInSequence ? "initial" : "subsequent"})`
154571
154576
  );
154572
154577
  if (this.tiltDebounceTimer) {
@@ -154618,7 +154623,7 @@ function adjustPositionForWriting(position, flags2, matterSemantics) {
154618
154623
  }
154619
154624
 
154620
154625
  // src/matter/endpoints/legacy/cover/behaviors/cover-window-covering-server.ts
154621
- var logger206 = Logger.get("CoverWindowCoveringServer");
154626
+ var logger207 = Logger.get("CoverWindowCoveringServer");
154622
154627
  var attributes7 = (entity) => entity.attributes;
154623
154628
  var DEVICE_CLASS_TO_MATTER_TYPE = {
154624
154629
  curtain: {
@@ -154690,7 +154695,7 @@ var adjustPositionForReading2 = (position, agent) => {
154690
154695
  const { featureFlags } = agent.env.get(BridgeDataProvider);
154691
154696
  const matterSem = usesMatterSemantics(agent);
154692
154697
  const result = adjustPositionForReading(position, featureFlags, matterSem);
154693
- logger206.debug(`adjustPositionForReading: HA=${position}%, result=${result}%`);
154698
+ logger207.debug(`adjustPositionForReading: HA=${position}%, result=${result}%`);
154694
154699
  return result;
154695
154700
  };
154696
154701
  var adjustPositionForWriting2 = (position, agent) => {
@@ -154814,14 +154819,14 @@ var config6 = {
154814
154819
  var CoverWindowCoveringServer = WindowCoveringServer2(config6);
154815
154820
 
154816
154821
  // src/matter/endpoints/legacy/cover/index.ts
154817
- var logger207 = Logger.get("CoverDevice");
154822
+ var logger208 = Logger.get("CoverDevice");
154818
154823
  var CoverDeviceType = (supportedFeatures, hasBattery, entityId) => {
154819
154824
  const features3 = /* @__PURE__ */ new Set();
154820
154825
  if (testBit(supportedFeatures, CoverSupportedFeatures.support_open)) {
154821
154826
  features3.add("Lift");
154822
154827
  features3.add("PositionAwareLift");
154823
154828
  } else {
154824
- logger207.warn(
154829
+ logger208.warn(
154825
154830
  `[${entityId}] Cover has no support_open feature (supported_features=${supportedFeatures}), adding Lift anyway`
154826
154831
  );
154827
154832
  features3.add("Lift");
@@ -154836,7 +154841,7 @@ var CoverDeviceType = (supportedFeatures, hasBattery, entityId) => {
154836
154841
  features3.add("PositionAwareTilt");
154837
154842
  }
154838
154843
  }
154839
- logger207.info(
154844
+ logger208.info(
154840
154845
  `[${entityId}] Creating WindowCovering with features: [${[...features3].join(", ")}], supported_features=${supportedFeatures}`
154841
154846
  );
154842
154847
  const baseBehaviors2 = [
@@ -154860,16 +154865,16 @@ function CoverDevice(homeAssistantEntity) {
154860
154865
  const hasBatteryEntity = !!homeAssistantEntity.mapping?.batteryEntity;
154861
154866
  const hasBattery = hasBatteryAttr || hasBatteryEntity;
154862
154867
  if (hasBattery) {
154863
- logger207.info(
154868
+ logger208.info(
154864
154869
  `[${entityId}] Creating cover with PowerSource cluster, batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"}`
154865
154870
  );
154866
154871
  } else {
154867
- logger207.debug(
154872
+ logger208.debug(
154868
154873
  `[${entityId}] Creating cover without battery (batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"})`
154869
154874
  );
154870
154875
  }
154871
154876
  if (homeAssistantEntity.mapping?.coverExposeAsDimmableLight) {
154872
- logger207.info(`[${entityId}] Exposing cover as a Dimmable Light (#372)`);
154877
+ logger208.info(`[${entityId}] Exposing cover as a Dimmable Light (#372)`);
154873
154878
  const type = hasBattery ? CoverAsDimmableLightWithBatteryType : CoverAsDimmableLightType;
154874
154879
  return type.set({ homeAssistantEntity });
154875
154880
  }
@@ -154984,7 +154989,7 @@ function DishwasherEndpoint(homeAssistantEntity) {
154984
154989
  // src/matter/behaviors/generic-switch-server.ts
154985
154990
  init_esm();
154986
154991
  init_home_assistant_entity_behavior();
154987
- var logger208 = Logger.get("GenericSwitchServer");
154992
+ var logger209 = Logger.get("GenericSwitchServer");
154988
154993
  var SimpleBase = SwitchServer.with(
154989
154994
  "MomentarySwitch",
154990
154995
  "MomentarySwitchRelease",
@@ -155026,7 +155031,7 @@ var HaGenericSwitchServerBase = class extends SimpleBase {
155026
155031
  await super.initialize();
155027
155032
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
155028
155033
  const entityId = homeAssistant.entityId;
155029
- logger208.debug(`[${entityId}] GenericSwitch initialized (simple)`);
155034
+ logger209.debug(`[${entityId}] GenericSwitch initialized (simple)`);
155030
155035
  this.reactTo(homeAssistant.onChange, this.handleEventChange);
155031
155036
  }
155032
155037
  handleEventChange() {
@@ -155037,7 +155042,7 @@ var HaGenericSwitchServerBase = class extends SimpleBase {
155037
155042
  const eventType = attrs.event_type;
155038
155043
  if (!eventType) return;
155039
155044
  const entityId = homeAssistant.entityId;
155040
- logger208.debug(`[${entityId}] Event fired: ${eventType}`);
155045
+ logger209.debug(`[${entityId}] Event fired: ${eventType}`);
155041
155046
  this.triggerPress(eventType);
155042
155047
  }
155043
155048
  triggerPress(eventType) {
@@ -155083,7 +155088,7 @@ var HaGenericSwitchServerMultiBase = class extends FullBase {
155083
155088
  await super.initialize();
155084
155089
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
155085
155090
  const entityId = homeAssistant.entityId;
155086
- logger208.debug(`[${entityId}] GenericSwitch initialized (multi)`);
155091
+ logger209.debug(`[${entityId}] GenericSwitch initialized (multi)`);
155087
155092
  this.reactTo(homeAssistant.onChange, this.handleEventChange);
155088
155093
  }
155089
155094
  handleEventChange() {
@@ -155094,7 +155099,7 @@ var HaGenericSwitchServerMultiBase = class extends FullBase {
155094
155099
  const eventType = attrs.event_type;
155095
155100
  if (!eventType) return;
155096
155101
  const entityId = homeAssistant.entityId;
155097
- logger208.debug(`[${entityId}] Event fired: ${eventType}`);
155102
+ logger209.debug(`[${entityId}] Event fired: ${eventType}`);
155098
155103
  this.triggerPress(eventType);
155099
155104
  }
155100
155105
  triggerPress(eventType) {
@@ -155437,7 +155442,7 @@ init_nodejs();
155437
155442
  init_home_assistant_entity_behavior();
155438
155443
  var OperationalState4 = RvcOperationalState4.OperationalState;
155439
155444
  var ErrorState = RvcOperationalState4.ErrorState;
155440
- var logger209 = Logger.get("RvcOperationalStateServer");
155445
+ var logger210 = Logger.get("RvcOperationalStateServer");
155441
155446
  var activeStates = /* @__PURE__ */ new Set([
155442
155447
  OperationalState4.Running,
155443
155448
  OperationalState4.SeekingCharger
@@ -155489,7 +155494,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
155489
155494
  { force: true }
155490
155495
  );
155491
155496
  if (activeStates.has(previousState) && !activeStates.has(newState)) {
155492
- logger209.info(
155497
+ logger210.info(
155493
155498
  `Operation completed: ${OperationalState4[previousState]} -> ${OperationalState4[newState]}`
155494
155499
  );
155495
155500
  try {
@@ -155502,7 +155507,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
155502
155507
  this.context
155503
155508
  );
155504
155509
  } catch (e) {
155505
- logger209.debug("Failed to emit operationCompletion event:", e);
155510
+ logger210.debug("Failed to emit operationCompletion event:", e);
155506
155511
  }
155507
155512
  }
155508
155513
  }
@@ -155537,7 +155542,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
155537
155542
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
155538
155543
  homeAssistant.callAction(goHomeAction(void 0, this.agent));
155539
155544
  } else {
155540
- logger209.warn("GoHome command received but no goHome action configured");
155545
+ logger210.warn("GoHome command received but no goHome action configured");
155541
155546
  }
155542
155547
  return {
155543
155548
  commandResponseState: {
@@ -155557,7 +155562,7 @@ function RvcOperationalStateServer2(config11) {
155557
155562
  }
155558
155563
 
155559
155564
  // src/matter/endpoints/legacy/lawn-mower/behaviors/lawn-mower-rvc-operational-state-server.ts
155560
- var logger210 = Logger.get("LawnMowerRvcOperationalStateServer");
155565
+ var logger211 = Logger.get("LawnMowerRvcOperationalStateServer");
155561
155566
  function mapLawnMowerOperationalState(entity) {
155562
155567
  const state = entity.state;
155563
155568
  switch (state) {
@@ -155573,7 +155578,7 @@ function mapLawnMowerOperationalState(entity) {
155573
155578
  case "unavailable":
155574
155579
  return RvcOperationalState4.OperationalState.Error;
155575
155580
  default:
155576
- logger210.info(`Unknown lawn_mower state "${state}", treating as Stopped`);
155581
+ logger211.info(`Unknown lawn_mower state "${state}", treating as Stopped`);
155577
155582
  return RvcOperationalState4.OperationalState.Stopped;
155578
155583
  }
155579
155584
  }
@@ -155627,7 +155632,7 @@ function inferCleanedAreaProgress(cleanedSqm, orderedAreas) {
155627
155632
  }
155628
155633
 
155629
155634
  // src/matter/behaviors/rvc-run-mode-server.ts
155630
- var logger211 = Logger.get("RvcRunModeServer");
155635
+ var logger212 = Logger.get("RvcRunModeServer");
155631
155636
  var ROOM_MODE_BASE = 100;
155632
155637
  function isRoomMode(mode) {
155633
155638
  return mode >= ROOM_MODE_BASE;
@@ -155753,7 +155758,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
155753
155758
  const s = getSession(this.endpoint);
155754
155759
  if (s.loggedShortCircuits.has(reason)) return;
155755
155760
  s.loggedShortCircuits.add(reason);
155756
- logger211.info(message);
155761
+ logger212.info(message);
155757
155762
  }
155758
155763
  /**
155759
155764
  * Read the currentRoomEntity sensor and update currentArea + progress
@@ -155810,7 +155815,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
155810
155815
  }
155811
155816
  }
155812
155817
  if (matchedAreaId === null) {
155813
- logger211.info(
155818
+ logger212.info(
155814
155819
  `currentRoom sensor: no match for "${roomName}" (segmentId=${segmentId}), activeAreas=[${s.activeAreas.join(", ")}], supportedAreas=[${serviceArea.state.supportedAreas.map((a) => `${a.areaId}:${a.areaInfo.locationInfo?.locationName}`).join(", ")}]`
155815
155820
  );
155816
155821
  return;
@@ -155820,14 +155825,14 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
155820
155825
  s.completedAreas.add(s.lastCurrentArea);
155821
155826
  }
155822
155827
  s.lastCurrentArea = matchedAreaId;
155823
- logger211.info(
155828
+ logger212.info(
155824
155829
  `currentRoom sensor: transition to area ${matchedAreaId} ("${roomName}"), completed: [${[...s.completedAreas].join(", ")}]`
155825
155830
  );
155826
155831
  this.trySetCurrentArea(matchedAreaId);
155827
155832
  } catch (e) {
155828
155833
  const msg = e instanceof Error ? e.message : String(e);
155829
155834
  if (!msg.includes("No provider for") && !msg.includes("not supported")) {
155830
- logger211.warn(`currentRoom sensor update failed: ${msg}`);
155835
+ logger212.warn(`currentRoom sensor update failed: ${msg}`);
155831
155836
  }
155832
155837
  }
155833
155838
  }
@@ -155890,7 +155895,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
155890
155895
  cleaned,
155891
155896
  ordered
155892
155897
  );
155893
- logger211.debug(
155898
+ logger212.debug(
155894
155899
  `cleanedArea: raw=${raw} baseline=${s.cleanedAreaBaseline} cleaned=${cleaned} sizes=[${ordered.map((o) => `${o.areaId}:${o.sizeSqm}`).join(",")}] -> current=${currentArea} completed=[${completed.join(",")}]`
155895
155900
  );
155896
155901
  for (const id of completed) {
@@ -155904,7 +155909,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
155904
155909
  } catch (e) {
155905
155910
  const msg = e instanceof Error ? e.message : String(e);
155906
155911
  if (!msg.includes("No provider for") && !msg.includes("not supported")) {
155907
- logger211.warn(`cleanedArea room update failed: ${msg}`);
155912
+ logger212.warn(`cleanedArea room update failed: ${msg}`);
155908
155913
  }
155909
155914
  }
155910
155915
  }
@@ -155919,7 +155924,7 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
155919
155924
  const serviceArea = this.agent.get(ServiceAreaBehavior);
155920
155925
  if (serviceArea.state.currentArea !== areaId) {
155921
155926
  serviceArea.state.currentArea = areaId;
155922
- logger211.debug(`currentArea set to ${areaId}`);
155927
+ logger212.debug(`currentArea set to ${areaId}`);
155923
155928
  }
155924
155929
  this.updateProgress(serviceArea, areaId);
155925
155930
  } catch {
@@ -156196,7 +156201,7 @@ init_nodejs();
156196
156201
 
156197
156202
  // src/matter/behaviors/color-control-server.ts
156198
156203
  init_home_assistant_entity_behavior();
156199
- var logger212 = Logger.get("ColorControlServer");
156204
+ var logger213 = Logger.get("ColorControlServer");
156200
156205
  var optimisticColorState = /* @__PURE__ */ new Map();
156201
156206
  var OPTIMISTIC_TIMEOUT_MS3 = 3e3;
156202
156207
  var OPTIMISTIC_TOLERANCE2 = 5;
@@ -156235,7 +156240,7 @@ var ColorControlServerBase = class extends FeaturedBase7 {
156235
156240
  if (this.state.startUpColorTemperatureMireds == null) {
156236
156241
  this.state.startUpColorTemperatureMireds = defaultMireds;
156237
156242
  }
156238
- logger212.debug(
156243
+ logger213.debug(
156239
156244
  `initialize: set ColorTemperature defaults - min=${this.state.colorTempPhysicalMinMireds}, max=${this.state.colorTempPhysicalMaxMireds}, current=${this.state.colorTemperatureMireds}`
156240
156245
  );
156241
156246
  }
@@ -156736,7 +156741,7 @@ init_home_assistant_entity_behavior();
156736
156741
  // src/matter/behaviors/lock-server.ts
156737
156742
  init_esm();
156738
156743
  init_home_assistant_entity_behavior();
156739
- var logger213 = Logger.get("LockServer");
156744
+ var logger214 = Logger.get("LockServer");
156740
156745
  var SUPPORTED_SLOT = 1;
156741
156746
  function normalizeSupportedIndex(index) {
156742
156747
  if (index === 0 || index === SUPPORTED_SLOT) {
@@ -157007,7 +157012,7 @@ var LockServerWithPinBase = class extends PinCredentialBase {
157007
157012
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
157008
157013
  const action = this.state.config.lock(void 0, this.agent);
157009
157014
  const hasPinProvided = !!request.pinCode;
157010
- logger213.debug(
157015
+ logger214.debug(
157011
157016
  `lockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}`
157012
157017
  );
157013
157018
  if (request.pinCode) {
@@ -157020,12 +157025,12 @@ var LockServerWithPinBase = class extends PinCredentialBase {
157020
157025
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
157021
157026
  const action = this.state.config.unlock(void 0, this.agent);
157022
157027
  const hasPinProvided = !!request.pinCode;
157023
- logger213.debug(
157028
+ logger214.debug(
157024
157029
  `unlockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}`
157025
157030
  );
157026
157031
  if (this.state.requirePinForRemoteOperation) {
157027
157032
  if (!request.pinCode) {
157028
- logger213.info(
157033
+ logger214.info(
157029
157034
  `unlockDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
157030
157035
  );
157031
157036
  throw new StatusResponseError(
@@ -157035,12 +157040,12 @@ var LockServerWithPinBase = class extends PinCredentialBase {
157035
157040
  }
157036
157041
  const providedPin = new TextDecoder().decode(request.pinCode);
157037
157042
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
157038
- logger213.info(
157043
+ logger214.info(
157039
157044
  `unlockDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
157040
157045
  );
157041
157046
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
157042
157047
  }
157043
- logger213.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
157048
+ logger214.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
157044
157049
  action.data = { ...action.data, code: providedPin };
157045
157050
  }
157046
157051
  homeAssistant.callAction(action);
@@ -157173,7 +157178,7 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
157173
157178
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
157174
157179
  const action = this.state.config.lock(void 0, this.agent);
157175
157180
  const hasPinProvided = !!request.pinCode;
157176
- logger213.debug(
157181
+ logger214.debug(
157177
157182
  `lockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}`
157178
157183
  );
157179
157184
  if (request.pinCode) {
@@ -157187,12 +157192,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
157187
157192
  const unlatchConfig = this.state.config.unlatch;
157188
157193
  const action = unlatchConfig ? unlatchConfig(void 0, this.agent) : this.state.config.unlock(void 0, this.agent);
157189
157194
  const hasPinProvided = !!request.pinCode;
157190
- logger213.debug(
157195
+ logger214.debug(
157191
157196
  `unlockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}, usingUnlatch: ${!!unlatchConfig}`
157192
157197
  );
157193
157198
  if (this.state.requirePinForRemoteOperation) {
157194
157199
  if (!request.pinCode) {
157195
- logger213.info(
157200
+ logger214.info(
157196
157201
  `unlockDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
157197
157202
  );
157198
157203
  throw new StatusResponseError(
@@ -157202,12 +157207,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
157202
157207
  }
157203
157208
  const providedPin = new TextDecoder().decode(request.pinCode);
157204
157209
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
157205
- logger213.info(
157210
+ logger214.info(
157206
157211
  `unlockDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
157207
157212
  );
157208
157213
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
157209
157214
  }
157210
- logger213.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
157215
+ logger214.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
157211
157216
  action.data = { ...action.data, code: providedPin };
157212
157217
  }
157213
157218
  homeAssistant.callAction(action);
@@ -157222,12 +157227,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
157222
157227
  }
157223
157228
  const action = unlatchConfig(void 0, this.agent);
157224
157229
  const hasPinProvided = !!request.pinCode;
157225
- logger213.debug(
157230
+ logger214.debug(
157226
157231
  `unboltDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}`
157227
157232
  );
157228
157233
  if (this.state.requirePinForRemoteOperation) {
157229
157234
  if (!request.pinCode) {
157230
- logger213.info(
157235
+ logger214.info(
157231
157236
  `unboltDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
157232
157237
  );
157233
157238
  throw new StatusResponseError(
@@ -157237,12 +157242,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
157237
157242
  }
157238
157243
  const providedPin = new TextDecoder().decode(request.pinCode);
157239
157244
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
157240
- logger213.info(
157245
+ logger214.info(
157241
157246
  `unboltDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
157242
157247
  );
157243
157248
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
157244
157249
  }
157245
- logger213.debug(`unboltDoor PIN verified for ${homeAssistant.entityId}`);
157250
+ logger214.debug(`unboltDoor PIN verified for ${homeAssistant.entityId}`);
157246
157251
  action.data = { ...action.data, code: providedPin };
157247
157252
  }
157248
157253
  homeAssistant.callAction(action);
@@ -157374,7 +157379,7 @@ init_home_assistant_entity_behavior();
157374
157379
  init_dist();
157375
157380
  init_esm();
157376
157381
  init_home_assistant_entity_behavior();
157377
- var logger214 = Logger.get("MediaPlayerKeypadInputServer");
157382
+ var logger215 = Logger.get("MediaPlayerKeypadInputServer");
157378
157383
  var MediaPlayerKeypadInputServer = class extends KeypadInputServer {
157379
157384
  sendKey(request) {
157380
157385
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
@@ -157385,12 +157390,12 @@ var MediaPlayerKeypadInputServer = class extends KeypadInputServer {
157385
157390
  const features3 = attributes9.supported_features ?? 0;
157386
157391
  const action = this.mapKeyToAction(request.keyCode, features3);
157387
157392
  if (!action) {
157388
- logger214.debug(
157393
+ logger215.debug(
157389
157394
  `Unsupported key code ${request.keyCode} for ${homeAssistant.entityId}`
157390
157395
  );
157391
157396
  return { status: KeypadInput3.Status.UnsupportedKey };
157392
157397
  }
157393
- logger214.debug(
157398
+ logger215.debug(
157394
157399
  `sendKey(${request.keyCode}) \u2192 ${action} for ${homeAssistant.entityId}`
157395
157400
  );
157396
157401
  homeAssistant.callAction({ action });
@@ -157669,7 +157674,7 @@ init_home_assistant_entity_behavior();
157669
157674
  // src/matter/behaviors/speaker-level-control-server.ts
157670
157675
  init_esm();
157671
157676
  init_home_assistant_entity_behavior();
157672
- var logger215 = Logger.get("SpeakerLevelControlServer");
157677
+ var logger216 = Logger.get("SpeakerLevelControlServer");
157673
157678
  var optimisticLevelState2 = /* @__PURE__ */ new Map();
157674
157679
  var OPTIMISTIC_TIMEOUT_MS4 = 3e3;
157675
157680
  var OPTIMISTIC_TOLERANCE3 = 5;
@@ -157712,7 +157717,7 @@ var SpeakerLevelControlServerBase = class extends FeaturedBase8 {
157712
157717
  currentLevel = Math.min(Math.max(minLevel, currentLevel), maxLevel);
157713
157718
  }
157714
157719
  const entityId = this.agent.get(HomeAssistantEntityBehavior).entity.entity_id;
157715
- logger215.debug(
157720
+ logger216.debug(
157716
157721
  `[${entityId}] Volume update: HA=${currentLevelPercent != null ? Math.round(currentLevelPercent * 100) : "null"}% -> currentLevel=${currentLevel}`
157717
157722
  );
157718
157723
  const optimistic = optimisticLevelState2.get(entity.entity_id);
@@ -157760,7 +157765,7 @@ var SpeakerLevelControlServerBase = class extends FeaturedBase8 {
157760
157765
  const config11 = this.state.config;
157761
157766
  const entityId = homeAssistant.entity.entity_id;
157762
157767
  const levelPercent = level / 254;
157763
- logger215.debug(
157768
+ logger216.debug(
157764
157769
  `[${entityId}] Volume command: level=${level} -> HA volume_level=${levelPercent}`
157765
157770
  );
157766
157771
  const current = config11.getValuePercent(
@@ -159125,7 +159130,7 @@ var TvocConcentrationMeasurementServer = class extends TvocConcentrationMeasurem
159125
159130
  };
159126
159131
 
159127
159132
  // src/matter/endpoints/legacy/sensor/devices/tvoc-sensor.ts
159128
- var logger216 = Logger.get("TvocSensor");
159133
+ var logger217 = Logger.get("TvocSensor");
159129
159134
  function airQualityFromUgm3(value) {
159130
159135
  if (value <= 300) return AirQuality3.AirQualityEnum.Good;
159131
159136
  if (value <= 1e3) return AirQuality3.AirQualityEnum.Fair;
@@ -159166,17 +159171,17 @@ var TvocAirQualityServer = class extends TvocAirQualityServerBase {
159166
159171
  const attributes9 = entity.state.attributes;
159167
159172
  const deviceClass = attributes9.device_class;
159168
159173
  let airQuality = AirQuality3.AirQualityEnum.Unknown;
159169
- logger216.debug(
159174
+ logger217.debug(
159170
159175
  `[${entity.entity_id}] TVOC update: state="${state}", device_class="${deviceClass}"`
159171
159176
  );
159172
159177
  if (state != null && !Number.isNaN(+state)) {
159173
159178
  const value = +state;
159174
159179
  airQuality = deviceClass === SensorDeviceClass.volatile_organic_compounds ? airQualityFromUgm3(value) : airQualityFromPpb(value);
159175
- logger216.debug(
159180
+ logger217.debug(
159176
159181
  `[${entity.entity_id}] TVOC value=${value} (${deviceClass}) -> airQuality=${AirQuality3.AirQualityEnum[airQuality]}`
159177
159182
  );
159178
159183
  } else {
159179
- logger216.warn(
159184
+ logger217.warn(
159180
159185
  `[${entity.entity_id}] TVOC state not a valid number: "${state}"`
159181
159186
  );
159182
159187
  }
@@ -159390,7 +159395,7 @@ init_home_assistant_entity_behavior();
159390
159395
  // src/matter/behaviors/pm25-concentration-measurement-server.ts
159391
159396
  init_esm();
159392
159397
  init_home_assistant_entity_behavior();
159393
- var logger217 = Logger.get("Pm25ConcentrationMeasurementServer");
159398
+ var logger218 = Logger.get("Pm25ConcentrationMeasurementServer");
159394
159399
  var Pm25ConcentrationMeasurementServerBase = Pm25ConcentrationMeasurementServer.with(
159395
159400
  ConcentrationMeasurement3.Feature.NumericMeasurement
159396
159401
  );
@@ -159414,11 +159419,11 @@ var Pm25ConcentrationMeasurementServer2 = class extends Pm25ConcentrationMeasure
159414
159419
  if (this.state.measurementMedium === void 0) {
159415
159420
  this.state.measurementMedium = ConcentrationMeasurement3.MeasurementMedium.Air;
159416
159421
  }
159417
- logger217.debug(
159422
+ logger218.debug(
159418
159423
  "Pm25ConcentrationMeasurementServer: before super.initialize()"
159419
159424
  );
159420
159425
  await super.initialize();
159421
- logger217.debug(
159426
+ logger218.debug(
159422
159427
  "Pm25ConcentrationMeasurementServer: after super.initialize()"
159423
159428
  );
159424
159429
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
@@ -159441,7 +159446,7 @@ var Pm25ConcentrationMeasurementServer2 = class extends Pm25ConcentrationMeasure
159441
159446
  };
159442
159447
 
159443
159448
  // src/matter/endpoints/legacy/sensor/devices/pm25-sensor.ts
159444
- var logger218 = Logger.get("Pm25AirQualityServer");
159449
+ var logger219 = Logger.get("Pm25AirQualityServer");
159445
159450
  var Pm25AirQualityServerBase = AirQualityServer.with(
159446
159451
  AirQuality3.Feature.Fair,
159447
159452
  AirQuality3.Feature.Moderate,
@@ -159453,9 +159458,9 @@ var Pm25AirQualityServer = class extends Pm25AirQualityServerBase {
159453
159458
  if (this.state.airQuality === void 0) {
159454
159459
  this.state.airQuality = AirQuality3.AirQualityEnum.Unknown;
159455
159460
  }
159456
- logger218.debug("Pm25AirQualityServer: before super.initialize()");
159461
+ logger219.debug("Pm25AirQualityServer: before super.initialize()");
159457
159462
  await super.initialize();
159458
- logger218.debug("Pm25AirQualityServer: after super.initialize()");
159463
+ logger219.debug("Pm25AirQualityServer: after super.initialize()");
159459
159464
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
159460
159465
  this.update(homeAssistant.entity);
159461
159466
  this.reactTo(homeAssistant.onChange, this.update, { offline: true });
@@ -159861,7 +159866,7 @@ init_home_assistant_entity_behavior();
159861
159866
  init_dist();
159862
159867
  init_esm();
159863
159868
  init_home_assistant_entity_behavior();
159864
- var logger219 = Logger.get("VacuumIdentifyServer");
159869
+ var logger220 = Logger.get("VacuumIdentifyServer");
159865
159870
  var IDENTIFY_BUTTON_SUFFIXES = ["_identify", "_locate", "_find_me"];
159866
159871
  var VacuumIdentifyServer = class extends IdentifyServer2 {
159867
159872
  triggerEffect(effect) {
@@ -159878,19 +159883,19 @@ var VacuumIdentifyServer = class extends IdentifyServer2 {
159878
159883
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
159879
159884
  const features3 = homeAssistant.entity.state.attributes.supported_features ?? 0;
159880
159885
  if (testBit(features3, VacuumDeviceFeature.LOCATE)) {
159881
- logger219.info(`${source} \u2192 vacuum.locate for ${homeAssistant.entityId}`);
159886
+ logger220.info(`${source} \u2192 vacuum.locate for ${homeAssistant.entityId}`);
159882
159887
  homeAssistant.callAction({ action: "vacuum.locate" });
159883
159888
  return;
159884
159889
  }
159885
159890
  const sibling = this.#findIdentifyButton(homeAssistant);
159886
159891
  if (sibling) {
159887
- logger219.info(
159892
+ logger220.info(
159888
159893
  `${source} \u2192 button.press ${sibling} for ${homeAssistant.entityId}`
159889
159894
  );
159890
159895
  homeAssistant.callAction({ action: "button.press", target: sibling });
159891
159896
  return;
159892
159897
  }
159893
- logger219.warn(
159898
+ logger220.warn(
159894
159899
  `${source} for ${homeAssistant.entityId}, LOCATE not in supported_features (${features3}), trying vacuum.locate anyway`
159895
159900
  );
159896
159901
  homeAssistant.callAction({ action: "vacuum.locate" });
@@ -160089,14 +160094,14 @@ init_esm();
160089
160094
 
160090
160095
  // src/matter/behaviors/service-area-server.ts
160091
160096
  init_esm();
160092
- var logger220 = Logger.get("ServiceAreaServer");
160097
+ var logger221 = Logger.get("ServiceAreaServer");
160093
160098
  var ServiceAreaWithProgress = ServiceAreaBehavior.with(
160094
160099
  ServiceArea3.Feature.ProgressReporting
160095
160100
  );
160096
160101
  var ServiceAreaServerBase = class extends ServiceAreaWithProgress {
160097
160102
  selectAreas(request) {
160098
160103
  const { newAreas } = request;
160099
- logger220.info(
160104
+ logger221.info(
160100
160105
  `ServiceArea selectAreas called with: ${JSON.stringify(newAreas)}`
160101
160106
  );
160102
160107
  const uniqueAreas = [...new Set(newAreas)];
@@ -160105,7 +160110,7 @@ var ServiceAreaServerBase = class extends ServiceAreaWithProgress {
160105
160110
  (id) => !supportedAreaIds.includes(id)
160106
160111
  );
160107
160112
  if (invalidAreas.length > 0) {
160108
- logger220.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
160113
+ logger221.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
160109
160114
  return {
160110
160115
  status: ServiceArea3.SelectAreasStatus.UnsupportedArea,
160111
160116
  statusText: `Invalid area IDs: ${invalidAreas.join(", ")}`
@@ -160117,7 +160122,7 @@ var ServiceAreaServerBase = class extends ServiceAreaWithProgress {
160117
160122
  status: ServiceArea3.OperationalStatus.Pending
160118
160123
  }));
160119
160124
  this.state.currentArea = null;
160120
- logger220.info(
160125
+ logger221.info(
160121
160126
  `ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
160122
160127
  );
160123
160128
  return {
@@ -160138,7 +160143,7 @@ var ServiceAreaServerBase = class extends ServiceAreaWithProgress {
160138
160143
  ServiceAreaServerBase2.State = State;
160139
160144
  })(ServiceAreaServerBase || (ServiceAreaServerBase = {}));
160140
160145
  function ServiceAreaServer2(initialState) {
160141
- logger220.info(
160146
+ logger221.info(
160142
160147
  `Creating ServiceAreaServer with ${initialState.supportedAreas.length} areas`
160143
160148
  );
160144
160149
  return ServiceAreaServerBase.set({
@@ -160155,7 +160160,7 @@ var ServiceAreaWithMapsAndProgress = ServiceAreaBehavior.with(
160155
160160
  var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMapsAndProgress {
160156
160161
  selectAreas(request) {
160157
160162
  const { newAreas } = request;
160158
- logger220.info(
160163
+ logger221.info(
160159
160164
  `ServiceArea selectAreas called with: ${JSON.stringify(newAreas)}`
160160
160165
  );
160161
160166
  const uniqueAreas = [...new Set(newAreas)];
@@ -160164,7 +160169,7 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMapsAndProgress
160164
160169
  (id) => !supportedAreaIds.includes(id)
160165
160170
  );
160166
160171
  if (invalidAreas.length > 0) {
160167
- logger220.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
160172
+ logger221.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
160168
160173
  return {
160169
160174
  status: ServiceArea3.SelectAreasStatus.UnsupportedArea,
160170
160175
  statusText: `Invalid area IDs: ${invalidAreas.join(", ")}`
@@ -160176,7 +160181,7 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMapsAndProgress
160176
160181
  status: ServiceArea3.OperationalStatus.Pending
160177
160182
  }));
160178
160183
  this.state.currentArea = null;
160179
- logger220.info(
160184
+ logger221.info(
160180
160185
  `ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
160181
160186
  );
160182
160187
  return {
@@ -160197,14 +160202,14 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMapsAndProgress
160197
160202
  ServiceAreaServerWithMapsBase2.State = State;
160198
160203
  })(ServiceAreaServerWithMapsBase || (ServiceAreaServerWithMapsBase = {}));
160199
160204
  function ServiceAreaServerWithMaps(initialState) {
160200
- logger220.info(
160205
+ logger221.info(
160201
160206
  `Creating ServiceAreaServer with Maps: ${initialState.supportedAreas.length} areas, ${initialState.supportedMaps.length} maps`
160202
160207
  );
160203
160208
  for (const map of initialState.supportedMaps) {
160204
160209
  const areaCount = initialState.supportedAreas.filter(
160205
160210
  (a) => a.mapId === map.mapId
160206
160211
  ).length;
160207
- logger220.info(` Map ${map.mapId}: "${map.name}" (${areaCount} areas)`);
160212
+ logger221.info(` Map ${map.mapId}: "${map.name}" (${areaCount} areas)`);
160208
160213
  }
160209
160214
  return ServiceAreaServerWithMapsBase.set({
160210
160215
  supportedAreas: initialState.supportedAreas,
@@ -160216,7 +160221,7 @@ function ServiceAreaServerWithMaps(initialState) {
160216
160221
  }
160217
160222
 
160218
160223
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-service-area-server.ts
160219
- var logger221 = Logger.get("VacuumServiceAreaServer");
160224
+ var logger222 = Logger.get("VacuumServiceAreaServer");
160220
160225
  function toAreaId(roomId) {
160221
160226
  if (typeof roomId === "number") {
160222
160227
  return roomId;
@@ -160295,13 +160300,13 @@ function createVacuumServiceAreaServer(attributes9, roomEntities, includeUnnamed
160295
160300
  let rooms;
160296
160301
  if (roomEntities && roomEntities.length > 0) {
160297
160302
  rooms = buttonEntitiesToRooms(roomEntities, attributes9);
160298
- logger221.info(
160303
+ logger222.info(
160299
160304
  `Using ${rooms.length} button entities as rooms: ${rooms.map((r) => r.name).join(", ")}`
160300
160305
  );
160301
160306
  } else {
160302
160307
  rooms = parseVacuumRooms(attributes9, includeUnnamedRooms);
160303
160308
  if (rooms.length > 0) {
160304
- logger221.info(
160309
+ logger222.info(
160305
160310
  `Using ${rooms.length} rooms from attributes: ${rooms.map((r) => r.name).join(", ")}`
160306
160311
  );
160307
160312
  }
@@ -160355,7 +160360,7 @@ function createCustomServiceAreaServer(customAreas) {
160355
160360
  landmarkInfo: null
160356
160361
  }
160357
160362
  }));
160358
- logger221.info(
160363
+ logger222.info(
160359
160364
  `Using ${customAreas.length} custom service areas: ${customAreas.map((a) => a.name).join(", ")}`
160360
160365
  );
160361
160366
  return ServiceAreaServer2({
@@ -160377,7 +160382,7 @@ function createCleanAreaServiceAreaServer(cleanAreaRooms) {
160377
160382
  landmarkInfo: null
160378
160383
  }
160379
160384
  }));
160380
- logger221.info(
160385
+ logger222.info(
160381
160386
  `Using ${cleanAreaRooms.length} HA areas via CLEAN_AREA: ${cleanAreaRooms.map((r) => r.name).join(", ")}`
160382
160387
  );
160383
160388
  return ServiceAreaServer2({
@@ -160388,11 +160393,11 @@ function createCleanAreaServiceAreaServer(cleanAreaRooms) {
160388
160393
  }
160389
160394
 
160390
160395
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-run-mode-server.ts
160391
- var logger222 = Logger.get("VacuumRvcRunModeServer");
160396
+ var logger223 = Logger.get("VacuumRvcRunModeServer");
160392
160397
  function buildValetudoSegmentAction(vacuumEntityId, segmentIds, valetudoIdentifier) {
160393
160398
  const identifier = valetudoIdentifier || vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
160394
160399
  const topic = `valetudo/${identifier}/MapSegmentationCapability/clean/set`;
160395
- logger222.info(
160400
+ logger223.info(
160396
160401
  `Valetudo: mqtt.publish to ${topic}, segments: ${segmentIds.join(", ")}`
160397
160402
  );
160398
160403
  return {
@@ -160497,14 +160502,14 @@ function mergeBatchData(areas) {
160497
160502
  function handleCustomServiceAreas(selectedAreas, customAreas, session) {
160498
160503
  const matched = selectedAreas.map((areaId) => ({ areaId, area: customAreas[areaId - 1] })).filter((m) => !!m.area);
160499
160504
  if (matched.length === 0) {
160500
- logger222.warn(
160505
+ logger223.warn(
160501
160506
  `Custom service areas: no match for selected IDs ${selectedAreas.join(", ")}`
160502
160507
  );
160503
160508
  return { action: "vacuum.start" };
160504
160509
  }
160505
160510
  const batchArea = matched.find(({ area }) => area.batchDispatch === true);
160506
160511
  if (batchArea) {
160507
- logger222.info(
160512
+ logger223.info(
160508
160513
  `Custom service areas (batch): single call for ${matched.length} room(s): ${matched.map(({ area }) => area.name).join(", ")}`
160509
160514
  );
160510
160515
  session.pendingDispatches = [];
@@ -160525,7 +160530,7 @@ function handleCustomServiceAreas(selectedAreas, customAreas, session) {
160525
160530
  }
160526
160531
  };
160527
160532
  }
160528
- logger222.info(
160533
+ logger223.info(
160529
160534
  `Custom service areas: ${matched.length} room(s) queued: ${matched.map(({ area }) => `${area.service} (${area.name})`).join(", ")}`
160530
160535
  );
160531
160536
  session.pendingDispatches = matched.slice(1).map(({ areaId, area }) => ({
@@ -160561,7 +160566,7 @@ var vacuumRvcRunModeConfig = {
160561
160566
  VacuumState.paused
160562
160567
  ];
160563
160568
  const isCleaning = cleaningStates.includes(state);
160564
- logger222.debug(
160569
+ logger223.debug(
160565
160570
  `Vacuum state: "${state}", isCleaning: ${isCleaning}, currentMode: ${isCleaning ? "Cleaning" : "Idle"}`
160566
160571
  );
160567
160572
  return isCleaning ? 1 /* Cleaning */ : 0 /* Idle */;
@@ -160595,7 +160600,7 @@ var vacuumRvcRunModeConfig = {
160595
160600
  if (cleanAreaRooms && cleanAreaRooms.length > 0) {
160596
160601
  const haAreaIds = resolveCleanAreaIds(selectedAreas, cleanAreaRooms);
160597
160602
  if (haAreaIds.length > 0) {
160598
- logger222.info(
160603
+ logger223.info(
160599
160604
  `CLEAN_AREA: cleaning HA areas: ${haAreaIds.join(", ")}`
160600
160605
  );
160601
160606
  return {
@@ -160614,7 +160619,7 @@ var vacuumRvcRunModeConfig = {
160614
160619
  }
160615
160620
  }
160616
160621
  if (matched.length > 0) {
160617
- logger222.info(
160622
+ logger223.info(
160618
160623
  `Roborock: ${matched.length} room button(s) queued: ${matched.map((m) => m.entityId).join(", ")}`
160619
160624
  );
160620
160625
  session.pendingDispatches = matched.slice(1).map(({ areaId, entityId }) => ({
@@ -160648,14 +160653,14 @@ var vacuumRvcRunModeConfig = {
160648
160653
  }
160649
160654
  }
160650
160655
  if (roomIds.length > 0) {
160651
- logger222.info(
160656
+ logger223.info(
160652
160657
  `Starting cleaning with selected areas: ${roomIds.join(", ")}`
160653
160658
  );
160654
160659
  if (isDreameVacuum(attributes9)) {
160655
160660
  if (targetMapName) {
160656
160661
  const vacName = vacuumEntityId.replace("vacuum.", "");
160657
160662
  const selectedMapEntity = `select.${vacName}_selected_map`;
160658
- logger222.info(
160663
+ logger223.info(
160659
160664
  `Dreame multi-floor: switching to map "${targetMapName}" via ${selectedMapEntity}`
160660
160665
  );
160661
160666
  homeAssistant.callAction({
@@ -160682,7 +160687,7 @@ var vacuumRvcRunModeConfig = {
160682
160687
  }
160683
160688
  if (isEcovacsVacuum(attributes9)) {
160684
160689
  const roomIdStr = roomIds.join(",");
160685
- logger222.info(
160690
+ logger223.info(
160686
160691
  `Ecovacs vacuum: Using spot_area for rooms: ${roomIdStr}`
160687
160692
  );
160688
160693
  return {
@@ -160697,14 +160702,14 @@ var vacuumRvcRunModeConfig = {
160697
160702
  }
160698
160703
  };
160699
160704
  }
160700
- logger222.warn(
160705
+ logger223.warn(
160701
160706
  `Room cleaning via send_command not supported for this vacuum type. Rooms: ${roomIds.join(", ")}. Falling back to vacuum.start`
160702
160707
  );
160703
160708
  }
160704
160709
  }
160705
160710
  } catch {
160706
160711
  }
160707
- logger222.info("Starting regular cleaning (no areas selected)");
160712
+ logger223.info("Starting regular cleaning (no areas selected)");
160708
160713
  return { action: "vacuum.start" };
160709
160714
  },
160710
160715
  returnToBase: () => ({ action: "vacuum.return_to_base" }),
@@ -160719,7 +160724,7 @@ var vacuumRvcRunModeConfig = {
160719
160724
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
160720
160725
  const entity = homeAssistant.entity;
160721
160726
  const attributes9 = entity.state.attributes;
160722
- logger222.info(`cleanRoom called: roomMode=${roomMode}`);
160727
+ logger223.info(`cleanRoom called: roomMode=${roomMode}`);
160723
160728
  const cleanAreaRooms = homeAssistant.state.mapping?.cleanAreaRooms;
160724
160729
  if (cleanAreaRooms && cleanAreaRooms.length > 0) {
160725
160730
  const sorted = [...cleanAreaRooms].sort(
@@ -160728,7 +160733,7 @@ var vacuumRvcRunModeConfig = {
160728
160733
  const areaIndex = roomMode - ROOM_MODE_BASE2 - 1;
160729
160734
  if (areaIndex >= 0 && areaIndex < sorted.length) {
160730
160735
  const area = sorted[areaIndex];
160731
- logger222.info(
160736
+ logger223.info(
160732
160737
  `cleanRoom: CLEAN_AREA "${area.name}" \u2192 vacuum.clean_area(${area.haAreaId})`
160733
160738
  );
160734
160739
  return {
@@ -160745,7 +160750,7 @@ var vacuumRvcRunModeConfig = {
160745
160750
  const areaIndex = roomMode - ROOM_MODE_BASE2 - 1;
160746
160751
  if (areaIndex >= 0 && areaIndex < sorted.length) {
160747
160752
  const area = sorted[areaIndex];
160748
- logger222.info(
160753
+ logger223.info(
160749
160754
  `cleanRoom: custom service area "${area.name}" \u2192 ${area.service}`
160750
160755
  );
160751
160756
  return {
@@ -160766,7 +160771,7 @@ var vacuumRvcRunModeConfig = {
160766
160771
  }
160767
160772
  const rooms = parseVacuumRooms(attributes9);
160768
160773
  const numericIdFromMode = getRoomIdFromMode(roomMode);
160769
- logger222.info(
160774
+ logger223.info(
160770
160775
  `cleanRoom: numericIdFromMode=${numericIdFromMode}, available rooms: ${JSON.stringify(rooms.map((r) => ({ id: r.id, name: r.name, modeValue: getRoomModeValue(r) })))}`
160771
160776
  );
160772
160777
  const room = rooms.find((r) => getRoomModeValue(r) === roomMode);
@@ -160776,7 +160781,7 @@ var vacuumRvcRunModeConfig = {
160776
160781
  if (room.mapName) {
160777
160782
  const vacuumName = vacuumEntityId.replace("vacuum.", "");
160778
160783
  const selectedMapEntity = `select.${vacuumName}_selected_map`;
160779
- logger222.info(
160784
+ logger223.info(
160780
160785
  `Dreame multi-floor: switching to map "${room.mapName}" via ${selectedMapEntity}`
160781
160786
  );
160782
160787
  homeAssistant.callAction({
@@ -160785,7 +160790,7 @@ var vacuumRvcRunModeConfig = {
160785
160790
  data: { option: room.mapName }
160786
160791
  });
160787
160792
  }
160788
- logger222.debug(
160793
+ logger223.debug(
160789
160794
  `Dreame vacuum detected, using dreame_vacuum.vacuum_clean_segment for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
160790
160795
  );
160791
160796
  return {
@@ -160796,7 +160801,7 @@ var vacuumRvcRunModeConfig = {
160796
160801
  };
160797
160802
  }
160798
160803
  if (isRoborockVacuum(attributes9) || isXiaomiMiotVacuum(attributes9)) {
160799
- logger222.debug(
160804
+ logger223.debug(
160800
160805
  `Using vacuum.send_command with app_segment_clean for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
160801
160806
  );
160802
160807
  return {
@@ -160809,7 +160814,7 @@ var vacuumRvcRunModeConfig = {
160809
160814
  }
160810
160815
  if (isEcovacsVacuum(attributes9)) {
160811
160816
  const roomIdStr = String(commandId3);
160812
- logger222.info(
160817
+ logger223.info(
160813
160818
  `Ecovacs vacuum: Using spot_area for room ${room.name} (id: ${roomIdStr})`
160814
160819
  );
160815
160820
  return {
@@ -160824,7 +160829,7 @@ var vacuumRvcRunModeConfig = {
160824
160829
  }
160825
160830
  };
160826
160831
  }
160827
- logger222.warn(
160832
+ logger223.warn(
160828
160833
  `Room cleaning via send_command not supported for this vacuum type. Room: ${room.name} (id=${commandId3}). Falling back to vacuum.start`
160829
160834
  );
160830
160835
  }
@@ -160841,20 +160846,20 @@ function createVacuumRvcRunModeServer(attributes9, includeUnnamedRooms = false,
160841
160846
  customAreas,
160842
160847
  disableRoomModes
160843
160848
  );
160844
- logger222.info(
160849
+ logger223.info(
160845
160850
  `Creating VacuumRvcRunModeServer with ${rooms.length} rooms, ${supportedModes2.length} total modes`
160846
160851
  );
160847
160852
  if (rooms.length > 0) {
160848
- logger222.info(`Rooms found: ${rooms.map((r) => r.name).join(", ")}`);
160853
+ logger223.info(`Rooms found: ${rooms.map((r) => r.name).join(", ")}`);
160849
160854
  }
160850
160855
  if (filteredCount > 0) {
160851
160856
  const filtered = allRooms.filter((r) => !rooms.some((x) => x.id === r.id));
160852
- logger222.info(
160857
+ logger223.info(
160853
160858
  `Filtered out ${filteredCount} unnamed room(s): ${filtered.map((r) => r.name).join(", ")}`
160854
160859
  );
160855
160860
  }
160856
160861
  if (allRooms.length === 0) {
160857
- logger222.debug(
160862
+ logger223.debug(
160858
160863
  `No rooms found. Attributes: rooms=${JSON.stringify(attributes9.rooms)}, segments=${JSON.stringify(attributes9.segments)}, room_list=${attributes9.room_list}`
160859
160864
  );
160860
160865
  }
@@ -160888,7 +160893,7 @@ function createCleanAreaRvcRunModeServer(cleanAreaRooms) {
160888
160893
  modeTags: [{ value: RvcRunMode3.ModeTag.Cleaning }]
160889
160894
  });
160890
160895
  }
160891
- logger222.info(
160896
+ logger223.info(
160892
160897
  `Creating CLEAN_AREA RvcRunModeServer with ${cleanAreaRooms.length} HA areas, ${modes.length} total modes`
160893
160898
  );
160894
160899
  return RvcRunModeServer2(vacuumRvcRunModeConfig, {
@@ -160975,7 +160980,7 @@ init_nodejs();
160975
160980
 
160976
160981
  // src/matter/behaviors/rvc-clean-mode-server.ts
160977
160982
  init_home_assistant_entity_behavior();
160978
- var logger223 = Logger.get("RvcCleanModeServerBase");
160983
+ var logger224 = Logger.get("RvcCleanModeServerBase");
160979
160984
  var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeServer {
160980
160985
  // Pending mode from a recent changeToMode command.
160981
160986
  // Prevents stale HA state (from a different entity like select.xxx)
@@ -161022,14 +161027,14 @@ var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeS
161022
161027
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
161023
161028
  const { newMode } = request;
161024
161029
  if (newMode !== this.state.currentMode && !this.state.supportedModes.some((m) => m.mode === newMode)) {
161025
- logger223.warn(`changeToMode(${newMode}) rejected: unsupported mode`);
161030
+ logger224.warn(`changeToMode(${newMode}) rejected: unsupported mode`);
161026
161031
  return {
161027
161032
  status: ModeBase3.ModeChangeStatus.UnsupportedMode,
161028
161033
  statusText: `Unsupported mode: ${newMode}`
161029
161034
  };
161030
161035
  }
161031
161036
  const modeLabel = this.state.supportedModes.find((m) => m.mode === newMode);
161032
- logger223.info(
161037
+ logger224.info(
161033
161038
  `changeToMode(${newMode}) "${modeLabel?.label ?? "unknown"}" for ${homeAssistant.entityId}`
161034
161039
  );
161035
161040
  this.pendingMode = newMode;
@@ -161037,7 +161042,7 @@ var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeS
161037
161042
  this.state.currentMode = newMode;
161038
161043
  const action = this.state.config.setCleanMode(newMode, this.agent);
161039
161044
  if (action) {
161040
- logger223.info(
161045
+ logger224.info(
161041
161046
  `changeToMode: dispatching action ${action.action} \u2192 ${action.target ?? homeAssistant.entityId}`
161042
161047
  );
161043
161048
  homeAssistant.callAction(action);
@@ -161070,7 +161075,7 @@ function RvcCleanModeServer2(config11, initialState) {
161070
161075
  }
161071
161076
 
161072
161077
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-clean-mode-server.ts
161073
- var logger224 = Logger.get("VacuumRvcCleanModeServer");
161078
+ var logger225 = Logger.get("VacuumRvcCleanModeServer");
161074
161079
  var MODE_VACUUM = 0;
161075
161080
  var MODE_VACUUM_AND_MOP = 1;
161076
161081
  var MODE_MOP = 2;
@@ -161340,7 +161345,7 @@ function findMatchingCleanOption(ct, availableOptions) {
161340
161345
  const match = availableOptions.find((o) => classifyCleanOption(o) === type);
161341
161346
  if (match) return match;
161342
161347
  }
161343
- logger224.warn(
161348
+ logger225.warn(
161344
161349
  `No match for ${CLEAN_TYPE_LABELS[ct]} in [${availableOptions.join(", ")}]`
161345
161350
  );
161346
161351
  return availableOptions[0];
@@ -161349,7 +161354,7 @@ function buildCleaningModeAction(targetCleanType, agent) {
161349
161354
  const selectEntityId = getCleaningModeSelectEntity(agent);
161350
161355
  const { options } = readSelectEntity(selectEntityId, agent);
161351
161356
  const optionToUse = findMatchingCleanOption(targetCleanType, options);
161352
- logger224.info(
161357
+ logger225.info(
161353
161358
  `Switching cleaning mode to: ${optionToUse} via ${selectEntityId}`
161354
161359
  );
161355
161360
  return {
@@ -161438,7 +161443,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161438
161443
  }
161439
161444
  }
161440
161445
  if (speedMode !== void 0) {
161441
- logger224.debug(
161446
+ logger225.debug(
161442
161447
  `Current mode: Vacuum + fan_speed="${speedState}" -> mode ${speedMode}`
161443
161448
  );
161444
161449
  return speedMode;
@@ -161459,7 +161464,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161459
161464
  }
161460
161465
  }
161461
161466
  if (mopMode !== void 0) {
161462
- logger224.debug(
161467
+ logger225.debug(
161463
161468
  `Current mode: Mop + intensity="${state}" -> mode ${mopMode}`
161464
161469
  );
161465
161470
  return mopMode;
@@ -161477,14 +161482,14 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161477
161482
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
161478
161483
  const vacuumEntityId = homeAssistant.entityId;
161479
161484
  const mapping = homeAssistant.state.mapping;
161480
- logger224.info(
161485
+ logger225.info(
161481
161486
  `setCleanMode(${mode}) for ${vacuumEntityId}, suctionEntity=${mapping?.suctionLevelEntity ?? "none"}, mopEntity=${mapping?.mopIntensityEntity ?? "none"}, fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])}, customTags=${JSON.stringify(customFanSpeedTags ?? {})}`
161482
161487
  );
161483
161488
  if (mopIntensityList && mopIntensityList.length > 0 && isMopIntensityMode(mode)) {
161484
161489
  const mopIndex = mode - MOP_INTENSITY_MODE_BASE;
161485
161490
  const mopName = mopIntensityList[mopIndex];
161486
161491
  if (!mopName) {
161487
- logger224.warn(`Invalid mop intensity mode index: ${mopIndex}`);
161492
+ logger225.warn(`Invalid mop intensity mode index: ${mopIndex}`);
161488
161493
  return void 0;
161489
161494
  }
161490
161495
  if (hasCleanTypes) {
@@ -161497,18 +161502,18 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161497
161502
  mapping.mopIntensityEntity,
161498
161503
  agent
161499
161504
  );
161500
- logger224.info(
161505
+ logger225.info(
161501
161506
  `Mop intensity entity ${mapping.mopIntensityEntity}: current="${state}", options=${JSON.stringify(options ?? [])}`
161502
161507
  );
161503
161508
  let option = matchMopIntensityOption(mopName, options);
161504
161509
  if (!option && options && mopIndex < options.length) {
161505
161510
  option = options[mopIndex];
161506
- logger224.info(
161511
+ logger225.info(
161507
161512
  `Positional match for mop "${mopName}" -> "${option}" (index ${mopIndex})`
161508
161513
  );
161509
161514
  }
161510
161515
  if (option) {
161511
- logger224.info(
161516
+ logger225.info(
161512
161517
  `Setting mop intensity to: ${option} via ${mapping.mopIntensityEntity}`
161513
161518
  );
161514
161519
  return {
@@ -161517,11 +161522,11 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161517
161522
  target: mapping.mopIntensityEntity
161518
161523
  };
161519
161524
  }
161520
- logger224.warn(
161525
+ logger225.warn(
161521
161526
  `No match for mop intensity "${mopName}" in options: [${(options ?? []).join(", ")}]`
161522
161527
  );
161523
161528
  } else {
161524
- logger224.warn(
161529
+ logger225.warn(
161525
161530
  `Mop intensity mode ${mode} requested but no mopIntensityEntity configured`
161526
161531
  );
161527
161532
  }
@@ -161531,7 +161536,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161531
161536
  const fanSpeedIndex = mode - FAN_SPEED_MODE_BASE;
161532
161537
  const fanSpeedName = fanSpeedList[fanSpeedIndex];
161533
161538
  if (!fanSpeedName) {
161534
- logger224.warn(`Invalid fan speed mode index: ${fanSpeedIndex}`);
161539
+ logger225.warn(`Invalid fan speed mode index: ${fanSpeedIndex}`);
161535
161540
  return void 0;
161536
161541
  }
161537
161542
  if (mapping?.suctionLevelEntity) {
@@ -161544,7 +161549,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161544
161549
  mapping.suctionLevelEntity,
161545
161550
  agent
161546
161551
  );
161547
- logger224.info(
161552
+ logger225.info(
161548
161553
  `Suction entity ${mapping.suctionLevelEntity}: current="${state}", options=${JSON.stringify(options ?? [])}`
161549
161554
  );
161550
161555
  let option = matchFanSpeedOption(
@@ -161554,12 +161559,12 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161554
161559
  );
161555
161560
  if (!option && options && fanSpeedIndex < options.length) {
161556
161561
  option = options[fanSpeedIndex];
161557
- logger224.info(
161562
+ logger225.info(
161558
161563
  `Positional match for fan "${fanSpeedName}" -> "${option}" (index ${fanSpeedIndex})`
161559
161564
  );
161560
161565
  }
161561
161566
  if (option) {
161562
- logger224.info(
161567
+ logger225.info(
161563
161568
  `Setting suction to: ${option} via ${mapping.suctionLevelEntity}`
161564
161569
  );
161565
161570
  return {
@@ -161568,7 +161573,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161568
161573
  target: mapping.suctionLevelEntity
161569
161574
  };
161570
161575
  }
161571
- logger224.warn(
161576
+ logger225.warn(
161572
161577
  `No match for fan speed "${fanSpeedName}" in suction options: [${(options ?? []).join(", ")}]`
161573
161578
  );
161574
161579
  return void 0;
@@ -161578,7 +161583,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161578
161583
  buildCleaningModeAction(0 /* Sweeping */, agent)
161579
161584
  );
161580
161585
  }
161581
- logger224.info(
161586
+ logger225.info(
161582
161587
  `Setting fan speed to: ${fanSpeedName} via vacuum.set_fan_speed`
161583
161588
  );
161584
161589
  return {
@@ -161588,7 +161593,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161588
161593
  };
161589
161594
  }
161590
161595
  if (!hasCleanTypes) {
161591
- logger224.debug(
161596
+ logger225.debug(
161592
161597
  `Ignoring cleaning type change (mode=${mode}): no cleaning mode entity`
161593
161598
  );
161594
161599
  return void 0;
@@ -161600,7 +161605,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
161600
161605
  agent
161601
161606
  );
161602
161607
  const optionToUse = findMatchingCleanOption(cleanType, availableOptions);
161603
- logger224.info(
161608
+ logger225.info(
161604
161609
  `Setting cleaning mode to: ${optionToUse} (mode=${mode}) via ${selectEntityId}`
161605
161610
  );
161606
161611
  return {
@@ -161618,10 +161623,10 @@ function createVacuumRvcCleanModeServer(_attributes, fanSpeedList, mopIntensityL
161618
161623
  cleaningModeOptions,
161619
161624
  customFanSpeedTags
161620
161625
  );
161621
- logger224.info(
161626
+ logger225.info(
161622
161627
  `Creating VacuumRvcCleanModeServer with ${supportedModes2.length} modes (fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])}, cleaningModeOptions=${JSON.stringify(cleaningModeOptions ?? [])}, customTags=${JSON.stringify(customFanSpeedTags ?? {})})`
161623
161628
  );
161624
- logger224.info(
161629
+ logger225.info(
161625
161630
  `Modes: ${supportedModes2.map((m) => `${m.mode}:${m.label}[${m.modeTags.map((t) => t.value).join(",")}]`).join(", ")}`
161626
161631
  );
161627
161632
  const initialState = {
@@ -161684,7 +161689,7 @@ function resolveMopIntensityList(mopIntensityEntity) {
161684
161689
  init_dist();
161685
161690
  init_esm();
161686
161691
  init_home_assistant_entity_behavior();
161687
- var logger225 = Logger.get("VacuumRvcOperationalStateServer");
161692
+ var logger226 = Logger.get("VacuumRvcOperationalStateServer");
161688
161693
  function batteryFromAttributes(attrs) {
161689
161694
  const raw = attrs.battery_level ?? attrs.battery;
161690
161695
  if (raw == null) return null;
@@ -161735,16 +161740,16 @@ function mapVacuumOperationalState(entity, batteryPercent = batteryFromAttribute
161735
161740
  operationalState = RvcOperationalState4.OperationalState.Error;
161736
161741
  } else {
161737
161742
  if (state.toLowerCase().includes("clean")) {
161738
- logger225.info(
161743
+ logger226.info(
161739
161744
  `Unknown vacuum state "${state}" contains 'clean', treating as Running`
161740
161745
  );
161741
161746
  operationalState = RvcOperationalState4.OperationalState.Running;
161742
161747
  } else {
161743
- logger225.info(`Unknown vacuum state "${state}", treating as Stopped`);
161748
+ logger226.info(`Unknown vacuum state "${state}", treating as Stopped`);
161744
161749
  operationalState = RvcOperationalState4.OperationalState.Stopped;
161745
161750
  }
161746
161751
  }
161747
- logger225.debug(
161752
+ logger226.debug(
161748
161753
  `Vacuum operationalState: "${state}" -> ${RvcOperationalState4.OperationalState[operationalState]}`
161749
161754
  );
161750
161755
  return operationalState;
@@ -161773,7 +161778,7 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
161773
161778
  });
161774
161779
 
161775
161780
  // src/matter/endpoints/legacy/vacuum/index.ts
161776
- var logger226 = Logger.get("VacuumDevice");
161781
+ var logger227 = Logger.get("VacuumDevice");
161777
161782
  var VacuumEndpointType = RoboticVacuumCleanerDevice.with(
161778
161783
  BasicInformationServer2,
161779
161784
  VacuumIdentifyServer,
@@ -161787,7 +161792,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, cleaningModeOpt
161787
161792
  const entityId = homeAssistantEntity.entity.entity_id;
161788
161793
  const attributes9 = homeAssistantEntity.entity.state.attributes;
161789
161794
  const customAreas = homeAssistantEntity.mapping?.customServiceAreas;
161790
- logger226.info(
161795
+ logger227.info(
161791
161796
  `Creating vacuum endpoint for ${entityId}, mapping: ${JSON.stringify(homeAssistantEntity.mapping ?? "none")}`
161792
161797
  );
161793
161798
  const cleanAreaRooms = homeAssistantEntity.mapping?.cleanAreaRooms;
@@ -161800,32 +161805,32 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, cleaningModeOpt
161800
161805
  )
161801
161806
  ).set({ homeAssistantEntity });
161802
161807
  if (includeOnOff) {
161803
- logger226.info(`${entityId}: Adding OnOff cluster (vacuumOnOff flag enabled)`);
161808
+ logger227.info(`${entityId}: Adding OnOff cluster (vacuumOnOff flag enabled)`);
161804
161809
  device = device.with(VacuumOnOffServer);
161805
161810
  }
161806
161811
  device = device.with(VacuumPowerSourceServer);
161807
161812
  const roomEntities = homeAssistantEntity.mapping?.roomEntities;
161808
161813
  const rooms = parseVacuumRooms(attributes9);
161809
- logger226.info(
161814
+ logger227.info(
161810
161815
  `${entityId}: customAreas=${customAreas?.length ?? 0}, roomEntities=${JSON.stringify(roomEntities ?? [])}, parsedRooms=${rooms.length}, cleanAreaRooms=${cleanAreaRooms?.length ?? 0}`
161811
161816
  );
161812
161817
  if (cleanAreaRooms && cleanAreaRooms.length > 0) {
161813
- logger226.info(
161818
+ logger227.info(
161814
161819
  `${entityId}: Adding ServiceArea (${cleanAreaRooms.length} HA areas via CLEAN_AREA)`
161815
161820
  );
161816
161821
  device = device.with(createCleanAreaServiceAreaServer(cleanAreaRooms));
161817
161822
  } else if (customAreas && customAreas.length > 0) {
161818
- logger226.info(
161823
+ logger227.info(
161819
161824
  `${entityId}: Adding ServiceArea (${customAreas.length} custom areas)`
161820
161825
  );
161821
161826
  device = device.with(createCustomServiceAreaServer(customAreas));
161822
161827
  } else if (rooms.length > 0 || roomEntities && roomEntities.length > 0) {
161823
- logger226.info(`${entityId}: Adding ServiceArea (${rooms.length} rooms)`);
161828
+ logger227.info(`${entityId}: Adding ServiceArea (${rooms.length} rooms)`);
161824
161829
  device = device.with(
161825
161830
  createVacuumServiceAreaServer(attributes9, roomEntities)
161826
161831
  );
161827
161832
  } else {
161828
- logger226.info(`${entityId}: Adding ServiceArea (default single-area)`);
161833
+ logger227.info(`${entityId}: Adding ServiceArea (default single-area)`);
161829
161834
  device = device.with(createDefaultServiceAreaServer());
161830
161835
  }
161831
161836
  const fanSpeedList = resolveFanSpeedList(
@@ -161836,7 +161841,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, cleaningModeOpt
161836
161841
  homeAssistantEntity.mapping?.mopIntensityEntity
161837
161842
  );
161838
161843
  if (cleaningModeOptions || fanSpeedList || mopIntensityList) {
161839
- logger226.info(
161844
+ logger227.info(
161840
161845
  `${entityId}: Adding RvcCleanMode (multi-mode, cleaningModeOptions=${JSON.stringify(cleaningModeOptions ?? [])}, fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])})`
161841
161846
  );
161842
161847
  device = device.with(
@@ -161849,7 +161854,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, cleaningModeOpt
161849
161854
  )
161850
161855
  );
161851
161856
  } else {
161852
- logger226.info(`${entityId}: Adding RvcCleanMode (default single-mode)`);
161857
+ logger227.info(`${entityId}: Adding RvcCleanMode (default single-mode)`);
161853
161858
  device = device.with(createDefaultRvcCleanModeServer());
161854
161859
  }
161855
161860
  return device;
@@ -162015,7 +162020,7 @@ var WaterHeaterThermostatServer = ThermostatServer2(
162015
162020
  );
162016
162021
 
162017
162022
  // src/matter/endpoints/legacy/water-heater/index.ts
162018
- var logger227 = Logger.get("WaterHeaterDevice");
162023
+ var logger228 = Logger.get("WaterHeaterDevice");
162019
162024
  var WaterHeaterDeviceType = ThermostatDevice.with(
162020
162025
  BasicInformationServer2,
162021
162026
  IdentifyServer2,
@@ -162031,7 +162036,7 @@ function toMatterTemp2(value) {
162031
162036
  }
162032
162037
  function WaterHeaterDevice(homeAssistantEntity) {
162033
162038
  const attributes9 = homeAssistantEntity.entity.state.attributes;
162034
- logger227.debug(
162039
+ logger228.debug(
162035
162040
  `Creating device for ${homeAssistantEntity.entity.entity_id}, min_temp=${attributes9.min_temp}, max_temp=${attributes9.max_temp}`
162036
162041
  );
162037
162042
  const minLimit = toMatterTemp2(attributes9.min_temp) ?? 0;
@@ -162248,7 +162253,7 @@ var matterDeviceTypeFactories = {
162248
162253
  };
162249
162254
 
162250
162255
  // src/matter/endpoints/composed/user-composed-endpoint.ts
162251
- var logger228 = Logger.get("UserComposedEndpoint");
162256
+ var logger229 = Logger.get("UserComposedEndpoint");
162252
162257
  function stripBasicInformation(type) {
162253
162258
  const behaviors = { ...type.behaviors };
162254
162259
  delete behaviors.bridgedDeviceBasicInformation;
@@ -162304,7 +162309,7 @@ var UserComposedEndpoint = class _UserComposedEndpoint extends Endpoint {
162304
162309
  { vacuumOnOff: registry2.isVacuumOnOffEnabled() }
162305
162310
  );
162306
162311
  if (!primaryType) {
162307
- logger228.warn(
162312
+ logger229.warn(
162308
162313
  `Cannot create endpoint type for primary entity ${primaryEntityId}`
162309
162314
  );
162310
162315
  return void 0;
@@ -162319,7 +162324,7 @@ var UserComposedEndpoint = class _UserComposedEndpoint extends Endpoint {
162319
162324
  if (!sub.entityId) continue;
162320
162325
  const subPayload = buildEntityPayload4(registry2, sub.entityId);
162321
162326
  if (!subPayload) {
162322
- logger228.warn(
162327
+ logger229.warn(
162323
162328
  `Cannot find entity state for composed sub-entity ${sub.entityId}`
162324
162329
  );
162325
162330
  continue;
@@ -162330,7 +162335,7 @@ var UserComposedEndpoint = class _UserComposedEndpoint extends Endpoint {
162330
162335
  };
162331
162336
  const subType = createLegacyEndpointType(subPayload, subMapping);
162332
162337
  if (!subType) {
162333
- logger228.warn(
162338
+ logger229.warn(
162334
162339
  `Cannot create endpoint type for composed sub-entity ${sub.entityId}`
162335
162340
  );
162336
162341
  continue;
@@ -162343,7 +162348,7 @@ var UserComposedEndpoint = class _UserComposedEndpoint extends Endpoint {
162343
162348
  mappedIds.push(sub.entityId);
162344
162349
  }
162345
162350
  if (parts.length < 2) {
162346
- logger228.warn(
162351
+ logger229.warn(
162347
162352
  `User composed device ${primaryEntityId}: only ${parts.length} sub-endpoint(s), need at least 2 (primary + one sub-entity). Falling back to standalone.`
162348
162353
  );
162349
162354
  return void 0;
@@ -162366,7 +162371,7 @@ var UserComposedEndpoint = class _UserComposedEndpoint extends Endpoint {
162366
162371
  const labels = parts.map(
162367
162372
  (_, i) => i === 0 ? primaryEntityId.split(".")[0] : composedEntities[i - 1]?.entityId?.split(".")[0] ?? "?"
162368
162373
  ).join("+");
162369
- logger228.info(
162374
+ logger229.info(
162370
162375
  `Created user composed device ${primaryEntityId}: ${parts.length} sub-endpoint(s) [${labels}]`
162371
162376
  );
162372
162377
  return endpoint;
@@ -162454,7 +162459,7 @@ function asStandaloneEndpointType(type) {
162454
162459
  }
162455
162460
 
162456
162461
  // src/matter/endpoints/legacy/legacy-endpoint.ts
162457
- var logger229 = Logger.get("LegacyEndpoint");
162462
+ var logger230 = Logger.get("LegacyEndpoint");
162458
162463
  var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162459
162464
  static async create(registry2, entityId, mapping, pluginDomainMappings, standalone = false) {
162460
162465
  const deviceRegistry = registry2.deviceOf(entityId);
@@ -162464,25 +162469,25 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162464
162469
  return;
162465
162470
  }
162466
162471
  if (registry2.isAutoBatteryMappingEnabled() && registry2.isBatteryEntityUsed(entityId)) {
162467
- logger229.debug(
162472
+ logger230.debug(
162468
162473
  `Skipping ${entityId} - already auto-assigned as battery to another device`
162469
162474
  );
162470
162475
  return;
162471
162476
  }
162472
162477
  if (registry2.isAutoHumidityMappingEnabled() && registry2.isHumidityEntityUsed(entityId)) {
162473
- logger229.debug(
162478
+ logger230.debug(
162474
162479
  `Skipping ${entityId} - already auto-assigned as humidity to a temperature sensor`
162475
162480
  );
162476
162481
  return;
162477
162482
  }
162478
162483
  if (registry2.isAutoPressureMappingEnabled() && registry2.isPressureEntityUsed(entityId)) {
162479
- logger229.debug(
162484
+ logger230.debug(
162480
162485
  `Skipping ${entityId} - already auto-assigned as pressure to a temperature sensor`
162481
162486
  );
162482
162487
  return;
162483
162488
  }
162484
162489
  if (registry2.isAutoComposedDevicesEnabled() && registry2.isComposedSubEntityUsed(entityId)) {
162485
- logger229.debug(
162490
+ logger230.debug(
162486
162491
  `Skipping ${entityId} - already consumed by a composed device`
162487
162492
  );
162488
162493
  return;
@@ -162502,7 +162507,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162502
162507
  humidityEntity: humidityEntityId
162503
162508
  };
162504
162509
  registry2.markHumidityEntityUsed(humidityEntityId);
162505
- logger229.debug(
162510
+ logger230.debug(
162506
162511
  `Auto-assigned humidity ${humidityEntityId} to ${entityId}`
162507
162512
  );
162508
162513
  }
@@ -162521,7 +162526,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162521
162526
  pressureEntity: pressureEntityId
162522
162527
  };
162523
162528
  registry2.markPressureEntityUsed(pressureEntityId);
162524
- logger229.debug(
162529
+ logger230.debug(
162525
162530
  `Auto-assigned pressure ${pressureEntityId} to ${entityId}`
162526
162531
  );
162527
162532
  }
@@ -162539,7 +162544,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162539
162544
  batteryEntity: batteryEntityId
162540
162545
  };
162541
162546
  registry2.markBatteryEntityUsed(batteryEntityId);
162542
- logger229.debug(
162547
+ logger230.debug(
162543
162548
  `Auto-assigned battery ${batteryEntityId} to ${entityId}`
162544
162549
  );
162545
162550
  }
@@ -162557,7 +162562,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162557
162562
  powerEntity: powerEntityId
162558
162563
  };
162559
162564
  registry2.markPowerEntityUsed(powerEntityId);
162560
- logger229.debug(`Auto-assigned power ${powerEntityId} to ${entityId}`);
162565
+ logger230.debug(`Auto-assigned power ${powerEntityId} to ${entityId}`);
162561
162566
  }
162562
162567
  }
162563
162568
  }
@@ -162574,7 +162579,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162574
162579
  energyEntity: energyEntityId
162575
162580
  };
162576
162581
  registry2.markEnergyEntityUsed(energyEntityId);
162577
- logger229.debug(
162582
+ logger230.debug(
162578
162583
  `Auto-assigned energy ${energyEntityId} to ${entityId}`
162579
162584
  );
162580
162585
  }
@@ -162590,7 +162595,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162590
162595
  entityId: effectiveMapping?.entityId ?? entityId,
162591
162596
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
162592
162597
  };
162593
- logger229.info(
162598
+ logger230.info(
162594
162599
  `Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity} to ${entityId}`
162595
162600
  );
162596
162601
  }
@@ -162600,7 +162605,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162600
162605
  entityId: effectiveMapping?.entityId ?? entityId,
162601
162606
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
162602
162607
  };
162603
- logger229.info(
162608
+ logger230.info(
162604
162609
  `Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity} to ${entityId}`
162605
162610
  );
162606
162611
  }
@@ -162610,7 +162615,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162610
162615
  entityId: effectiveMapping?.entityId ?? entityId,
162611
162616
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
162612
162617
  };
162613
- logger229.info(
162618
+ logger230.info(
162614
162619
  `Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity} to ${entityId}`
162615
162620
  );
162616
162621
  }
@@ -162620,7 +162625,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162620
162625
  entityId: effectiveMapping?.entityId ?? entityId,
162621
162626
  currentRoomEntity: vacuumEntities.currentRoomEntity
162622
162627
  };
162623
- logger229.info(
162628
+ logger230.info(
162624
162629
  `Auto-assigned currentRoom ${vacuumEntities.currentRoomEntity} to ${entityId}`
162625
162630
  );
162626
162631
  }
@@ -162635,7 +162640,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162635
162640
  entityId: effectiveMapping?.entityId ?? entityId,
162636
162641
  cleanAreaRooms
162637
162642
  };
162638
- logger229.info(
162643
+ logger230.info(
162639
162644
  `Using ${cleanAreaRooms.length} HA areas via CLEAN_AREA for ${entityId}`
162640
162645
  );
162641
162646
  }
@@ -162656,7 +162661,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162656
162661
  rooms: roomsObj
162657
162662
  }
162658
162663
  };
162659
- logger229.debug(
162664
+ logger230.debug(
162660
162665
  `Auto-detected ${valetudoRooms.length} Valetudo segments for ${entityId}`
162661
162666
  );
162662
162667
  } else {
@@ -162673,7 +162678,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162673
162678
  rooms: roomsObj
162674
162679
  }
162675
162680
  };
162676
- logger229.debug(
162681
+ logger230.debug(
162677
162682
  `Auto-detected ${roborockRooms.length} Roborock rooms for ${entityId}`
162678
162683
  );
162679
162684
  }
@@ -162682,7 +162687,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162682
162687
  }
162683
162688
  }
162684
162689
  if (standalone && ((effectiveMapping?.composedEntities?.length ?? 0) > 0 || effectiveMapping?.climateExposeFan === true)) {
162685
- logger229.warn(
162690
+ logger230.warn(
162686
162691
  `Composed mappings are not supported in server mode, exposing ${entityId} as a flat standalone endpoint`
162687
162692
  );
162688
162693
  }
@@ -162699,7 +162704,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162699
162704
  if (composed) {
162700
162705
  return composed;
162701
162706
  }
162702
- logger229.warn(
162707
+ logger230.warn(
162703
162708
  `User composed device creation failed for ${entityId}, falling back to standalone`
162704
162709
  );
162705
162710
  }
@@ -162758,7 +162763,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162758
162763
  if (composed) {
162759
162764
  return composed;
162760
162765
  }
162761
- logger229.warn(
162766
+ logger230.warn(
162762
162767
  `Companion fan creation failed for ${entityId}, falling back to standalone`
162763
162768
  );
162764
162769
  }
@@ -162831,11 +162836,11 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
162831
162836
  }
162832
162837
  if (mappedChanged) {
162833
162838
  this.pendingMappedChange = true;
162834
- logger229.debug(
162839
+ logger230.debug(
162835
162840
  `Mapped entity change detected for ${this.entityId}, forcing update`
162836
162841
  );
162837
162842
  }
162838
- logger229.debug(
162843
+ logger230.debug(
162839
162844
  `State update received for ${this.entityId}: state=${state.state}`
162840
162845
  );
162841
162846
  this.lastState = state;
@@ -163348,7 +163353,7 @@ import {
163348
163353
  getCollection
163349
163354
  } from "home-assistant-js-websocket";
163350
163355
  import { atLeastHaVersion } from "home-assistant-js-websocket/dist/util.js";
163351
- var logger230 = Logger.get("SubscribeEntities");
163356
+ var logger231 = Logger.get("SubscribeEntities");
163352
163357
  function processEvent(store, updates) {
163353
163358
  const state = { ...store.state };
163354
163359
  if (updates.a) {
@@ -163374,7 +163379,7 @@ function processEvent(store, updates) {
163374
163379
  for (const entityId in updates.c) {
163375
163380
  let entityState = state[entityId];
163376
163381
  if (!entityState) {
163377
- logger230.warn("Received state update for unknown entity", entityId);
163382
+ logger231.warn("Received state update for unknown entity", entityId);
163378
163383
  continue;
163379
163384
  }
163380
163385
  entityState = { ...entityState };
@@ -163463,7 +163468,7 @@ var subscribeEntities = (conn, onChange, entityIds) => {
163463
163468
  // src/services/bridges/entity-isolation-service.ts
163464
163469
  init_esm();
163465
163470
  init_diagnostic_event_bus();
163466
- var logger231 = Logger.get("EntityIsolation");
163471
+ var logger232 = Logger.get("EntityIsolation");
163467
163472
  var EntityIsolationServiceImpl = class {
163468
163473
  isolatedEntities = /* @__PURE__ */ new Map();
163469
163474
  isolationCallbacks = /* @__PURE__ */ new Map();
@@ -163528,13 +163533,13 @@ var EntityIsolationServiceImpl = class {
163528
163533
  }
163529
163534
  const parsed = this.parseEndpointPath(msg);
163530
163535
  if (!parsed) {
163531
- logger231.warn("Could not parse entity from error:", msg);
163536
+ logger232.warn("Could not parse entity from error:", msg);
163532
163537
  return false;
163533
163538
  }
163534
163539
  const { bridgeId, entityName } = parsed;
163535
163540
  const callback = this.isolationCallbacks.get(bridgeId);
163536
163541
  if (!callback) {
163537
- logger231.warn(
163542
+ logger232.warn(
163538
163543
  `No isolation callback registered for bridge ${bridgeId}, entity: ${entityName}`
163539
163544
  );
163540
163545
  return false;
@@ -163549,7 +163554,7 @@ var EntityIsolationServiceImpl = class {
163549
163554
  reason,
163550
163555
  failedAt: (/* @__PURE__ */ new Date()).toISOString()
163551
163556
  });
163552
- logger231.warn(
163557
+ logger232.warn(
163553
163558
  `Isolating entity "${entityName}" from bridge ${bridgeId} due to: ${reason}`
163554
163559
  );
163555
163560
  diagnosticEventBus.emit("entity_error", `Entity isolated: ${entityName}`, {
@@ -163561,7 +163566,7 @@ var EntityIsolationServiceImpl = class {
163561
163566
  await callback(entityName);
163562
163567
  return true;
163563
163568
  } catch (e) {
163564
- logger231.error(`Failed to isolate entity ${entityName}:`, e);
163569
+ logger232.error(`Failed to isolate entity ${entityName}:`, e);
163565
163570
  return false;
163566
163571
  }
163567
163572
  }
@@ -164945,11 +164950,11 @@ function makeWarmStartState(state, now = (/* @__PURE__ */ new Date()).toISOStrin
164945
164950
  return { ...state, last_updated: now };
164946
164951
  }
164947
164952
  var ServerModeBridge = class {
164948
- constructor(logger234, dataProvider, endpointManager, server) {
164953
+ constructor(logger235, dataProvider, endpointManager, server) {
164949
164954
  this.dataProvider = dataProvider;
164950
164955
  this.endpointManager = endpointManager;
164951
164956
  this.server = server;
164952
- this.log = logger234.get(`ServerModeBridge / ${dataProvider.id}`);
164957
+ this.log = logger235.get(`ServerModeBridge / ${dataProvider.id}`);
164953
164958
  }
164954
164959
  dataProvider;
164955
164960
  endpointManager;
@@ -165644,7 +165649,7 @@ function ServerModeVacuumDevice(homeAssistantEntity, includeOnOff = false, clean
165644
165649
  }
165645
165650
 
165646
165651
  // src/matter/endpoints/server-mode-vacuum-endpoint.ts
165647
- var logger232 = Logger.get("ServerModeVacuumEndpoint");
165652
+ var logger233 = Logger.get("ServerModeVacuumEndpoint");
165648
165653
  var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEndpoint {
165649
165654
  static async create(registry2, entityId, mapping) {
165650
165655
  const deviceRegistry = registry2.deviceOf(entityId);
@@ -165654,7 +165659,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165654
165659
  return void 0;
165655
165660
  }
165656
165661
  let effectiveMapping = mapping;
165657
- logger232.info(
165662
+ logger233.info(
165658
165663
  `${entityId}: device_id=${entity.device_id}, manualBattery=${mapping?.batteryEntity ?? "none"}`
165659
165664
  );
165660
165665
  if (entity.device_id) {
@@ -165669,15 +165674,15 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165669
165674
  batteryEntity: batteryEntityId
165670
165675
  };
165671
165676
  registry2.markBatteryEntityUsed(batteryEntityId);
165672
- logger232.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
165677
+ logger233.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
165673
165678
  } else {
165674
165679
  const attrs = state.attributes;
165675
165680
  if (attrs.battery_level != null || attrs.battery != null) {
165676
- logger232.info(
165681
+ logger233.info(
165677
165682
  `${entityId}: No battery entity found, using battery attribute from vacuum state`
165678
165683
  );
165679
165684
  } else {
165680
- logger232.warn(
165685
+ logger233.warn(
165681
165686
  `${entityId}: No battery entity found for device ${entity.device_id}`
165682
165687
  );
165683
165688
  }
@@ -165692,7 +165697,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165692
165697
  entityId: effectiveMapping?.entityId ?? entityId,
165693
165698
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
165694
165699
  };
165695
- logger232.info(
165700
+ logger233.info(
165696
165701
  `${entityId}: Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity}`
165697
165702
  );
165698
165703
  }
@@ -165702,7 +165707,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165702
165707
  entityId: effectiveMapping?.entityId ?? entityId,
165703
165708
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
165704
165709
  };
165705
- logger232.info(
165710
+ logger233.info(
165706
165711
  `${entityId}: Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity}`
165707
165712
  );
165708
165713
  }
@@ -165712,7 +165717,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165712
165717
  entityId: effectiveMapping?.entityId ?? entityId,
165713
165718
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
165714
165719
  };
165715
- logger232.info(
165720
+ logger233.info(
165716
165721
  `${entityId}: Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity}`
165717
165722
  );
165718
165723
  }
@@ -165722,7 +165727,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165722
165727
  entityId: effectiveMapping?.entityId ?? entityId,
165723
165728
  currentRoomEntity: vacuumEntities.currentRoomEntity
165724
165729
  };
165725
- logger232.info(
165730
+ logger233.info(
165726
165731
  `${entityId}: Auto-assigned currentRoom ${vacuumEntities.currentRoomEntity}`
165727
165732
  );
165728
165733
  }
@@ -165737,7 +165742,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165737
165742
  entityId: effectiveMapping?.entityId ?? entityId,
165738
165743
  cleanAreaRooms
165739
165744
  };
165740
- logger232.info(
165745
+ logger233.info(
165741
165746
  `${entityId}: Using ${cleanAreaRooms.length} HA areas via CLEAN_AREA`
165742
165747
  );
165743
165748
  }
@@ -165758,7 +165763,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165758
165763
  rooms: roomsObj
165759
165764
  }
165760
165765
  };
165761
- logger232.info(
165766
+ logger233.info(
165762
165767
  `${entityId}: Auto-detected ${valetudoRooms.length} Valetudo segments`
165763
165768
  );
165764
165769
  } else {
@@ -165775,14 +165780,14 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165775
165780
  rooms: roomsObj
165776
165781
  }
165777
165782
  };
165778
- logger232.info(
165783
+ logger233.info(
165779
165784
  `${entityId}: Auto-detected ${roborockRooms.length} Roborock rooms`
165780
165785
  );
165781
165786
  }
165782
165787
  }
165783
165788
  }
165784
165789
  } else {
165785
- logger232.warn(`${entityId}: No device_id, cannot auto-assign battery`);
165790
+ logger233.warn(`${entityId}: No device_id, cannot auto-assign battery`);
165786
165791
  }
165787
165792
  const payload = {
165788
165793
  entity_id: entityId,
@@ -165854,11 +165859,11 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
165854
165859
  }
165855
165860
  if (mappedChanged) {
165856
165861
  this.pendingMappedChange = true;
165857
- logger232.debug(
165862
+ logger233.debug(
165858
165863
  `Mapped entity change detected for ${this.entityId}, forcing update`
165859
165864
  );
165860
165865
  }
165861
- logger232.debug(
165866
+ logger233.debug(
165862
165867
  `State update received for ${this.entityId}: state=${state.state}`
165863
165868
  );
165864
165869
  this.lastState = state;
@@ -166346,10 +166351,10 @@ var BridgeEnvironmentFactory = class extends BridgeFactory {
166346
166351
  // src/core/ioc/app-environment.ts
166347
166352
  var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
166348
166353
  constructor(rootEnv, options) {
166349
- const logger234 = rootEnv.get(LoggerService);
166354
+ const logger235 = rootEnv.get(LoggerService);
166350
166355
  super({
166351
166356
  id: "App",
166352
- log: logger234.get("AppContainer"),
166357
+ log: logger235.get("AppContainer"),
166353
166358
  parent: rootEnv
166354
166359
  });
166355
166360
  this.options = options;
@@ -166363,8 +166368,8 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
166363
166368
  }
166364
166369
  construction;
166365
166370
  async init() {
166366
- const logger234 = this.get(LoggerService);
166367
- this.set(LoggerService, logger234);
166371
+ const logger235 = this.get(LoggerService);
166372
+ this.set(LoggerService, logger235);
166368
166373
  this.set(AppStorage, new AppStorage(await this.load(StorageService)));
166369
166374
  this.set(BridgeStorage, new BridgeStorage(await this.load(AppStorage)));
166370
166375
  this.set(
@@ -166381,7 +166386,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
166381
166386
  );
166382
166387
  this.set(
166383
166388
  HomeAssistantClient,
166384
- new HomeAssistantClient(logger234, this.options.homeAssistant)
166389
+ new HomeAssistantClient(logger235, this.options.homeAssistant)
166385
166390
  );
166386
166391
  this.set(
166387
166392
  HomeAssistantConfig,
@@ -166389,7 +166394,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
166389
166394
  );
166390
166395
  this.set(
166391
166396
  HomeAssistantActions,
166392
- new HomeAssistantActions(logger234, await this.load(HomeAssistantClient))
166397
+ new HomeAssistantActions(logger235, await this.load(HomeAssistantClient))
166393
166398
  );
166394
166399
  this.set(
166395
166400
  HomeAssistantRegistry,
@@ -166425,7 +166430,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
166425
166430
  this.set(
166426
166431
  WebApi,
166427
166432
  new WebApi(
166428
- logger234,
166433
+ logger235,
166429
166434
  await this.load(BridgeService),
166430
166435
  await this.load(HomeAssistantClient),
166431
166436
  await this.load(HomeAssistantRegistry),
@@ -166450,7 +166455,7 @@ init_esm();
166450
166455
  init_nodejs();
166451
166456
 
166452
166457
  // src/matter/patches/patch-level-control-tlv.ts
166453
- var logger233 = Logger.get("PatchLevelControlTlv");
166458
+ var logger234 = Logger.get("PatchLevelControlTlv");
166454
166459
  var optionalFieldModels = /* @__PURE__ */ new WeakSet();
166455
166460
  var fieldModelMandatoryGetterPatched = false;
166456
166461
  function patchLevelControlTlv() {
@@ -166506,11 +166511,11 @@ function patchLevelControlTlv() {
166506
166511
  patched++;
166507
166512
  }
166508
166513
  if (patched > 0) {
166509
- logger233.info(
166514
+ logger234.info(
166510
166515
  `Patched ${patched} LevelControl TLV schema(s): transitionTime is now optional (Google Home compatibility)`
166511
166516
  );
166512
166517
  } else {
166513
- logger233.warn(
166518
+ logger234.warn(
166514
166519
  "Failed to patch LevelControl TLV schemas, field definitions not found. Google Home brightness adjustment may not work.",
166515
166520
  {
166516
166521
  moveToLevel: describeFields(