@riddix/hamh 2.1.0-alpha.472 → 2.1.0-alpha.474

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1743,8 +1743,8 @@ var init_Cancelable = __esm({
1743
1743
  };
1744
1744
  return result;
1745
1745
  }
1746
- static set logger(logger196) {
1747
- this.#logger = logger196;
1746
+ static set logger(logger197) {
1747
+ this.#logger = logger197;
1748
1748
  }
1749
1749
  static get logger() {
1750
1750
  return this.#logger;
@@ -3422,13 +3422,13 @@ var init_Logger = __esm({
3422
3422
  *
3423
3423
  * @deprecated use {@link destinations}
3424
3424
  */
3425
- static addLogger(identifier, logger196, options) {
3425
+ static addLogger(identifier, logger197, options) {
3426
3426
  if (identifier in this.destinations) {
3427
3427
  throw new ImplementationError(`Logger "${identifier}" already exists`);
3428
3428
  }
3429
3429
  const dest = LogDestination({ name: identifier });
3430
3430
  const legacy = adaptDestinationToLegacy(dest);
3431
- legacy.log = logger196;
3431
+ legacy.log = logger197;
3432
3432
  if (options?.defaultLogLevel !== void 0) {
3433
3433
  legacy.defaultLogLevel = options.defaultLogLevel;
3434
3434
  }
@@ -5538,8 +5538,8 @@ function Construction(subject, initializer) {
5538
5538
  }
5539
5539
  }
5540
5540
  function unhandledError(...args) {
5541
- const logger196 = Logger.get(subject.constructor.name);
5542
- logger196.error(...args);
5541
+ const logger197 = Logger.get(subject.constructor.name);
5542
+ logger197.error(...args);
5543
5543
  }
5544
5544
  function createErrorHandler(name) {
5545
5545
  return (e) => {
@@ -135998,11 +135998,11 @@ var init_Api = __esm({
135998
135998
  }
135999
135999
  Api2.resourceFor = resourceFor;
136000
136000
  function log(level, facility, id, ...message) {
136001
- let logger196 = loggers.get(facility);
136002
- if (!logger196) {
136003
- loggers.set(facility, logger196 = Logger.get(facility));
136001
+ let logger197 = loggers.get(facility);
136002
+ if (!logger197) {
136003
+ loggers.set(facility, logger197 = Logger.get(facility));
136004
136004
  }
136005
- logger196[level](Diagnostic.via(id || "(anon)"), message);
136005
+ logger197[level](Diagnostic.via(id || "(anon)"), message);
136006
136006
  }
136007
136007
  Api2.log = log;
136008
136008
  function logRequest(facility, id, method, target) {
@@ -147233,10 +147233,10 @@ var init_home_assistant_actions = __esm({
147233
147233
  circuitBreakerResetMs: 3e4
147234
147234
  };
147235
147235
  HomeAssistantActions = class extends Service {
147236
- constructor(logger196, client, config10) {
147236
+ constructor(logger197, client, config10) {
147237
147237
  super("HomeAssistantActions");
147238
147238
  this.client = client;
147239
- this.log = logger196.get(this);
147239
+ this.log = logger197.get(this);
147240
147240
  this.config = { ...defaultConfig, ...config10 };
147241
147241
  this.circuitBreaker = new CircuitBreaker(
147242
147242
  this.config.circuitBreakerThreshold,
@@ -147608,10 +147608,10 @@ var DiagnosticService = class {
147608
147608
  };
147609
147609
 
147610
147610
  // src/api/access-log.ts
147611
- function accessLogger(logger196) {
147611
+ function accessLogger(logger197) {
147612
147612
  return (req, res, next) => {
147613
147613
  res.on("finish", () => {
147614
- logger196.debug(
147614
+ logger197.debug(
147615
147615
  `${req.method} ${decodeURI(req.originalUrl)} ${res.statusCode} ${res.statusMessage} from ${req.socket.remoteAddress}`
147616
147616
  );
147617
147617
  });
@@ -150318,7 +150318,7 @@ var WebSocketApi = class {
150318
150318
 
150319
150319
  // src/api/web-api.ts
150320
150320
  var WebApi = class extends Service {
150321
- constructor(logger196, bridgeService, haClient, haRegistry, bridgeStorage, mappingStorage, lockCredentialStorage, settingsStorage, props) {
150321
+ constructor(logger197, bridgeService, haClient, haRegistry, bridgeStorage, mappingStorage, lockCredentialStorage, settingsStorage, props) {
150322
150322
  super("WebApi");
150323
150323
  this.bridgeService = bridgeService;
150324
150324
  this.haClient = haClient;
@@ -150328,8 +150328,8 @@ var WebApi = class extends Service {
150328
150328
  this.lockCredentialStorage = lockCredentialStorage;
150329
150329
  this.settingsStorage = settingsStorage;
150330
150330
  this.props = props;
150331
- this.logger = logger196;
150332
- this.log = logger196.get(this);
150331
+ this.logger = logger197;
150332
+ this.log = logger197.get(this);
150333
150333
  this.accessLogger = accessLogger(this.log.createChild("Access Log"));
150334
150334
  this.startTime = Date.now();
150335
150335
  this.wsApi = new WebSocketApi(
@@ -150762,12 +150762,12 @@ var CustomStorage = class extends StorageBackendDisk {
150762
150762
 
150763
150763
  // src/core/app/storage.ts
150764
150764
  function storage(environment, options) {
150765
- const logger196 = environment.get(LoggerService).get("CustomStorage");
150765
+ const logger197 = environment.get(LoggerService).get("CustomStorage");
150766
150766
  const location2 = resolveStorageLocation(options.location);
150767
150767
  fs6.mkdirSync(location2, { recursive: true });
150768
150768
  const storageService = environment.get(StorageService);
150769
150769
  storageService.location = location2;
150770
- storageService.factory = (ns) => new CustomStorage(logger196, path6.resolve(location2, ns));
150770
+ storageService.factory = (ns) => new CustomStorage(logger197, path6.resolve(location2, ns));
150771
150771
  }
150772
150772
  function resolveStorageLocation(storageLocation) {
150773
150773
  const homedir = os3.homedir();
@@ -151121,10 +151121,10 @@ import {
151121
151121
  getConfig
151122
151122
  } from "home-assistant-js-websocket";
151123
151123
  var HomeAssistantClient = class extends Service {
151124
- constructor(logger196, options) {
151124
+ constructor(logger197, options) {
151125
151125
  super("HomeAssistantClient");
151126
151126
  this.options = options;
151127
- this.log = logger196.get(this);
151127
+ this.log = logger197.get(this);
151128
151128
  }
151129
151129
  static Options = /* @__PURE__ */ Symbol.for("HomeAssistantClientProps");
151130
151130
  _connection;
@@ -164374,10 +164374,10 @@ function ensureCommissioningConfig(server) {
164374
164374
  // src/services/bridges/bridge.ts
164375
164375
  var AUTO_FORCE_SYNC_INTERVAL_MS = 9e4;
164376
164376
  var Bridge = class {
164377
- constructor(env, logger196, dataProvider, endpointManager) {
164377
+ constructor(env, logger197, dataProvider, endpointManager) {
164378
164378
  this.dataProvider = dataProvider;
164379
164379
  this.endpointManager = endpointManager;
164380
- this.log = logger196.get(`Bridge / ${dataProvider.id}`);
164380
+ this.log = logger197.get(`Bridge / ${dataProvider.id}`);
164381
164381
  this.server = new BridgeServerNode(
164382
164382
  env,
164383
164383
  this.dataProvider,
@@ -167330,6 +167330,57 @@ var ComposedSensorEndpoint = class _ComposedSensorEndpoint extends Endpoint {
167330
167330
  }
167331
167331
  };
167332
167332
 
167333
+ // src/matter/endpoints/validate-endpoint-type.ts
167334
+ init_esm();
167335
+ init_esm7();
167336
+ var logger165 = Logger.get("EndpointValidation");
167337
+ function toCamelCase(name) {
167338
+ return name.charAt(0).toLowerCase() + name.slice(1);
167339
+ }
167340
+ function validateEndpointType(endpointType, entityId) {
167341
+ const deviceTypeModel = Matter.deviceTypes.find(
167342
+ (dt) => dt.id === endpointType.deviceType
167343
+ );
167344
+ if (!deviceTypeModel) {
167345
+ return void 0;
167346
+ }
167347
+ const serverClusterReqs = deviceTypeModel.requirements.filter(
167348
+ (r) => r.element === "serverCluster"
167349
+ );
167350
+ const behaviorKeys = new Set(Object.keys(endpointType.behaviors));
167351
+ const missingMandatory = [];
167352
+ const availableOptional = [];
167353
+ const presentClusters = [];
167354
+ for (const req of serverClusterReqs) {
167355
+ const key = toCamelCase(req.name);
167356
+ if (behaviorKeys.has(key)) {
167357
+ presentClusters.push(req.name);
167358
+ } else if (req.isMandatory) {
167359
+ missingMandatory.push(req.name);
167360
+ } else {
167361
+ availableOptional.push(req.name);
167362
+ }
167363
+ }
167364
+ const prefix = entityId ? `[${entityId}] ` : "";
167365
+ if (missingMandatory.length > 0) {
167366
+ logger165.warn(
167367
+ `${prefix}${deviceTypeModel.name} (0x${endpointType.deviceType.toString(16)}): missing mandatory clusters: ${missingMandatory.join(", ")}`
167368
+ );
167369
+ }
167370
+ if (availableOptional.length > 0) {
167371
+ logger165.debug(
167372
+ `${prefix}${deviceTypeModel.name} (0x${endpointType.deviceType.toString(16)}): optional clusters not used: ${availableOptional.join(", ")}`
167373
+ );
167374
+ }
167375
+ return {
167376
+ deviceTypeName: deviceTypeModel.name,
167377
+ deviceTypeId: endpointType.deviceType,
167378
+ missingMandatory,
167379
+ availableOptional,
167380
+ presentClusters
167381
+ };
167382
+ }
167383
+
167333
167384
  // src/matter/endpoints/legacy/air-purifier/index.ts
167334
167385
  init_dist();
167335
167386
  init_home_assistant_entity_behavior();
@@ -167389,7 +167440,7 @@ init_home_assistant_entity_behavior();
167389
167440
  // src/matter/behaviors/mode-select-server.ts
167390
167441
  init_esm();
167391
167442
  init_home_assistant_entity_behavior();
167392
- var logger165 = Logger.get("ModeSelectServer");
167443
+ var logger166 = Logger.get("ModeSelectServer");
167393
167444
  var ModeSelectServerBase = class extends ModeSelectServer {
167394
167445
  async initialize() {
167395
167446
  await super.initialize();
@@ -167418,13 +167469,13 @@ var ModeSelectServerBase = class extends ModeSelectServer {
167418
167469
  const options = config10.getOptions(homeAssistant.entity);
167419
167470
  const { newMode } = request;
167420
167471
  if (newMode < 0 || newMode >= options.length) {
167421
- logger165.warn(
167472
+ logger166.warn(
167422
167473
  `[${homeAssistant.entityId}] Invalid mode ${newMode}, options: [${options.join(", ")}]`
167423
167474
  );
167424
167475
  return;
167425
167476
  }
167426
167477
  const option = options[newMode];
167427
- logger165.info(
167478
+ logger166.info(
167428
167479
  `[${homeAssistant.entityId}] changeToMode(${newMode}) -> "${option}"`
167429
167480
  );
167430
167481
  applyPatchState(this.state, { currentMode: newMode });
@@ -167869,7 +167920,7 @@ var WaterLeakDetectorType = WaterLeakDetectorDevice.with(
167869
167920
  );
167870
167921
 
167871
167922
  // src/matter/endpoints/legacy/binary-sensor/index.ts
167872
- var logger166 = Logger.get("BinarySensorDevice");
167923
+ var logger167 = Logger.get("BinarySensorDevice");
167873
167924
  var deviceClasses = {
167874
167925
  [BinarySensorDeviceClass.CarbonMonoxide]: CoAlarmType,
167875
167926
  [BinarySensorDeviceClass.Gas]: CoAlarmType,
@@ -167919,11 +167970,11 @@ function BinarySensorDevice(homeAssistantEntity) {
167919
167970
  const originalTypeName = type.name;
167920
167971
  if (hasBattery && batteryTypes.has(type)) {
167921
167972
  type = batteryTypes.get(type);
167922
- logger166.info(
167973
+ logger167.info(
167923
167974
  `[${entityId}] Using battery variant: ${originalTypeName} -> ${type.name}, batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"}`
167924
167975
  );
167925
167976
  } else if (hasBattery) {
167926
- logger166.warn(
167977
+ logger167.warn(
167927
167978
  `[${entityId}] Has battery but no variant available for ${originalTypeName}`
167928
167979
  );
167929
167980
  }
@@ -168079,7 +168130,7 @@ init_home_assistant_entity_behavior();
168079
168130
  // src/matter/behaviors/thermostat-server.ts
168080
168131
  init_esm();
168081
168132
  init_home_assistant_entity_behavior();
168082
- var logger167 = Logger.get("ThermostatServer");
168133
+ var logger168 = Logger.get("ThermostatServer");
168083
168134
  var SystemMode = Thermostat3.SystemMode;
168084
168135
  var RunningMode = Thermostat3.ThermostatRunningMode;
168085
168136
  var nudgingSetpoints = /* @__PURE__ */ new Set();
@@ -168137,7 +168188,7 @@ var HeatingAndCoolingFeaturedBase = ThermostatServer.with("Heating", "Cooling").
168137
168188
  );
168138
168189
  function thermostatPreInitialize(self) {
168139
168190
  const currentLocal = self.state.localTemperature;
168140
- logger167.debug(
168191
+ logger168.debug(
168141
168192
  `initialize: features - heating=${self.features.heating}, cooling=${self.features.cooling}`
168142
168193
  );
168143
168194
  const localValue = typeof currentLocal === "number" && !Number.isNaN(currentLocal) ? currentLocal : currentLocal === null ? null : 2100;
@@ -168160,7 +168211,7 @@ function thermostatPreInitialize(self) {
168160
168211
  const coolingValue = typeof currentCooling === "number" && !Number.isNaN(currentCooling) ? currentCooling : 2400;
168161
168212
  self.state.occupiedCoolingSetpoint = coolingValue;
168162
168213
  }
168163
- logger167.debug(
168214
+ logger168.debug(
168164
168215
  `initialize: after force-set - local=${self.state.localTemperature}`
168165
168216
  );
168166
168217
  self.state.thermostatRunningState = runningStateAllOff;
@@ -168242,7 +168293,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
168242
168293
  maxCoolLimit,
168243
168294
  "cool"
168244
168295
  );
168245
- logger167.debug(
168296
+ logger168.debug(
168246
168297
  `update: limits heat=[${minHeatLimit}, ${maxHeatLimit}], cool=[${minCoolLimit}, ${maxCoolLimit}], systemMode=${systemMode}, runningMode=${runningMode}`
168247
168298
  );
168248
168299
  const controlSequence = config10.getControlSequence(entity.state, this.agent);
@@ -168314,18 +168365,18 @@ var ThermostatServerBase = class extends FullFeaturedBase {
168314
168365
  */
168315
168366
  // biome-ignore lint/correctness/noUnusedPrivateClassMembers: Called via thermostatPostInitialize + prototype copy
168316
168367
  heatingSetpointChanging(value, _oldValue, context) {
168317
- logger167.debug(
168368
+ logger168.debug(
168318
168369
  `heatingSetpointChanging: value=${value}, oldValue=${_oldValue}, isOffline=${transactionIsOffline(context)}`
168319
168370
  );
168320
168371
  if (transactionIsOffline(context)) {
168321
- logger167.debug(
168372
+ logger168.debug(
168322
168373
  "heatingSetpointChanging: skipping - transaction is offline"
168323
168374
  );
168324
168375
  return;
168325
168376
  }
168326
168377
  const next = Temperature.celsius(value / 100);
168327
168378
  if (!next) {
168328
- logger167.debug("heatingSetpointChanging: skipping - invalid temperature");
168379
+ logger168.debug("heatingSetpointChanging: skipping - invalid temperature");
168329
168380
  return;
168330
168381
  }
168331
168382
  this.agent.asLocalActor(() => {
@@ -168336,7 +168387,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
168336
168387
  this.agent
168337
168388
  );
168338
168389
  const currentMode = this.state.systemMode;
168339
- logger167.debug(
168390
+ logger168.debug(
168340
168391
  `heatingSetpointChanging: supportsRange=${supportsRange}, systemMode=${currentMode}, features.heating=${this.features.heating}, features.cooling=${this.features.cooling}`
168341
168392
  );
168342
168393
  if (!supportsRange) {
@@ -168346,12 +168397,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
168346
168397
  const isOff = currentMode === Thermostat3.SystemMode.Off;
168347
168398
  if (isOff && this.features.heating) {
168348
168399
  if (nudgingSetpoints.has(homeAssistant.entityId)) {
168349
- logger167.debug(
168400
+ logger168.debug(
168350
168401
  `heatingSetpointChanging: skipping auto-resume - nudge write in progress`
168351
168402
  );
168352
168403
  return;
168353
168404
  }
168354
- logger167.info(
168405
+ logger168.info(
168355
168406
  `heatingSetpointChanging: auto-resume - switching to Heat (was Off)`
168356
168407
  );
168357
168408
  const modeAction = config10.setSystemMode(
@@ -168360,17 +168411,17 @@ var ThermostatServerBase = class extends FullFeaturedBase {
168360
168411
  );
168361
168412
  homeAssistant.callAction(modeAction);
168362
168413
  } else if (!isAutoMode && !isHeatingMode) {
168363
- logger167.debug(
168414
+ logger168.debug(
168364
168415
  `heatingSetpointChanging: skipping - not in heating/auto mode (mode=${currentMode}, haMode=${haHvacMode})`
168365
168416
  );
168366
168417
  return;
168367
168418
  }
168368
- logger167.debug(
168419
+ logger168.debug(
168369
168420
  `heatingSetpointChanging: proceeding - isAutoMode=${isAutoMode}, isHeatingMode=${isHeatingMode}, isOff=${isOff}, haMode=${haHvacMode}`
168370
168421
  );
168371
168422
  }
168372
168423
  const coolingSetpoint = this.features.cooling ? this.state.occupiedCoolingSetpoint : value;
168373
- logger167.debug(
168424
+ logger168.debug(
168374
168425
  `heatingSetpointChanging: calling setTemperature with heat=${next.celsius(true)}, cool=${coolingSetpoint}`
168375
168426
  );
168376
168427
  this.setTemperature(
@@ -168409,12 +168460,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
168409
168460
  const isOff = currentMode === Thermostat3.SystemMode.Off;
168410
168461
  if (isOff && !this.features.heating && this.features.cooling) {
168411
168462
  if (nudgingSetpoints.has(homeAssistant.entityId)) {
168412
- logger167.debug(
168463
+ logger168.debug(
168413
168464
  `coolingSetpointChanging: skipping auto-resume - nudge write in progress`
168414
168465
  );
168415
168466
  return;
168416
168467
  }
168417
- logger167.info(
168468
+ logger168.info(
168418
168469
  `coolingSetpointChanging: auto-resume - switching to Cool (was Off)`
168419
168470
  );
168420
168471
  const modeAction = config10.setSystemMode(
@@ -168423,12 +168474,12 @@ var ThermostatServerBase = class extends FullFeaturedBase {
168423
168474
  );
168424
168475
  homeAssistant.callAction(modeAction);
168425
168476
  } else if (!isAutoMode && !isCoolingMode) {
168426
- logger167.debug(
168477
+ logger168.debug(
168427
168478
  `coolingSetpointChanging: skipping - not in cooling/auto mode (mode=${currentMode}, haMode=${haHvacMode})`
168428
168479
  );
168429
168480
  return;
168430
168481
  }
168431
- logger167.debug(
168482
+ logger168.debug(
168432
168483
  `coolingSetpointChanging: proceeding - isAutoMode=${isAutoMode}, isCoolingMode=${isCoolingMode}, isOff=${isOff}, haMode=${haHvacMode}`
168433
168484
  );
168434
168485
  }
@@ -168505,7 +168556,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
168505
168556
  const effectiveMax = max ?? 5e3;
168506
168557
  if (value == null || Number.isNaN(value)) {
168507
168558
  const defaultValue = type === "heat" ? 2e3 : 2400;
168508
- logger167.debug(
168559
+ logger168.debug(
168509
168560
  `${type} setpoint is undefined, using default: ${defaultValue}`
168510
168561
  );
168511
168562
  return Math.max(effectiveMin, Math.min(effectiveMax, defaultValue));
@@ -168969,7 +169020,7 @@ init_home_assistant_entity_behavior();
168969
169020
  init_esm();
168970
169021
  init_home_assistant_actions();
168971
169022
  init_home_assistant_entity_behavior();
168972
- var logger168 = Logger.get("WindowCoveringServer");
169023
+ var logger169 = Logger.get("WindowCoveringServer");
168973
169024
  var MovementStatus = WindowCovering3.MovementStatus;
168974
169025
  var FeaturedBase5 = WindowCoveringServer.with(
168975
169026
  "Lift",
@@ -169053,7 +169104,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
169053
169104
  );
169054
169105
  const currentTilt100ths = currentTilt != null ? currentTilt * 100 : null;
169055
169106
  const isStopped = movementStatus === MovementStatus.Stopped;
169056
- logger168.debug(
169107
+ logger169.debug(
169057
169108
  `Cover update for ${entity.entity_id}: state=${state.state}, lift=${currentLift}%, tilt=${currentTilt}%, movement=${MovementStatus[movementStatus]}`
169058
169109
  );
169059
169110
  const appliedPatch = applyPatchState(
@@ -169092,9 +169143,9 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
169092
169143
  );
169093
169144
  if (Object.keys(appliedPatch).length > 0) {
169094
169145
  const hasOperationalChange = "operationalStatus" in appliedPatch;
169095
- const log = hasOperationalChange ? logger168.info : logger168.debug;
169146
+ const log = hasOperationalChange ? logger169.info : logger169.debug;
169096
169147
  log.call(
169097
- logger168,
169148
+ logger169,
169098
169149
  `Cover ${entity.entity_id} state changed: ${JSON.stringify(appliedPatch)}`
169099
169150
  );
169100
169151
  }
@@ -169102,7 +169153,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
169102
169153
  async handleMovement(type, _, direction, targetPercent100ths) {
169103
169154
  const currentLift = this.state.currentPositionLiftPercent100ths ?? 0;
169104
169155
  const currentTilt = this.state.currentPositionTiltPercent100ths ?? 0;
169105
- logger168.info(
169156
+ logger169.info(
169106
169157
  `handleMovement: type=${MovementType[type]}, direction=${MovementDirection[direction]}, target=${targetPercent100ths}, currentLift=${currentLift}, currentTilt=${currentTilt}, absolutePosition=${this.features.absolutePosition}`
169107
169158
  );
169108
169159
  if (type === MovementType.Lift) {
@@ -169138,13 +169189,13 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
169138
169189
  handleLiftOpen() {
169139
169190
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
169140
169191
  const action = this.state.config.openCoverLift(void 0, this.agent);
169141
- logger168.info(`handleLiftOpen: calling action=${action.action}`);
169192
+ logger169.info(`handleLiftOpen: calling action=${action.action}`);
169142
169193
  homeAssistant.callAction(action);
169143
169194
  }
169144
169195
  handleLiftClose() {
169145
169196
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
169146
169197
  const action = this.state.config.closeCoverLift(void 0, this.agent);
169147
- logger168.info(`handleLiftClose: calling action=${action.action}`);
169198
+ logger169.info(`handleLiftClose: calling action=${action.action}`);
169148
169199
  homeAssistant.callAction(action);
169149
169200
  }
169150
169201
  handleGoToLiftPosition(targetPercent100ths) {
@@ -169165,7 +169216,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
169165
169216
  this.lastLiftCommandTime = now;
169166
169217
  const isFirstInSequence = timeSinceLastCommand > _WindowCoveringServerBase.COMMAND_SEQUENCE_THRESHOLD_MS;
169167
169218
  const debounceMs = isFirstInSequence ? _WindowCoveringServerBase.DEBOUNCE_INITIAL_MS : _WindowCoveringServerBase.DEBOUNCE_SUBSEQUENT_MS;
169168
- logger168.debug(
169219
+ logger169.debug(
169169
169220
  `Lift command: target=${targetPosition}%, debounce=${debounceMs}ms (${isFirstInSequence ? "initial" : "subsequent"})`
169170
169221
  );
169171
169222
  if (this.liftDebounceTimer) {
@@ -169214,7 +169265,7 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
169214
169265
  this.lastTiltCommandTime = now;
169215
169266
  const isFirstInSequence = timeSinceLastCommand > _WindowCoveringServerBase.COMMAND_SEQUENCE_THRESHOLD_MS;
169216
169267
  const debounceMs = isFirstInSequence ? _WindowCoveringServerBase.DEBOUNCE_INITIAL_MS : _WindowCoveringServerBase.DEBOUNCE_SUBSEQUENT_MS;
169217
- logger168.debug(
169268
+ logger169.debug(
169218
169269
  `Tilt command: target=${targetPosition}%, debounce=${debounceMs}ms (${isFirstInSequence ? "initial" : "subsequent"})`
169219
169270
  );
169220
169271
  if (this.tiltDebounceTimer) {
@@ -169273,7 +169324,7 @@ function adjustPositionForWriting(position, flags2, matterSemantics) {
169273
169324
  }
169274
169325
 
169275
169326
  // src/matter/endpoints/legacy/cover/behaviors/cover-window-covering-server.ts
169276
- var logger169 = Logger.get("CoverWindowCoveringServer");
169327
+ var logger170 = Logger.get("CoverWindowCoveringServer");
169277
169328
  var attributes5 = (entity) => entity.attributes;
169278
169329
  var MATTER_SEMANTIC_PLATFORMS = [
169279
169330
  // Currently empty - no known platforms use Matter semantics by default
@@ -169291,7 +169342,7 @@ var adjustPositionForReading2 = (position, agent) => {
169291
169342
  const { featureFlags } = agent.env.get(BridgeDataProvider);
169292
169343
  const matterSem = usesMatterSemantics(agent);
169293
169344
  const result = adjustPositionForReading(position, featureFlags, matterSem);
169294
- logger169.debug(`adjustPositionForReading: HA=${position}%, result=${result}%`);
169345
+ logger170.debug(`adjustPositionForReading: HA=${position}%, result=${result}%`);
169295
169346
  return result;
169296
169347
  };
169297
169348
  var adjustPositionForWriting2 = (position, agent) => {
@@ -169395,7 +169446,7 @@ var config5 = {
169395
169446
  var CoverWindowCoveringServer = WindowCoveringServer2(config5);
169396
169447
 
169397
169448
  // src/matter/endpoints/legacy/cover/index.ts
169398
- var logger170 = Logger.get("CoverDevice");
169449
+ var logger171 = Logger.get("CoverDevice");
169399
169450
  var CoverPowerSourceServer = PowerSourceServer2({
169400
169451
  getBatteryPercent: (entity, agent) => {
169401
169452
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
@@ -169422,7 +169473,7 @@ var CoverDeviceType = (supportedFeatures, hasBattery, entityId) => {
169422
169473
  features2.add("PositionAwareLift");
169423
169474
  features2.add("AbsolutePosition");
169424
169475
  } else {
169425
- logger170.warn(
169476
+ logger171.warn(
169426
169477
  `[${entityId}] Cover has no support_open feature (supported_features=${supportedFeatures}), adding Lift anyway`
169427
169478
  );
169428
169479
  features2.add("Lift");
@@ -169439,7 +169490,7 @@ var CoverDeviceType = (supportedFeatures, hasBattery, entityId) => {
169439
169490
  features2.add("AbsolutePosition");
169440
169491
  }
169441
169492
  }
169442
- logger170.info(
169493
+ logger171.info(
169443
169494
  `[${entityId}] Creating WindowCovering with features: [${[...features2].join(", ")}], supported_features=${supportedFeatures}`
169444
169495
  );
169445
169496
  const baseBehaviors = [
@@ -169460,11 +169511,11 @@ function CoverDevice(homeAssistantEntity) {
169460
169511
  const hasBatteryEntity = !!homeAssistantEntity.mapping?.batteryEntity;
169461
169512
  const hasBattery = hasBatteryAttr || hasBatteryEntity;
169462
169513
  if (hasBattery) {
169463
- logger170.info(
169514
+ logger171.info(
169464
169515
  `[${entityId}] Creating cover with PowerSource cluster, batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"}`
169465
169516
  );
169466
169517
  } else {
169467
- logger170.debug(
169518
+ logger171.debug(
169468
169519
  `[${entityId}] Creating cover without battery (batteryAttr=${hasBatteryAttr}, batteryEntity=${homeAssistantEntity.mapping?.batteryEntity ?? "none"})`
169469
169520
  );
169470
169521
  }
@@ -169480,7 +169531,7 @@ function CoverDevice(homeAssistantEntity) {
169480
169531
  // src/matter/behaviors/generic-switch-server.ts
169481
169532
  init_esm();
169482
169533
  init_home_assistant_entity_behavior();
169483
- var logger171 = Logger.get("GenericSwitchServer");
169534
+ var logger172 = Logger.get("GenericSwitchServer");
169484
169535
  var FeaturedBase6 = SwitchServer.with(
169485
169536
  "MomentarySwitch",
169486
169537
  "MomentarySwitchRelease",
@@ -169491,7 +169542,7 @@ var GenericSwitchServerBase = class extends FeaturedBase6 {
169491
169542
  await super.initialize();
169492
169543
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
169493
169544
  const entityId = homeAssistant.entityId;
169494
- logger171.debug(`[${entityId}] GenericSwitch initialized`);
169545
+ logger172.debug(`[${entityId}] GenericSwitch initialized`);
169495
169546
  this.reactTo(homeAssistant.onChange, this.handleEventChange);
169496
169547
  }
169497
169548
  handleEventChange() {
@@ -169502,7 +169553,7 @@ var GenericSwitchServerBase = class extends FeaturedBase6 {
169502
169553
  const eventType = attrs.event_type;
169503
169554
  if (!eventType) return;
169504
169555
  const entityId = homeAssistant.entityId;
169505
- logger171.debug(`[${entityId}] Event fired: ${eventType}`);
169556
+ logger172.debug(`[${entityId}] Event fired: ${eventType}`);
169506
169557
  this.triggerPress(eventType);
169507
169558
  }
169508
169559
  triggerPress(eventType) {
@@ -169816,7 +169867,7 @@ init_nodejs();
169816
169867
 
169817
169868
  // src/matter/behaviors/color-control-server.ts
169818
169869
  init_home_assistant_entity_behavior();
169819
- var logger172 = Logger.get("ColorControlServer");
169870
+ var logger173 = Logger.get("ColorControlServer");
169820
169871
  var optimisticColorState = /* @__PURE__ */ new Map();
169821
169872
  var OPTIMISTIC_TIMEOUT_MS3 = 3e3;
169822
169873
  var OPTIMISTIC_TOLERANCE2 = 5;
@@ -169849,7 +169900,7 @@ var ColorControlServerBase = class extends FeaturedBase7 {
169849
169900
  if (this.state.startUpColorTemperatureMireds == null) {
169850
169901
  this.state.startUpColorTemperatureMireds = defaultMireds;
169851
169902
  }
169852
- logger172.debug(
169903
+ logger173.debug(
169853
169904
  `initialize: set ColorTemperature defaults - min=${this.state.colorTempPhysicalMinMireds}, max=${this.state.colorTempPhysicalMaxMireds}, current=${this.state.colorTemperatureMireds}`
169854
169905
  );
169855
169906
  }
@@ -170289,7 +170340,7 @@ init_dist();
170289
170340
  // src/matter/behaviors/electrical-energy-measurement-server.ts
170290
170341
  init_esm();
170291
170342
  init_home_assistant_entity_behavior();
170292
- var logger173 = Logger.get("ElectricalEnergyMeasurementServer");
170343
+ var logger174 = Logger.get("ElectricalEnergyMeasurementServer");
170293
170344
  var FeaturedBase8 = ElectricalEnergyMeasurementServer.with("CumulativeEnergy", "ImportedEnergy");
170294
170345
  var ElectricalEnergyMeasurementServerBase = class extends FeaturedBase8 {
170295
170346
  async initialize() {
@@ -170298,7 +170349,7 @@ var ElectricalEnergyMeasurementServerBase = class extends FeaturedBase8 {
170298
170349
  const entityId = homeAssistant.entityId;
170299
170350
  const energyEntity = homeAssistant.state.mapping?.energyEntity;
170300
170351
  if (energyEntity) {
170301
- logger173.debug(
170352
+ logger174.debug(
170302
170353
  `[${entityId}] ElectricalEnergyMeasurement using mapped energy entity: ${energyEntity}`
170303
170354
  );
170304
170355
  }
@@ -170350,7 +170401,7 @@ var HaElectricalEnergyMeasurementServer = ElectricalEnergyMeasurementServerBase.
170350
170401
  // src/matter/behaviors/electrical-power-measurement-server.ts
170351
170402
  init_esm();
170352
170403
  init_home_assistant_entity_behavior();
170353
- var logger174 = Logger.get("ElectricalPowerMeasurementServer");
170404
+ var logger175 = Logger.get("ElectricalPowerMeasurementServer");
170354
170405
  var ElectricalPowerMeasurementServerBase = class extends ElectricalPowerMeasurementServer {
170355
170406
  async initialize() {
170356
170407
  await super.initialize();
@@ -170358,7 +170409,7 @@ var ElectricalPowerMeasurementServerBase = class extends ElectricalPowerMeasurem
170358
170409
  const entityId = homeAssistant.entityId;
170359
170410
  const powerEntity = homeAssistant.state.mapping?.powerEntity;
170360
170411
  if (powerEntity) {
170361
- logger174.debug(
170412
+ logger175.debug(
170362
170413
  `[${entityId}] ElectricalPowerMeasurement using mapped power entity: ${powerEntity}`
170363
170414
  );
170364
170415
  }
@@ -170454,7 +170505,7 @@ init_home_assistant_entity_behavior();
170454
170505
  // src/matter/behaviors/lock-server.ts
170455
170506
  init_esm();
170456
170507
  init_home_assistant_entity_behavior();
170457
- var logger175 = Logger.get("LockServer");
170508
+ var logger176 = Logger.get("LockServer");
170458
170509
  function hasStoredCredentialHelper(env, entityId) {
170459
170510
  try {
170460
170511
  const storage2 = env.get(LockCredentialStorage);
@@ -170612,7 +170663,7 @@ var LockServerWithPinBase = class extends PinCredentialBase {
170612
170663
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
170613
170664
  const action = this.state.config.lock(void 0, this.agent);
170614
170665
  const hasPinProvided = !!request.pinCode;
170615
- logger175.debug(
170666
+ logger176.debug(
170616
170667
  `lockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}`
170617
170668
  );
170618
170669
  if (request.pinCode) {
@@ -170625,12 +170676,12 @@ var LockServerWithPinBase = class extends PinCredentialBase {
170625
170676
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
170626
170677
  const action = this.state.config.unlock(void 0, this.agent);
170627
170678
  const hasPinProvided = !!request.pinCode;
170628
- logger175.debug(
170679
+ logger176.debug(
170629
170680
  `unlockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}`
170630
170681
  );
170631
170682
  if (this.state.requirePinForRemoteOperation) {
170632
170683
  if (!request.pinCode) {
170633
- logger175.info(
170684
+ logger176.info(
170634
170685
  `unlockDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
170635
170686
  );
170636
170687
  throw new StatusResponseError(
@@ -170640,12 +170691,12 @@ var LockServerWithPinBase = class extends PinCredentialBase {
170640
170691
  }
170641
170692
  const providedPin = new TextDecoder().decode(request.pinCode);
170642
170693
  if (!this.verifyStoredPin(homeAssistant.entityId, providedPin)) {
170643
- logger175.info(
170694
+ logger176.info(
170644
170695
  `unlockDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
170645
170696
  );
170646
170697
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
170647
170698
  }
170648
- logger175.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170699
+ logger176.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170649
170700
  action.data = { ...action.data, code: providedPin };
170650
170701
  }
170651
170702
  homeAssistant.callAction(action);
@@ -170806,7 +170857,7 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170806
170857
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
170807
170858
  const action = this.state.config.lock(void 0, this.agent);
170808
170859
  const hasPinProvided = !!request.pinCode;
170809
- logger175.debug(
170860
+ logger176.debug(
170810
170861
  `lockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}`
170811
170862
  );
170812
170863
  if (request.pinCode) {
@@ -170820,12 +170871,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170820
170871
  const unlatchConfig = this.state.config.unlatch;
170821
170872
  const action = unlatchConfig ? unlatchConfig(void 0, this.agent) : this.state.config.unlock(void 0, this.agent);
170822
170873
  const hasPinProvided = !!request.pinCode;
170823
- logger175.debug(
170874
+ logger176.debug(
170824
170875
  `unlockDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}, usingUnlatch: ${!!unlatchConfig}`
170825
170876
  );
170826
170877
  if (this.state.requirePinForRemoteOperation) {
170827
170878
  if (!request.pinCode) {
170828
- logger175.info(
170879
+ logger176.info(
170829
170880
  `unlockDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
170830
170881
  );
170831
170882
  throw new StatusResponseError(
@@ -170835,12 +170886,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170835
170886
  }
170836
170887
  const providedPin = new TextDecoder().decode(request.pinCode);
170837
170888
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
170838
- logger175.info(
170889
+ logger176.info(
170839
170890
  `unlockDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
170840
170891
  );
170841
170892
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
170842
170893
  }
170843
- logger175.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170894
+ logger176.debug(`unlockDoor PIN verified for ${homeAssistant.entityId}`);
170844
170895
  action.data = { ...action.data, code: providedPin };
170845
170896
  }
170846
170897
  homeAssistant.callAction(action);
@@ -170855,12 +170906,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170855
170906
  }
170856
170907
  const action = unlatchConfig(void 0, this.agent);
170857
170908
  const hasPinProvided = !!request.pinCode;
170858
- logger175.debug(
170909
+ logger176.debug(
170859
170910
  `unboltDoor called for ${homeAssistant.entityId}, PIN provided: ${hasPinProvided}, requirePin: ${this.state.requirePinForRemoteOperation}`
170860
170911
  );
170861
170912
  if (this.state.requirePinForRemoteOperation) {
170862
170913
  if (!request.pinCode) {
170863
- logger175.info(
170914
+ logger176.info(
170864
170915
  `unboltDoor REJECTED for ${homeAssistant.entityId} - no PIN provided`
170865
170916
  );
170866
170917
  throw new StatusResponseError(
@@ -170870,12 +170921,12 @@ var LockServerWithPinAndUnboltBase = class extends PinCredentialUnboltBase {
170870
170921
  }
170871
170922
  const providedPin = new TextDecoder().decode(request.pinCode);
170872
170923
  if (!verifyStoredPinHelper(this.env, homeAssistant.entityId, providedPin)) {
170873
- logger175.info(
170924
+ logger176.info(
170874
170925
  `unboltDoor REJECTED for ${homeAssistant.entityId} - invalid PIN`
170875
170926
  );
170876
170927
  throw new StatusResponseError("Invalid PIN code", StatusCode.Failure);
170877
170928
  }
170878
- logger175.debug(`unboltDoor PIN verified for ${homeAssistant.entityId}`);
170929
+ logger176.debug(`unboltDoor PIN verified for ${homeAssistant.entityId}`);
170879
170930
  action.data = { ...action.data, code: providedPin };
170880
170931
  }
170881
170932
  homeAssistant.callAction(action);
@@ -171045,7 +171096,7 @@ init_home_assistant_entity_behavior();
171045
171096
  init_dist();
171046
171097
  init_esm();
171047
171098
  init_home_assistant_entity_behavior();
171048
- var logger176 = Logger.get("MediaPlayerKeypadInputServer");
171099
+ var logger177 = Logger.get("MediaPlayerKeypadInputServer");
171049
171100
  var MediaPlayerKeypadInputServer = class extends KeypadInputServer {
171050
171101
  sendKey(request) {
171051
171102
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
@@ -171056,12 +171107,12 @@ var MediaPlayerKeypadInputServer = class extends KeypadInputServer {
171056
171107
  const features2 = attributes7.supported_features ?? 0;
171057
171108
  const action = this.mapKeyToAction(request.keyCode, features2);
171058
171109
  if (!action) {
171059
- logger176.debug(
171110
+ logger177.debug(
171060
171111
  `Unsupported key code ${request.keyCode} for ${homeAssistant.entityId}`
171061
171112
  );
171062
171113
  return { status: KeypadInput3.Status.UnsupportedKey };
171063
171114
  }
171064
- logger176.debug(
171115
+ logger177.debug(
171065
171116
  `sendKey(${request.keyCode}) \u2192 ${action} for ${homeAssistant.entityId}`
171066
171117
  );
171067
171118
  homeAssistant.callAction({ action });
@@ -171340,7 +171391,7 @@ init_home_assistant_entity_behavior();
171340
171391
  // src/matter/behaviors/speaker-level-control-server.ts
171341
171392
  init_esm();
171342
171393
  init_home_assistant_entity_behavior();
171343
- var logger177 = Logger.get("SpeakerLevelControlServer");
171394
+ var logger178 = Logger.get("SpeakerLevelControlServer");
171344
171395
  var optimisticLevelState2 = /* @__PURE__ */ new Map();
171345
171396
  var OPTIMISTIC_TIMEOUT_MS4 = 3e3;
171346
171397
  var OPTIMISTIC_TOLERANCE3 = 5;
@@ -171376,7 +171427,7 @@ var SpeakerLevelControlServerBase = class extends FeaturedBase9 {
171376
171427
  currentLevel = Math.min(Math.max(minLevel, currentLevel), maxLevel);
171377
171428
  }
171378
171429
  const entityId = this.agent.get(HomeAssistantEntityBehavior).entity.entity_id;
171379
- logger177.debug(
171430
+ logger178.debug(
171380
171431
  `[${entityId}] Volume update: HA=${currentLevelPercent != null ? Math.round(currentLevelPercent * 100) : "null"}% -> currentLevel=${currentLevel}`
171381
171432
  );
171382
171433
  const optimistic = optimisticLevelState2.get(entity.entity_id);
@@ -171424,7 +171475,7 @@ var SpeakerLevelControlServerBase = class extends FeaturedBase9 {
171424
171475
  const config10 = this.state.config;
171425
171476
  const entityId = homeAssistant.entity.entity_id;
171426
171477
  const levelPercent = level / 254;
171427
- logger177.debug(
171478
+ logger178.debug(
171428
171479
  `[${entityId}] Volume command: level=${level} -> HA volume_level=${levelPercent}`
171429
171480
  );
171430
171481
  const current = config10.getValuePercent(
@@ -172750,7 +172801,7 @@ var TvocConcentrationMeasurementServer = class extends TvocConcentrationMeasurem
172750
172801
  };
172751
172802
 
172752
172803
  // src/matter/endpoints/legacy/sensor/devices/tvoc-sensor.ts
172753
- var logger178 = Logger.get("TvocSensor");
172804
+ var logger179 = Logger.get("TvocSensor");
172754
172805
  function airQualityFromUgm3(value) {
172755
172806
  if (value <= 300) return AirQuality3.AirQualityEnum.Good;
172756
172807
  if (value <= 1e3) return AirQuality3.AirQualityEnum.Fair;
@@ -172788,17 +172839,17 @@ var TvocAirQualityServer = class extends TvocAirQualityServerBase {
172788
172839
  const attributes7 = entity.state.attributes;
172789
172840
  const deviceClass = attributes7.device_class;
172790
172841
  let airQuality = AirQuality3.AirQualityEnum.Unknown;
172791
- logger178.debug(
172842
+ logger179.debug(
172792
172843
  `[${entity.entity_id}] TVOC update: state="${state}", device_class="${deviceClass}"`
172793
172844
  );
172794
172845
  if (state != null && !Number.isNaN(+state)) {
172795
172846
  const value = +state;
172796
172847
  airQuality = deviceClass === SensorDeviceClass.volatile_organic_compounds ? airQualityFromUgm3(value) : airQualityFromPpb(value);
172797
- logger178.debug(
172848
+ logger179.debug(
172798
172849
  `[${entity.entity_id}] TVOC value=${value} (${deviceClass}) -> airQuality=${AirQuality3.AirQualityEnum[airQuality]}`
172799
172850
  );
172800
172851
  } else {
172801
- logger178.warn(
172852
+ logger179.warn(
172802
172853
  `[${entity.entity_id}] TVOC state not a valid number: "${state}"`
172803
172854
  );
172804
172855
  }
@@ -173011,7 +173062,7 @@ init_home_assistant_entity_behavior();
173011
173062
  // src/matter/behaviors/pm25-concentration-measurement-server.ts
173012
173063
  init_esm();
173013
173064
  init_home_assistant_entity_behavior();
173014
- var logger179 = Logger.get("Pm25ConcentrationMeasurementServer");
173065
+ var logger180 = Logger.get("Pm25ConcentrationMeasurementServer");
173015
173066
  var Pm25ConcentrationMeasurementServerBase = Pm25ConcentrationMeasurementServer.with(
173016
173067
  ConcentrationMeasurement3.Feature.NumericMeasurement
173017
173068
  );
@@ -173035,11 +173086,11 @@ var Pm25ConcentrationMeasurementServer2 = class extends Pm25ConcentrationMeasure
173035
173086
  if (this.state.measurementMedium === void 0) {
173036
173087
  this.state.measurementMedium = ConcentrationMeasurement3.MeasurementMedium.Air;
173037
173088
  }
173038
- logger179.debug(
173089
+ logger180.debug(
173039
173090
  "Pm25ConcentrationMeasurementServer: before super.initialize()"
173040
173091
  );
173041
173092
  await super.initialize();
173042
- logger179.debug(
173093
+ logger180.debug(
173043
173094
  "Pm25ConcentrationMeasurementServer: after super.initialize()"
173044
173095
  );
173045
173096
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
@@ -173062,7 +173113,7 @@ var Pm25ConcentrationMeasurementServer2 = class extends Pm25ConcentrationMeasure
173062
173113
  };
173063
173114
 
173064
173115
  // src/matter/endpoints/legacy/sensor/devices/pm25-sensor.ts
173065
- var logger180 = Logger.get("Pm25AirQualityServer");
173116
+ var logger181 = Logger.get("Pm25AirQualityServer");
173066
173117
  var Pm25AirQualityServerBase = AirQualityServer.with(
173067
173118
  AirQuality3.Feature.Fair,
173068
173119
  AirQuality3.Feature.Moderate,
@@ -173074,9 +173125,9 @@ var Pm25AirQualityServer = class extends Pm25AirQualityServerBase {
173074
173125
  if (this.state.airQuality === void 0) {
173075
173126
  this.state.airQuality = AirQuality3.AirQualityEnum.Unknown;
173076
173127
  }
173077
- logger180.debug("Pm25AirQualityServer: before super.initialize()");
173128
+ logger181.debug("Pm25AirQualityServer: before super.initialize()");
173078
173129
  await super.initialize();
173079
- logger180.debug("Pm25AirQualityServer: after super.initialize()");
173130
+ logger181.debug("Pm25AirQualityServer: after super.initialize()");
173080
173131
  const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
173081
173132
  this.update(homeAssistant.entity);
173082
173133
  this.reactTo(homeAssistant.onChange, this.update);
@@ -173431,7 +173482,7 @@ init_home_assistant_entity_behavior();
173431
173482
  init_dist();
173432
173483
  init_esm();
173433
173484
  init_home_assistant_entity_behavior();
173434
- var logger181 = Logger.get("VacuumIdentifyServer");
173485
+ var logger182 = Logger.get("VacuumIdentifyServer");
173435
173486
  var VacuumIdentifyServer = class extends IdentifyServer2 {
173436
173487
  triggerEffect(effect) {
173437
173488
  this.#locate("triggerEffect");
@@ -173448,11 +173499,11 @@ var VacuumIdentifyServer = class extends IdentifyServer2 {
173448
173499
  const features2 = homeAssistant.entity.state.attributes.supported_features ?? 0;
173449
173500
  const hasLocate = testBit(features2, VacuumDeviceFeature.LOCATE);
173450
173501
  if (!hasLocate) {
173451
- logger181.warn(
173502
+ logger182.warn(
173452
173503
  `${source} for ${homeAssistant.entityId} \u2014 LOCATE not in supported_features (${features2}), calling vacuum.locate anyway`
173453
173504
  );
173454
173505
  } else {
173455
- logger181.info(`${source} \u2192 vacuum.locate for ${homeAssistant.entityId}`);
173506
+ logger182.info(`${source} \u2192 vacuum.locate for ${homeAssistant.entityId}`);
173456
173507
  }
173457
173508
  homeAssistant.callAction({ action: "vacuum.locate" });
173458
173509
  }
@@ -173743,11 +173794,11 @@ init_esm();
173743
173794
 
173744
173795
  // src/matter/behaviors/service-area-server.ts
173745
173796
  init_esm();
173746
- var logger182 = Logger.get("ServiceAreaServer");
173797
+ var logger183 = Logger.get("ServiceAreaServer");
173747
173798
  var ServiceAreaServerBase = class extends ServiceAreaBehavior {
173748
173799
  selectAreas(request) {
173749
173800
  const { newAreas } = request;
173750
- logger182.info(
173801
+ logger183.info(
173751
173802
  `ServiceArea selectAreas called with: ${JSON.stringify(newAreas)}`
173752
173803
  );
173753
173804
  const uniqueAreas = [...new Set(newAreas)];
@@ -173756,14 +173807,14 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
173756
173807
  (id) => !supportedAreaIds.includes(id)
173757
173808
  );
173758
173809
  if (invalidAreas.length > 0) {
173759
- logger182.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
173810
+ logger183.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
173760
173811
  return {
173761
173812
  status: ServiceArea3.SelectAreasStatus.UnsupportedArea,
173762
173813
  statusText: `Invalid area IDs: ${invalidAreas.join(", ")}`
173763
173814
  };
173764
173815
  }
173765
173816
  this.state.selectedAreas = uniqueAreas;
173766
- logger182.info(
173817
+ logger183.info(
173767
173818
  `ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
173768
173819
  );
173769
173820
  return {
@@ -173784,7 +173835,7 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
173784
173835
  ServiceAreaServerBase2.State = State;
173785
173836
  })(ServiceAreaServerBase || (ServiceAreaServerBase = {}));
173786
173837
  function ServiceAreaServer2(initialState) {
173787
- logger182.info(
173838
+ logger183.info(
173788
173839
  `Creating ServiceAreaServer with ${initialState.supportedAreas.length} areas`
173789
173840
  );
173790
173841
  return ServiceAreaServerBase.set({
@@ -173797,7 +173848,7 @@ var ServiceAreaWithMaps = ServiceAreaBehavior.with(ServiceArea3.Feature.Maps);
173797
173848
  var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
173798
173849
  selectAreas(request) {
173799
173850
  const { newAreas } = request;
173800
- logger182.info(
173851
+ logger183.info(
173801
173852
  `ServiceArea selectAreas called with: ${JSON.stringify(newAreas)}`
173802
173853
  );
173803
173854
  const uniqueAreas = [...new Set(newAreas)];
@@ -173806,14 +173857,14 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
173806
173857
  (id) => !supportedAreaIds.includes(id)
173807
173858
  );
173808
173859
  if (invalidAreas.length > 0) {
173809
- logger182.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
173860
+ logger183.warn(`Invalid area IDs requested: ${invalidAreas.join(", ")}`);
173810
173861
  return {
173811
173862
  status: ServiceArea3.SelectAreasStatus.UnsupportedArea,
173812
173863
  statusText: `Invalid area IDs: ${invalidAreas.join(", ")}`
173813
173864
  };
173814
173865
  }
173815
173866
  this.state.selectedAreas = uniqueAreas;
173816
- logger182.info(
173867
+ logger183.info(
173817
173868
  `ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
173818
173869
  );
173819
173870
  return {
@@ -173834,14 +173885,14 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
173834
173885
  ServiceAreaServerWithMapsBase2.State = State;
173835
173886
  })(ServiceAreaServerWithMapsBase || (ServiceAreaServerWithMapsBase = {}));
173836
173887
  function ServiceAreaServerWithMaps(initialState) {
173837
- logger182.info(
173888
+ logger183.info(
173838
173889
  `Creating ServiceAreaServer with Maps: ${initialState.supportedAreas.length} areas, ${initialState.supportedMaps.length} maps`
173839
173890
  );
173840
173891
  for (const map of initialState.supportedMaps) {
173841
173892
  const areaCount = initialState.supportedAreas.filter(
173842
173893
  (a) => a.mapId === map.mapId
173843
173894
  ).length;
173844
- logger182.info(` Map ${map.mapId}: "${map.name}" (${areaCount} areas)`);
173895
+ logger183.info(` Map ${map.mapId}: "${map.name}" (${areaCount} areas)`);
173845
173896
  }
173846
173897
  return ServiceAreaServerWithMapsBase.set({
173847
173898
  supportedAreas: initialState.supportedAreas,
@@ -173852,7 +173903,7 @@ function ServiceAreaServerWithMaps(initialState) {
173852
173903
  }
173853
173904
 
173854
173905
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-service-area-server.ts
173855
- var logger183 = Logger.get("VacuumServiceAreaServer");
173906
+ var logger184 = Logger.get("VacuumServiceAreaServer");
173856
173907
  function toAreaId(roomId) {
173857
173908
  if (typeof roomId === "number") {
173858
173909
  return roomId;
@@ -173931,13 +173982,13 @@ function createVacuumServiceAreaServer(attributes7, roomEntities, includeUnnamed
173931
173982
  let rooms;
173932
173983
  if (roomEntities && roomEntities.length > 0) {
173933
173984
  rooms = buttonEntitiesToRooms(roomEntities, attributes7);
173934
- logger183.info(
173985
+ logger184.info(
173935
173986
  `Using ${rooms.length} button entities as rooms: ${rooms.map((r) => r.name).join(", ")}`
173936
173987
  );
173937
173988
  } else {
173938
173989
  rooms = parseVacuumRooms(attributes7, includeUnnamedRooms);
173939
173990
  if (rooms.length > 0) {
173940
- logger183.info(
173991
+ logger184.info(
173941
173992
  `Using ${rooms.length} rooms from attributes: ${rooms.map((r) => r.name).join(", ")}`
173942
173993
  );
173943
173994
  }
@@ -173991,7 +174042,7 @@ function createCustomServiceAreaServer(customAreas) {
173991
174042
  landmarkInfo: null
173992
174043
  }
173993
174044
  }));
173994
- logger183.info(
174045
+ logger184.info(
173995
174046
  `Using ${customAreas.length} custom service areas: ${customAreas.map((a) => a.name).join(", ")}`
173996
174047
  );
173997
174048
  return ServiceAreaServer2({
@@ -174002,7 +174053,7 @@ function createCustomServiceAreaServer(customAreas) {
174002
174053
  }
174003
174054
 
174004
174055
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-run-mode-server.ts
174005
- var logger184 = Logger.get("VacuumRvcRunModeServer");
174056
+ var logger185 = Logger.get("VacuumRvcRunModeServer");
174006
174057
  function buildSupportedModes2(attributes7, includeUnnamedRooms = false, customAreas) {
174007
174058
  const modes = [
174008
174059
  {
@@ -174048,12 +174099,12 @@ function handleCustomServiceAreas(selectedAreas, customAreas, homeAssistant, ser
174048
174099
  const matched = selectedAreas.map((areaId) => customAreas[areaId - 1]).filter(Boolean);
174049
174100
  serviceArea.state.selectedAreas = [];
174050
174101
  if (matched.length === 0) {
174051
- logger184.warn(
174102
+ logger185.warn(
174052
174103
  `Custom service areas: no match for selected IDs ${selectedAreas.join(", ")}`
174053
174104
  );
174054
174105
  return { action: "vacuum.start" };
174055
174106
  }
174056
- logger184.info(
174107
+ logger185.info(
174057
174108
  `Custom service areas: calling ${matched.length} service(s): ${matched.map((a) => `${a.service} (${a.name})`).join(", ")}`
174058
174109
  );
174059
174110
  for (let i = 1; i < matched.length; i++) {
@@ -174082,7 +174133,7 @@ var vacuumRvcRunModeConfig = {
174082
174133
  VacuumState.mop_cleaning
174083
174134
  ];
174084
174135
  const isCleaning = cleaningStates.includes(state);
174085
- logger184.debug(
174136
+ logger185.debug(
174086
174137
  `Vacuum state: "${state}", isCleaning: ${isCleaning}, currentMode: ${isCleaning ? "Cleaning" : "Idle"}`
174087
174138
  );
174088
174139
  return isCleaning ? 1 /* Cleaning */ : 0 /* Idle */;
@@ -174121,7 +174172,7 @@ var vacuumRvcRunModeConfig = {
174121
174172
  }
174122
174173
  }
174123
174174
  if (buttonEntityIds.length > 0) {
174124
- logger184.info(
174175
+ logger185.info(
174125
174176
  `Roborock: Pressing button entities for selected rooms: ${buttonEntityIds.join(", ")}`
174126
174177
  );
174127
174178
  serviceArea.state.selectedAreas = [];
@@ -174150,14 +174201,14 @@ var vacuumRvcRunModeConfig = {
174150
174201
  }
174151
174202
  }
174152
174203
  if (roomIds.length > 0) {
174153
- logger184.info(
174204
+ logger185.info(
174154
174205
  `Starting cleaning with selected areas: ${roomIds.join(", ")}`
174155
174206
  );
174156
174207
  serviceArea.state.selectedAreas = [];
174157
174208
  const vacuumEntityId = homeAssistant.entityId;
174158
174209
  if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
174159
174210
  const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
174160
- logger184.info(
174211
+ logger185.info(
174161
174212
  `Valetudo vacuum: Using mqtt.publish segment_cleanup for rooms: ${roomIds.join(", ")}`
174162
174213
  );
174163
174214
  return {
@@ -174177,7 +174228,7 @@ var vacuumRvcRunModeConfig = {
174177
174228
  if (targetMapName) {
174178
174229
  const vacName = vacuumEntityId.replace("vacuum.", "");
174179
174230
  const selectedMapEntity = `select.${vacName}_selected_map`;
174180
- logger184.info(
174231
+ logger185.info(
174181
174232
  `Dreame multi-floor: switching to map "${targetMapName}" via ${selectedMapEntity}`
174182
174233
  );
174183
174234
  homeAssistant.callAction({
@@ -174204,7 +174255,7 @@ var vacuumRvcRunModeConfig = {
174204
174255
  }
174205
174256
  if (isEcovacsVacuum(attributes7)) {
174206
174257
  const roomIdStr = roomIds.join(",");
174207
- logger184.info(
174258
+ logger185.info(
174208
174259
  `Ecovacs vacuum: Using spot_area for rooms: ${roomIdStr}`
174209
174260
  );
174210
174261
  return {
@@ -174219,14 +174270,14 @@ var vacuumRvcRunModeConfig = {
174219
174270
  }
174220
174271
  };
174221
174272
  }
174222
- logger184.warn(
174273
+ logger185.warn(
174223
174274
  `Room cleaning via send_command not supported for this vacuum type. Rooms: ${roomIds.join(", ")}. Falling back to vacuum.start`
174224
174275
  );
174225
174276
  }
174226
174277
  }
174227
174278
  } catch {
174228
174279
  }
174229
- logger184.info("Starting regular cleaning (no areas selected)");
174280
+ logger185.info("Starting regular cleaning (no areas selected)");
174230
174281
  return { action: "vacuum.start" };
174231
174282
  },
174232
174283
  returnToBase: () => ({ action: "vacuum.return_to_base" }),
@@ -174241,7 +174292,7 @@ var vacuumRvcRunModeConfig = {
174241
174292
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
174242
174293
  const entity = homeAssistant.entity;
174243
174294
  const attributes7 = entity.state.attributes;
174244
- logger184.info(`cleanRoom called: roomMode=${roomMode}`);
174295
+ logger185.info(`cleanRoom called: roomMode=${roomMode}`);
174245
174296
  const customAreas = homeAssistant.state.mapping?.customServiceAreas;
174246
174297
  if (customAreas && customAreas.length > 0) {
174247
174298
  const sorted = [...customAreas].sort(
@@ -174250,7 +174301,7 @@ var vacuumRvcRunModeConfig = {
174250
174301
  const areaIndex = roomMode - ROOM_MODE_BASE2 - 1;
174251
174302
  if (areaIndex >= 0 && areaIndex < sorted.length) {
174252
174303
  const area = sorted[areaIndex];
174253
- logger184.info(
174304
+ logger185.info(
174254
174305
  `cleanRoom: custom service area "${area.name}" \u2192 ${area.service}`
174255
174306
  );
174256
174307
  return {
@@ -174262,7 +174313,7 @@ var vacuumRvcRunModeConfig = {
174262
174313
  }
174263
174314
  const rooms = parseVacuumRooms(attributes7);
174264
174315
  const numericIdFromMode = getRoomIdFromMode(roomMode);
174265
- logger184.info(
174316
+ logger185.info(
174266
174317
  `cleanRoom: numericIdFromMode=${numericIdFromMode}, available rooms: ${JSON.stringify(rooms.map((r) => ({ id: r.id, name: r.name, modeValue: getRoomModeValue(r) })))}`
174267
174318
  );
174268
174319
  const room = rooms.find((r) => getRoomModeValue(r) === roomMode);
@@ -174271,7 +174322,7 @@ var vacuumRvcRunModeConfig = {
174271
174322
  const vacuumEntityId = entity.entity_id;
174272
174323
  if (vacuumEntityId.startsWith("vacuum.valetudo_")) {
174273
174324
  const identifier = vacuumEntityId.replace(/^vacuum\.valetudo_/, "");
174274
- logger184.info(
174325
+ logger185.info(
174275
174326
  `Valetudo vacuum: Using mqtt.publish segment_cleanup for room ${room.name} (id: ${commandId3})`
174276
174327
  );
174277
174328
  return {
@@ -174291,7 +174342,7 @@ var vacuumRvcRunModeConfig = {
174291
174342
  if (room.mapName) {
174292
174343
  const vacuumName = vacuumEntityId.replace("vacuum.", "");
174293
174344
  const selectedMapEntity = `select.${vacuumName}_selected_map`;
174294
- logger184.info(
174345
+ logger185.info(
174295
174346
  `Dreame multi-floor: switching to map "${room.mapName}" via ${selectedMapEntity}`
174296
174347
  );
174297
174348
  homeAssistant.callAction({
@@ -174300,7 +174351,7 @@ var vacuumRvcRunModeConfig = {
174300
174351
  data: { option: room.mapName }
174301
174352
  });
174302
174353
  }
174303
- logger184.debug(
174354
+ logger185.debug(
174304
174355
  `Dreame vacuum detected, using dreame_vacuum.vacuum_clean_segment for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
174305
174356
  );
174306
174357
  return {
@@ -174311,7 +174362,7 @@ var vacuumRvcRunModeConfig = {
174311
174362
  };
174312
174363
  }
174313
174364
  if (isRoborockVacuum(attributes7) || isXiaomiMiotVacuum(attributes7)) {
174314
- logger184.debug(
174365
+ logger185.debug(
174315
174366
  `Using vacuum.send_command with app_segment_clean for room ${room.name} (commandId: ${commandId3}, id: ${room.id})`
174316
174367
  );
174317
174368
  return {
@@ -174324,7 +174375,7 @@ var vacuumRvcRunModeConfig = {
174324
174375
  }
174325
174376
  if (isEcovacsVacuum(attributes7)) {
174326
174377
  const roomIdStr = String(commandId3);
174327
- logger184.info(
174378
+ logger185.info(
174328
174379
  `Ecovacs vacuum: Using spot_area for room ${room.name} (id: ${roomIdStr})`
174329
174380
  );
174330
174381
  return {
@@ -174339,7 +174390,7 @@ var vacuumRvcRunModeConfig = {
174339
174390
  }
174340
174391
  };
174341
174392
  }
174342
- logger184.warn(
174393
+ logger185.warn(
174343
174394
  `Room cleaning via send_command not supported for this vacuum type. Room: ${room.name} (id=${commandId3}). Falling back to vacuum.start`
174344
174395
  );
174345
174396
  }
@@ -174355,20 +174406,20 @@ function createVacuumRvcRunModeServer(attributes7, includeUnnamedRooms = false,
174355
174406
  includeUnnamedRooms,
174356
174407
  customAreas
174357
174408
  );
174358
- logger184.info(
174409
+ logger185.info(
174359
174410
  `Creating VacuumRvcRunModeServer with ${rooms.length} rooms, ${supportedModes.length} total modes`
174360
174411
  );
174361
174412
  if (rooms.length > 0) {
174362
- logger184.info(`Rooms found: ${rooms.map((r) => r.name).join(", ")}`);
174413
+ logger185.info(`Rooms found: ${rooms.map((r) => r.name).join(", ")}`);
174363
174414
  }
174364
174415
  if (filteredCount > 0) {
174365
174416
  const filtered = allRooms.filter((r) => !rooms.some((x) => x.id === r.id));
174366
- logger184.info(
174417
+ logger185.info(
174367
174418
  `Filtered out ${filteredCount} unnamed room(s): ${filtered.map((r) => r.name).join(", ")}`
174368
174419
  );
174369
174420
  }
174370
174421
  if (allRooms.length === 0) {
174371
- logger184.debug(
174422
+ logger185.debug(
174372
174423
  `No rooms found. Attributes: rooms=${JSON.stringify(attributes7.rooms)}, segments=${JSON.stringify(attributes7.segments)}, room_list=${attributes7.room_list}`
174373
174424
  );
174374
174425
  }
@@ -174426,7 +174477,7 @@ init_rvc_clean_mode();
174426
174477
 
174427
174478
  // src/matter/behaviors/rvc-clean-mode-server.ts
174428
174479
  init_home_assistant_entity_behavior();
174429
- var logger185 = Logger.get("RvcCleanModeServerBase");
174480
+ var logger186 = Logger.get("RvcCleanModeServerBase");
174430
174481
  var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeServer {
174431
174482
  // Pending mode from a recent changeToMode command.
174432
174483
  // Prevents stale HA state (from a different entity like select.xxx)
@@ -174469,14 +174520,14 @@ var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeS
174469
174520
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
174470
174521
  const { newMode } = request;
174471
174522
  if (newMode !== this.state.currentMode && !this.state.supportedModes.some((m) => m.mode === newMode)) {
174472
- logger185.warn(`changeToMode(${newMode}) rejected: unsupported mode`);
174523
+ logger186.warn(`changeToMode(${newMode}) rejected: unsupported mode`);
174473
174524
  return {
174474
174525
  status: ModeBase3.ModeChangeStatus.UnsupportedMode,
174475
174526
  statusText: `Unsupported mode: ${newMode}`
174476
174527
  };
174477
174528
  }
174478
174529
  const modeLabel = this.state.supportedModes.find((m) => m.mode === newMode);
174479
- logger185.info(
174530
+ logger186.info(
174480
174531
  `changeToMode(${newMode}) "${modeLabel?.label ?? "unknown"}" for ${homeAssistant.entityId}`
174481
174532
  );
174482
174533
  this.pendingMode = newMode;
@@ -174484,7 +174535,7 @@ var RvcCleanModeServerBase = class _RvcCleanModeServerBase extends RvcCleanModeS
174484
174535
  this.state.currentMode = newMode;
174485
174536
  const action = this.state.config.setCleanMode(newMode, this.agent);
174486
174537
  if (action) {
174487
- logger185.info(
174538
+ logger186.info(
174488
174539
  `changeToMode: dispatching action ${action.action} \u2192 ${action.target ?? homeAssistant.entityId}`
174489
174540
  );
174490
174541
  homeAssistant.callAction(action);
@@ -174517,7 +174568,7 @@ function RvcCleanModeServer2(config10, initialState) {
174517
174568
  }
174518
174569
 
174519
174570
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-clean-mode-server.ts
174520
- var logger186 = Logger.get("VacuumRvcCleanModeServer");
174571
+ var logger187 = Logger.get("VacuumRvcCleanModeServer");
174521
174572
  var MODE_VACUUM = 0;
174522
174573
  var MODE_VACUUM_AND_MOP = 1;
174523
174574
  var MODE_MOP = 2;
@@ -174816,7 +174867,7 @@ function findMatchingCleanOption(ct, availableOptions) {
174816
174867
  if (match) return match;
174817
174868
  }
174818
174869
  }
174819
- logger186.warn(
174870
+ logger187.warn(
174820
174871
  `No match for ${CLEAN_TYPE_LABELS[ct]} in [${availableOptions.join(", ")}]`
174821
174872
  );
174822
174873
  return aliases[0];
@@ -174825,7 +174876,7 @@ function buildCleaningModeAction(targetCleanType, agent) {
174825
174876
  const selectEntityId = getCleaningModeSelectEntity(agent);
174826
174877
  const { options } = readSelectEntity(selectEntityId, agent);
174827
174878
  const optionToUse = findMatchingCleanOption(targetCleanType, options);
174828
- logger186.info(
174879
+ logger187.info(
174829
174880
  `Switching cleaning mode to: ${optionToUse} via ${selectEntityId}`
174830
174881
  );
174831
174882
  return {
@@ -174914,7 +174965,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
174914
174965
  }
174915
174966
  }
174916
174967
  if (speedMode !== void 0) {
174917
- logger186.debug(
174968
+ logger187.debug(
174918
174969
  `Current mode: Vacuum + fan_speed="${speedState}" -> mode ${speedMode}`
174919
174970
  );
174920
174971
  return speedMode;
@@ -174935,7 +174986,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
174935
174986
  }
174936
174987
  }
174937
174988
  if (mopMode !== void 0) {
174938
- logger186.debug(
174989
+ logger187.debug(
174939
174990
  `Current mode: Mop + intensity="${state}" -> mode ${mopMode}`
174940
174991
  );
174941
174992
  return mopMode;
@@ -174953,14 +175004,14 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
174953
175004
  const homeAssistant = agent.get(HomeAssistantEntityBehavior);
174954
175005
  const vacuumEntityId = homeAssistant.entityId;
174955
175006
  const mapping = homeAssistant.state.mapping;
174956
- logger186.info(
175007
+ logger187.info(
174957
175008
  `setCleanMode(${mode}) for ${vacuumEntityId} \u2014 suctionEntity=${mapping?.suctionLevelEntity ?? "none"}, mopEntity=${mapping?.mopIntensityEntity ?? "none"}, fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])}, customTags=${JSON.stringify(customFanSpeedTags ?? {})}`
174958
175009
  );
174959
175010
  if (mopIntensityList && mopIntensityList.length > 0 && isMopIntensityMode(mode)) {
174960
175011
  const mopIndex = mode - MOP_INTENSITY_MODE_BASE;
174961
175012
  const mopName = mopIntensityList[mopIndex];
174962
175013
  if (!mopName) {
174963
- logger186.warn(`Invalid mop intensity mode index: ${mopIndex}`);
175014
+ logger187.warn(`Invalid mop intensity mode index: ${mopIndex}`);
174964
175015
  return void 0;
174965
175016
  }
174966
175017
  if (hasCleanTypes) {
@@ -174973,18 +175024,18 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
174973
175024
  mapping.mopIntensityEntity,
174974
175025
  agent
174975
175026
  );
174976
- logger186.info(
175027
+ logger187.info(
174977
175028
  `Mop intensity entity ${mapping.mopIntensityEntity}: current="${state}", options=${JSON.stringify(options ?? [])}`
174978
175029
  );
174979
175030
  let option = matchMopIntensityOption(mopName, options);
174980
175031
  if (!option && options && mopIndex < options.length) {
174981
175032
  option = options[mopIndex];
174982
- logger186.info(
175033
+ logger187.info(
174983
175034
  `Positional match for mop "${mopName}" -> "${option}" (index ${mopIndex})`
174984
175035
  );
174985
175036
  }
174986
175037
  if (option) {
174987
- logger186.info(
175038
+ logger187.info(
174988
175039
  `Setting mop intensity to: ${option} via ${mapping.mopIntensityEntity}`
174989
175040
  );
174990
175041
  return {
@@ -174993,11 +175044,11 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
174993
175044
  target: mapping.mopIntensityEntity
174994
175045
  };
174995
175046
  }
174996
- logger186.warn(
175047
+ logger187.warn(
174997
175048
  `No match for mop intensity "${mopName}" in options: [${(options ?? []).join(", ")}]`
174998
175049
  );
174999
175050
  } else {
175000
- logger186.warn(
175051
+ logger187.warn(
175001
175052
  `Mop intensity mode ${mode} requested but no mopIntensityEntity configured`
175002
175053
  );
175003
175054
  }
@@ -175007,7 +175058,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
175007
175058
  const fanSpeedIndex = mode - FAN_SPEED_MODE_BASE;
175008
175059
  const fanSpeedName = fanSpeedList[fanSpeedIndex];
175009
175060
  if (!fanSpeedName) {
175010
- logger186.warn(`Invalid fan speed mode index: ${fanSpeedIndex}`);
175061
+ logger187.warn(`Invalid fan speed mode index: ${fanSpeedIndex}`);
175011
175062
  return void 0;
175012
175063
  }
175013
175064
  if (mapping?.suctionLevelEntity) {
@@ -175020,7 +175071,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
175020
175071
  mapping.suctionLevelEntity,
175021
175072
  agent
175022
175073
  );
175023
- logger186.info(
175074
+ logger187.info(
175024
175075
  `Suction entity ${mapping.suctionLevelEntity}: current="${state}", options=${JSON.stringify(options ?? [])}`
175025
175076
  );
175026
175077
  let option = matchFanSpeedOption(
@@ -175030,12 +175081,12 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
175030
175081
  );
175031
175082
  if (!option && options && fanSpeedIndex < options.length) {
175032
175083
  option = options[fanSpeedIndex];
175033
- logger186.info(
175084
+ logger187.info(
175034
175085
  `Positional match for fan "${fanSpeedName}" -> "${option}" (index ${fanSpeedIndex})`
175035
175086
  );
175036
175087
  }
175037
175088
  if (option) {
175038
- logger186.info(
175089
+ logger187.info(
175039
175090
  `Setting suction to: ${option} via ${mapping.suctionLevelEntity}`
175040
175091
  );
175041
175092
  return {
@@ -175044,7 +175095,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
175044
175095
  target: mapping.suctionLevelEntity
175045
175096
  };
175046
175097
  }
175047
- logger186.warn(
175098
+ logger187.warn(
175048
175099
  `No match for fan speed "${fanSpeedName}" in suction options: [${(options ?? []).join(", ")}]`
175049
175100
  );
175050
175101
  return void 0;
@@ -175054,7 +175105,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
175054
175105
  buildCleaningModeAction(0 /* Sweeping */, agent)
175055
175106
  );
175056
175107
  }
175057
- logger186.info(
175108
+ logger187.info(
175058
175109
  `Setting fan speed to: ${fanSpeedName} via vacuum.set_fan_speed`
175059
175110
  );
175060
175111
  return {
@@ -175064,7 +175115,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
175064
175115
  };
175065
175116
  }
175066
175117
  if (!hasCleanTypes) {
175067
- logger186.debug(
175118
+ logger187.debug(
175068
175119
  `Ignoring cleaning type change (mode=${mode}): no cleaning mode entity`
175069
175120
  );
175070
175121
  return void 0;
@@ -175076,7 +175127,7 @@ function createCleanModeConfig(fanSpeedList, mopIntensityList, cleaningModeOptio
175076
175127
  agent
175077
175128
  );
175078
175129
  const optionToUse = findMatchingCleanOption(cleanType, availableOptions);
175079
- logger186.info(
175130
+ logger187.info(
175080
175131
  `Setting cleaning mode to: ${optionToUse} (mode=${mode}) via ${selectEntityId}`
175081
175132
  );
175082
175133
  return {
@@ -175094,10 +175145,10 @@ function createVacuumRvcCleanModeServer(_attributes, fanSpeedList, mopIntensityL
175094
175145
  cleaningModeOptions,
175095
175146
  customFanSpeedTags
175096
175147
  );
175097
- logger186.info(
175148
+ logger187.info(
175098
175149
  `Creating VacuumRvcCleanModeServer with ${supportedModes.length} modes (fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])}, cleaningModeOptions=${JSON.stringify(cleaningModeOptions ?? [])}, customTags=${JSON.stringify(customFanSpeedTags ?? {})})`
175099
175150
  );
175100
- logger186.info(
175151
+ logger187.info(
175101
175152
  `Modes: ${supportedModes.map((m) => `${m.mode}:${m.label}[${m.modeTags.map((t) => t.value).join(",")}]`).join(", ")}`
175102
175153
  );
175103
175154
  const initialState = {
@@ -175175,7 +175226,7 @@ init_rvc_operational_state();
175175
175226
  init_home_assistant_entity_behavior();
175176
175227
  var OperationalState4 = RvcOperationalState3.OperationalState;
175177
175228
  var ErrorState = RvcOperationalState3.ErrorState;
175178
- var logger187 = Logger.get("RvcOperationalStateServer");
175229
+ var logger188 = Logger.get("RvcOperationalStateServer");
175179
175230
  var activeStates = /* @__PURE__ */ new Set([
175180
175231
  OperationalState4.Running,
175181
175232
  OperationalState4.SeekingCharger
@@ -175217,7 +175268,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
175217
175268
  }
175218
175269
  });
175219
175270
  if (activeStates.has(previousState) && !activeStates.has(newState)) {
175220
- logger187.info(
175271
+ logger188.info(
175221
175272
  `Operation completed: ${OperationalState4[previousState]} -> ${OperationalState4[newState]}`
175222
175273
  );
175223
175274
  try {
@@ -175230,7 +175281,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
175230
175281
  this.context
175231
175282
  );
175232
175283
  } catch (e) {
175233
- logger187.debug("Failed to emit operationCompletion event:", e);
175284
+ logger188.debug("Failed to emit operationCompletion event:", e);
175234
175285
  }
175235
175286
  }
175236
175287
  }
@@ -175265,7 +175316,7 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
175265
175316
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
175266
175317
  homeAssistant.callAction(goHomeAction(void 0, this.agent));
175267
175318
  } else {
175268
- logger187.warn("GoHome command received but no goHome action configured");
175319
+ logger188.warn("GoHome command received but no goHome action configured");
175269
175320
  }
175270
175321
  return {
175271
175322
  commandResponseState: {
@@ -175285,7 +175336,7 @@ function RvcOperationalStateServer2(config10) {
175285
175336
  }
175286
175337
 
175287
175338
  // src/matter/endpoints/legacy/vacuum/behaviors/vacuum-rvc-operational-state-server.ts
175288
- var logger188 = Logger.get("VacuumRvcOperationalStateServer");
175339
+ var logger189 = Logger.get("VacuumRvcOperationalStateServer");
175289
175340
  function isCharging(entity) {
175290
175341
  const attrs = entity.attributes;
175291
175342
  if (attrs.battery_icon?.includes("charging")) return true;
@@ -175327,16 +175378,16 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
175327
175378
  operationalState = RvcOperationalState3.OperationalState.Error;
175328
175379
  } else {
175329
175380
  if (state.toLowerCase().includes("clean")) {
175330
- logger188.info(
175381
+ logger189.info(
175331
175382
  `Unknown vacuum state "${state}" contains 'clean', treating as Running`
175332
175383
  );
175333
175384
  operationalState = RvcOperationalState3.OperationalState.Running;
175334
175385
  } else {
175335
- logger188.info(`Unknown vacuum state "${state}", treating as Paused`);
175386
+ logger189.info(`Unknown vacuum state "${state}", treating as Paused`);
175336
175387
  operationalState = RvcOperationalState3.OperationalState.Paused;
175337
175388
  }
175338
175389
  }
175339
- logger188.debug(
175390
+ logger189.debug(
175340
175391
  `Vacuum operationalState: "${state}" -> ${RvcOperationalState3.OperationalState[operationalState]}`
175341
175392
  );
175342
175393
  return operationalState;
@@ -175357,7 +175408,7 @@ var VacuumRvcOperationalStateServer = RvcOperationalStateServer2({
175357
175408
  });
175358
175409
 
175359
175410
  // src/matter/endpoints/legacy/vacuum/index.ts
175360
- var logger189 = Logger.get("VacuumDevice");
175411
+ var logger190 = Logger.get("VacuumDevice");
175361
175412
  var VacuumEndpointType = RoboticVacuumCleanerDevice.with(
175362
175413
  BasicInformationServer2,
175363
175414
  VacuumIdentifyServer,
@@ -175371,7 +175422,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
175371
175422
  const entityId = homeAssistantEntity.entity.entity_id;
175372
175423
  const attributes7 = homeAssistantEntity.entity.state.attributes;
175373
175424
  const customAreas = homeAssistantEntity.mapping?.customServiceAreas;
175374
- logger189.info(
175425
+ logger190.info(
175375
175426
  `Creating vacuum endpoint for ${entityId}, mapping: ${JSON.stringify(homeAssistantEntity.mapping ?? "none")}`
175376
175427
  );
175377
175428
  let device = VacuumEndpointType.with(
@@ -175382,7 +175433,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
175382
175433
  )
175383
175434
  ).set({ homeAssistantEntity });
175384
175435
  if (includeOnOff) {
175385
- logger189.info(`${entityId}: Adding OnOff cluster (vacuumOnOff flag enabled)`);
175436
+ logger190.info(`${entityId}: Adding OnOff cluster (vacuumOnOff flag enabled)`);
175386
175437
  device = device.with(VacuumOnOffServer);
175387
175438
  }
175388
175439
  if (!minimalClusters) {
@@ -175390,24 +175441,24 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
175390
175441
  }
175391
175442
  const roomEntities = homeAssistantEntity.mapping?.roomEntities;
175392
175443
  const rooms = parseVacuumRooms(attributes7);
175393
- logger189.info(
175444
+ logger190.info(
175394
175445
  `${entityId}: customAreas=${customAreas?.length ?? 0}, roomEntities=${JSON.stringify(roomEntities ?? [])}, parsedRooms=${rooms.length}`
175395
175446
  );
175396
175447
  if (customAreas && customAreas.length > 0) {
175397
- logger189.info(
175448
+ logger190.info(
175398
175449
  `${entityId}: Adding ServiceArea (${customAreas.length} custom areas)`
175399
175450
  );
175400
175451
  device = device.with(createCustomServiceAreaServer(customAreas));
175401
175452
  } else if (rooms.length > 0 || roomEntities && roomEntities.length > 0) {
175402
- logger189.info(`${entityId}: Adding ServiceArea (${rooms.length} rooms)`);
175453
+ logger190.info(`${entityId}: Adding ServiceArea (${rooms.length} rooms)`);
175403
175454
  device = device.with(
175404
175455
  createVacuumServiceAreaServer(attributes7, roomEntities)
175405
175456
  );
175406
175457
  } else if (!minimalClusters) {
175407
- logger189.info(`${entityId}: Adding ServiceArea (default single-area)`);
175458
+ logger190.info(`${entityId}: Adding ServiceArea (default single-area)`);
175408
175459
  device = device.with(createDefaultServiceAreaServer());
175409
175460
  } else {
175410
- logger189.info(`${entityId}: Skipping ServiceArea (minimal clusters mode)`);
175461
+ logger190.info(`${entityId}: Skipping ServiceArea (minimal clusters mode)`);
175411
175462
  }
175412
175463
  const fanSpeedList = resolveFanSpeedList(
175413
175464
  attributes7,
@@ -175417,7 +175468,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
175417
175468
  homeAssistantEntity.mapping?.mopIntensityEntity
175418
175469
  );
175419
175470
  if (cleaningModeOptions || fanSpeedList || mopIntensityList) {
175420
- logger189.info(
175471
+ logger190.info(
175421
175472
  `${entityId}: Adding RvcCleanMode (multi-mode, cleaningModeOptions=${JSON.stringify(cleaningModeOptions ?? [])}, fanSpeedList=${JSON.stringify(fanSpeedList ?? [])}, mopIntensityList=${JSON.stringify(mopIntensityList ?? [])})`
175422
175473
  );
175423
175474
  device = device.with(
@@ -175430,7 +175481,7 @@ function VacuumDevice(homeAssistantEntity, includeOnOff = false, minimalClusters
175430
175481
  )
175431
175482
  );
175432
175483
  } else {
175433
- logger189.info(`${entityId}: Adding RvcCleanMode (default single-mode)`);
175484
+ logger190.info(`${entityId}: Adding RvcCleanMode (default single-mode)`);
175434
175485
  device = device.with(createDefaultRvcCleanModeServer());
175435
175486
  }
175436
175487
  return device;
@@ -175585,7 +175636,7 @@ var WaterHeaterThermostatServer = ThermostatServer2(
175585
175636
  );
175586
175637
 
175587
175638
  // src/matter/endpoints/legacy/water-heater/index.ts
175588
- var logger190 = Logger.get("WaterHeaterDevice");
175639
+ var logger191 = Logger.get("WaterHeaterDevice");
175589
175640
  var WaterHeaterDeviceType = ThermostatDevice.with(
175590
175641
  BasicInformationServer2,
175591
175642
  IdentifyServer2,
@@ -175601,7 +175652,7 @@ function toMatterTemp2(value) {
175601
175652
  }
175602
175653
  function WaterHeaterDevice(homeAssistantEntity) {
175603
175654
  const attributes7 = homeAssistantEntity.entity.state.attributes;
175604
- logger190.debug(
175655
+ logger191.debug(
175605
175656
  `Creating device for ${homeAssistantEntity.entity.entity_id}, min_temp=${attributes7.min_temp}, max_temp=${attributes7.max_temp}`
175606
175657
  );
175607
175658
  const minLimit = toMatterTemp2(attributes7.min_temp) ?? 0;
@@ -175651,6 +175702,7 @@ function createLegacyEndpointType(entity, mapping, areaName, options) {
175651
175702
  if (!type) {
175652
175703
  return void 0;
175653
175704
  }
175705
+ validateEndpointType(type, entity.entity_id);
175654
175706
  if (areaName) {
175655
175707
  type = addFixedLabel(type, areaName);
175656
175708
  }
@@ -175791,7 +175843,7 @@ var matterDeviceTypeFactories = {
175791
175843
  };
175792
175844
 
175793
175845
  // src/matter/endpoints/legacy/legacy-endpoint.ts
175794
- var logger191 = Logger.get("LegacyEndpoint");
175846
+ var logger192 = Logger.get("LegacyEndpoint");
175795
175847
  var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175796
175848
  static async create(registry2, entityId, mapping) {
175797
175849
  const deviceRegistry = registry2.deviceOf(entityId);
@@ -175801,25 +175853,25 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175801
175853
  return;
175802
175854
  }
175803
175855
  if (registry2.isAutoBatteryMappingEnabled() && registry2.isBatteryEntityUsed(entityId)) {
175804
- logger191.debug(
175856
+ logger192.debug(
175805
175857
  `Skipping ${entityId} - already auto-assigned as battery to another device`
175806
175858
  );
175807
175859
  return;
175808
175860
  }
175809
175861
  if (registry2.isAutoHumidityMappingEnabled() && registry2.isHumidityEntityUsed(entityId)) {
175810
- logger191.debug(
175862
+ logger192.debug(
175811
175863
  `Skipping ${entityId} - already auto-assigned as humidity to a temperature sensor`
175812
175864
  );
175813
175865
  return;
175814
175866
  }
175815
175867
  if (registry2.isAutoPressureMappingEnabled() && registry2.isPressureEntityUsed(entityId)) {
175816
- logger191.debug(
175868
+ logger192.debug(
175817
175869
  `Skipping ${entityId} - already auto-assigned as pressure to a temperature sensor`
175818
175870
  );
175819
175871
  return;
175820
175872
  }
175821
175873
  if (registry2.isAutoComposedDevicesEnabled() && registry2.isComposedSubEntityUsed(entityId)) {
175822
- logger191.debug(
175874
+ logger192.debug(
175823
175875
  `Skipping ${entityId} - already consumed by a composed device`
175824
175876
  );
175825
175877
  return;
@@ -175839,7 +175891,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175839
175891
  humidityEntity: humidityEntityId
175840
175892
  };
175841
175893
  registry2.markHumidityEntityUsed(humidityEntityId);
175842
- logger191.debug(
175894
+ logger192.debug(
175843
175895
  `Auto-assigned humidity ${humidityEntityId} to ${entityId}`
175844
175896
  );
175845
175897
  }
@@ -175858,7 +175910,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175858
175910
  pressureEntity: pressureEntityId
175859
175911
  };
175860
175912
  registry2.markPressureEntityUsed(pressureEntityId);
175861
- logger191.debug(
175913
+ logger192.debug(
175862
175914
  `Auto-assigned pressure ${pressureEntityId} to ${entityId}`
175863
175915
  );
175864
175916
  }
@@ -175875,7 +175927,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175875
175927
  batteryEntity: batteryEntityId
175876
175928
  };
175877
175929
  registry2.markBatteryEntityUsed(batteryEntityId);
175878
- logger191.debug(
175930
+ logger192.debug(
175879
175931
  `Auto-assigned battery ${batteryEntityId} to ${entityId}`
175880
175932
  );
175881
175933
  }
@@ -175893,7 +175945,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175893
175945
  powerEntity: powerEntityId
175894
175946
  };
175895
175947
  registry2.markPowerEntityUsed(powerEntityId);
175896
- logger191.debug(`Auto-assigned power ${powerEntityId} to ${entityId}`);
175948
+ logger192.debug(`Auto-assigned power ${powerEntityId} to ${entityId}`);
175897
175949
  }
175898
175950
  }
175899
175951
  }
@@ -175910,7 +175962,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175910
175962
  energyEntity: energyEntityId
175911
175963
  };
175912
175964
  registry2.markEnergyEntityUsed(energyEntityId);
175913
- logger191.debug(
175965
+ logger192.debug(
175914
175966
  `Auto-assigned energy ${energyEntityId} to ${entityId}`
175915
175967
  );
175916
175968
  }
@@ -175926,7 +175978,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175926
175978
  entityId: effectiveMapping?.entityId ?? entityId,
175927
175979
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
175928
175980
  };
175929
- logger191.debug(
175981
+ logger192.debug(
175930
175982
  `Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity} to ${entityId}`
175931
175983
  );
175932
175984
  }
@@ -175936,7 +175988,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175936
175988
  entityId: effectiveMapping?.entityId ?? entityId,
175937
175989
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
175938
175990
  };
175939
- logger191.debug(
175991
+ logger192.debug(
175940
175992
  `Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity} to ${entityId}`
175941
175993
  );
175942
175994
  }
@@ -175946,7 +175998,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175946
175998
  entityId: effectiveMapping?.entityId ?? entityId,
175947
175999
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
175948
176000
  };
175949
- logger191.debug(
176001
+ logger192.debug(
175950
176002
  `Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity} to ${entityId}`
175951
176003
  );
175952
176004
  }
@@ -175967,7 +176019,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175967
176019
  rooms: roomsObj
175968
176020
  }
175969
176021
  };
175970
- logger191.debug(
176022
+ logger192.debug(
175971
176023
  `Auto-detected ${valetudoRooms.length} Valetudo segments for ${entityId}`
175972
176024
  );
175973
176025
  } else {
@@ -175984,7 +176036,7 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
175984
176036
  rooms: roomsObj
175985
176037
  }
175986
176038
  };
175987
- logger191.debug(
176039
+ logger192.debug(
175988
176040
  `Auto-detected ${roborockRooms.length} Roborock rooms for ${entityId}`
175989
176041
  );
175990
176042
  }
@@ -176086,11 +176138,11 @@ var LegacyEndpoint = class _LegacyEndpoint extends EntityEndpoint {
176086
176138
  return;
176087
176139
  }
176088
176140
  if (mappedChanged) {
176089
- logger191.debug(
176141
+ logger192.debug(
176090
176142
  `Mapped entity change detected for ${this.entityId}, forcing update`
176091
176143
  );
176092
176144
  }
176093
- logger191.debug(
176145
+ logger192.debug(
176094
176146
  `State update received for ${this.entityId}: state=${state.state}`
176095
176147
  );
176096
176148
  this.lastState = state;
@@ -176129,7 +176181,7 @@ import {
176129
176181
  getCollection
176130
176182
  } from "home-assistant-js-websocket";
176131
176183
  import { atLeastHaVersion } from "home-assistant-js-websocket/dist/util.js";
176132
- var logger192 = Logger.get("SubscribeEntities");
176184
+ var logger193 = Logger.get("SubscribeEntities");
176133
176185
  function processEvent(store, updates) {
176134
176186
  const state = { ...store.state };
176135
176187
  if (updates.a) {
@@ -176155,7 +176207,7 @@ function processEvent(store, updates) {
176155
176207
  for (const entityId in updates.c) {
176156
176208
  let entityState = state[entityId];
176157
176209
  if (!entityState) {
176158
- logger192.warn("Received state update for unknown entity", entityId);
176210
+ logger193.warn("Received state update for unknown entity", entityId);
176159
176211
  continue;
176160
176212
  }
176161
176213
  entityState = { ...entityState };
@@ -176225,7 +176277,7 @@ var subscribeEntities = (conn, onChange, entityIds) => entitiesColl(conn, entity
176225
176277
 
176226
176278
  // src/services/bridges/entity-isolation-service.ts
176227
176279
  init_esm();
176228
- var logger193 = Logger.get("EntityIsolation");
176280
+ var logger194 = Logger.get("EntityIsolation");
176229
176281
  var EntityIsolationServiceImpl = class {
176230
176282
  isolatedEntities = /* @__PURE__ */ new Map();
176231
176283
  isolationCallbacks = /* @__PURE__ */ new Map();
@@ -176290,13 +176342,13 @@ var EntityIsolationServiceImpl = class {
176290
176342
  }
176291
176343
  const parsed = this.parseEndpointPath(msg);
176292
176344
  if (!parsed) {
176293
- logger193.warn("Could not parse entity from error:", msg);
176345
+ logger194.warn("Could not parse entity from error:", msg);
176294
176346
  return false;
176295
176347
  }
176296
176348
  const { bridgeId, entityName } = parsed;
176297
176349
  const callback = this.isolationCallbacks.get(bridgeId);
176298
176350
  if (!callback) {
176299
- logger193.warn(
176351
+ logger194.warn(
176300
176352
  `No isolation callback registered for bridge ${bridgeId}, entity: ${entityName}`
176301
176353
  );
176302
176354
  return false;
@@ -176307,14 +176359,14 @@ var EntityIsolationServiceImpl = class {
176307
176359
  }
176308
176360
  const reason = `${classification}. Entity isolated to protect bridge stability.`;
176309
176361
  this.isolatedEntities.set(key, { entityId: entityName, reason });
176310
- logger193.warn(
176362
+ logger194.warn(
176311
176363
  `Isolating entity "${entityName}" from bridge ${bridgeId} due to: ${reason}`
176312
176364
  );
176313
176365
  try {
176314
176366
  await callback(entityName);
176315
176367
  return true;
176316
176368
  } catch (e) {
176317
- logger193.error(`Failed to isolate entity ${entityName}:`, e);
176369
+ logger194.error(`Failed to isolate entity ${entityName}:`, e);
176318
176370
  return false;
176319
176371
  }
176320
176372
  }
@@ -177193,11 +177245,11 @@ var BridgeRegistry = class _BridgeRegistry {
177193
177245
  init_dist();
177194
177246
  var AUTO_FORCE_SYNC_INTERVAL_MS2 = 9e4;
177195
177247
  var ServerModeBridge = class {
177196
- constructor(logger196, dataProvider, endpointManager, server) {
177248
+ constructor(logger197, dataProvider, endpointManager, server) {
177197
177249
  this.dataProvider = dataProvider;
177198
177250
  this.endpointManager = endpointManager;
177199
177251
  this.server = server;
177200
- this.log = logger196.get(`ServerModeBridge / ${dataProvider.id}`);
177252
+ this.log = logger197.get(`ServerModeBridge / ${dataProvider.id}`);
177201
177253
  }
177202
177254
  log;
177203
177255
  status = {
@@ -177599,7 +177651,7 @@ function ServerModeVacuumDevice(homeAssistantEntity, includeOnOff = false, minim
177599
177651
  }
177600
177652
 
177601
177653
  // src/matter/endpoints/server-mode-vacuum-endpoint.ts
177602
- var logger194 = Logger.get("ServerModeVacuumEndpoint");
177654
+ var logger195 = Logger.get("ServerModeVacuumEndpoint");
177603
177655
  var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEndpoint {
177604
177656
  static async create(registry2, entityId, mapping) {
177605
177657
  const deviceRegistry = registry2.deviceOf(entityId);
@@ -177609,7 +177661,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177609
177661
  return void 0;
177610
177662
  }
177611
177663
  let effectiveMapping = mapping;
177612
- logger194.info(
177664
+ logger195.info(
177613
177665
  `${entityId}: device_id=${entity.device_id}, manualBattery=${mapping?.batteryEntity ?? "none"}`
177614
177666
  );
177615
177667
  if (entity.device_id) {
@@ -177624,9 +177676,9 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177624
177676
  batteryEntity: batteryEntityId
177625
177677
  };
177626
177678
  registry2.markBatteryEntityUsed(batteryEntityId);
177627
- logger194.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
177679
+ logger195.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
177628
177680
  } else {
177629
- logger194.warn(
177681
+ logger195.warn(
177630
177682
  `${entityId}: No battery entity found for device ${entity.device_id}`
177631
177683
  );
177632
177684
  }
@@ -177640,7 +177692,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177640
177692
  entityId: effectiveMapping?.entityId ?? entityId,
177641
177693
  cleaningModeEntity: vacuumEntities.cleaningModeEntity
177642
177694
  };
177643
- logger194.info(
177695
+ logger195.info(
177644
177696
  `${entityId}: Auto-assigned cleaningMode ${vacuumEntities.cleaningModeEntity}`
177645
177697
  );
177646
177698
  }
@@ -177650,7 +177702,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177650
177702
  entityId: effectiveMapping?.entityId ?? entityId,
177651
177703
  suctionLevelEntity: vacuumEntities.suctionLevelEntity
177652
177704
  };
177653
- logger194.info(
177705
+ logger195.info(
177654
177706
  `${entityId}: Auto-assigned suctionLevel ${vacuumEntities.suctionLevelEntity}`
177655
177707
  );
177656
177708
  }
@@ -177660,7 +177712,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177660
177712
  entityId: effectiveMapping?.entityId ?? entityId,
177661
177713
  mopIntensityEntity: vacuumEntities.mopIntensityEntity
177662
177714
  };
177663
- logger194.info(
177715
+ logger195.info(
177664
177716
  `${entityId}: Auto-assigned mopIntensity ${vacuumEntities.mopIntensityEntity}`
177665
177717
  );
177666
177718
  }
@@ -177681,7 +177733,7 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177681
177733
  rooms: roomsObj
177682
177734
  }
177683
177735
  };
177684
- logger194.info(
177736
+ logger195.info(
177685
177737
  `${entityId}: Auto-detected ${valetudoRooms.length} Valetudo segments`
177686
177738
  );
177687
177739
  } else {
@@ -177698,14 +177750,14 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177698
177750
  rooms: roomsObj
177699
177751
  }
177700
177752
  };
177701
- logger194.info(
177753
+ logger195.info(
177702
177754
  `${entityId}: Auto-detected ${roborockRooms.length} Roborock rooms`
177703
177755
  );
177704
177756
  }
177705
177757
  }
177706
177758
  }
177707
177759
  } else {
177708
- logger194.warn(`${entityId}: No device_id \u2014 cannot auto-assign battery`);
177760
+ logger195.warn(`${entityId}: No device_id \u2014 cannot auto-assign battery`);
177709
177761
  }
177710
177762
  const payload = {
177711
177763
  entity_id: entityId,
@@ -177768,11 +177820,11 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
177768
177820
  return;
177769
177821
  }
177770
177822
  if (mappedChanged) {
177771
- logger194.debug(
177823
+ logger195.debug(
177772
177824
  `Mapped entity change detected for ${this.entityId}, forcing update`
177773
177825
  );
177774
177826
  }
177775
- logger194.debug(
177827
+ logger195.debug(
177776
177828
  `State update received for ${this.entityId}: state=${state.state}`
177777
177829
  );
177778
177830
  this.lastState = state;
@@ -178162,10 +178214,10 @@ var BridgeEnvironmentFactory = class extends BridgeFactory {
178162
178214
  // src/core/ioc/app-environment.ts
178163
178215
  var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
178164
178216
  constructor(rootEnv, options) {
178165
- const logger196 = rootEnv.get(LoggerService);
178217
+ const logger197 = rootEnv.get(LoggerService);
178166
178218
  super({
178167
178219
  id: "App",
178168
- log: logger196.get("AppContainer"),
178220
+ log: logger197.get("AppContainer"),
178169
178221
  parent: rootEnv
178170
178222
  });
178171
178223
  this.options = options;
@@ -178178,8 +178230,8 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
178178
178230
  }
178179
178231
  construction;
178180
178232
  async init() {
178181
- const logger196 = this.get(LoggerService);
178182
- this.set(LoggerService, logger196);
178233
+ const logger197 = this.get(LoggerService);
178234
+ this.set(LoggerService, logger197);
178183
178235
  this.set(AppStorage, new AppStorage(await this.load(StorageService)));
178184
178236
  this.set(BridgeStorage, new BridgeStorage(await this.load(AppStorage)));
178185
178237
  this.set(
@@ -178196,7 +178248,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
178196
178248
  );
178197
178249
  this.set(
178198
178250
  HomeAssistantClient,
178199
- new HomeAssistantClient(logger196, this.options.homeAssistant)
178251
+ new HomeAssistantClient(logger197, this.options.homeAssistant)
178200
178252
  );
178201
178253
  this.set(
178202
178254
  HomeAssistantConfig,
@@ -178204,7 +178256,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
178204
178256
  );
178205
178257
  this.set(
178206
178258
  HomeAssistantActions,
178207
- new HomeAssistantActions(logger196, await this.load(HomeAssistantClient))
178259
+ new HomeAssistantActions(logger197, await this.load(HomeAssistantClient))
178208
178260
  );
178209
178261
  this.set(
178210
178262
  HomeAssistantRegistry,
@@ -178225,7 +178277,7 @@ var AppEnvironment = class _AppEnvironment extends EnvironmentBase {
178225
178277
  this.set(
178226
178278
  WebApi,
178227
178279
  new WebApi(
178228
- logger196,
178280
+ logger197,
178229
178281
  await this.load(BridgeService),
178230
178282
  await this.load(HomeAssistantClient),
178231
178283
  await this.load(HomeAssistantRegistry),
@@ -178250,7 +178302,7 @@ init_nodejs();
178250
178302
  init_level_control();
178251
178303
 
178252
178304
  // src/matter/patches/patch-level-control-tlv.ts
178253
- var logger195 = Logger.get("PatchLevelControlTlv");
178305
+ var logger196 = Logger.get("PatchLevelControlTlv");
178254
178306
  function patchLevelControlTlv() {
178255
178307
  let patched = 0;
178256
178308
  const moveToLevelFields = LevelControl3.TlvMoveToLevelRequest.fieldDefinitions;
@@ -178264,11 +178316,11 @@ function patchLevelControlTlv() {
178264
178316
  patched++;
178265
178317
  }
178266
178318
  if (patched > 0) {
178267
- logger195.info(
178319
+ logger196.info(
178268
178320
  `Patched ${patched} LevelControl TLV schema(s): transitionTime is now optional (Google Home compatibility)`
178269
178321
  );
178270
178322
  } else {
178271
- logger195.warn(
178323
+ logger196.warn(
178272
178324
  "Failed to patch LevelControl TLV schemas \u2014 field definitions not found. Google Home brightness adjustment may not work."
178273
178325
  );
178274
178326
  }