@riddix/hamh 2.1.0-alpha.497 → 2.1.0-alpha.499

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.
@@ -179813,9 +179813,16 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
179813
179813
  registry2.markBatteryEntityUsed(batteryEntityId);
179814
179814
  logger201.info(`${entityId}: Auto-assigned battery ${batteryEntityId}`);
179815
179815
  } else {
179816
- logger201.warn(
179817
- `${entityId}: No battery entity found for device ${entity.device_id}`
179818
- );
179816
+ const attrs = state.attributes;
179817
+ if (attrs.battery_level != null || attrs.battery != null) {
179818
+ logger201.info(
179819
+ `${entityId}: No battery entity found, using battery attribute from vacuum state`
179820
+ );
179821
+ } else {
179822
+ logger201.warn(
179823
+ `${entityId}: No battery entity found for device ${entity.device_id}`
179824
+ );
179825
+ }
179819
179826
  }
179820
179827
  }
179821
179828
  const vacuumEntities = registry2.findVacuumSelectEntities(