@riddix/hamh 2.1.0-alpha.550 → 2.1.0-alpha.552

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.
@@ -148699,6 +148699,7 @@ function entityMappingApi(mappingStorage) {
148699
148699
  mopIntensityEntity: body.mopIntensityEntity,
148700
148700
  customServiceAreas: body.customServiceAreas,
148701
148701
  customFanSpeedTags: body.customFanSpeedTags,
148702
+ currentRoomEntity: body.currentRoomEntity,
148702
148703
  valetudoIdentifier: body.valetudoIdentifier,
148703
148704
  coverSwapOpenClose: body.coverSwapOpenClose,
148704
148705
  composedEntities: body.composedEntities
@@ -152885,11 +152886,12 @@ var EntityMappingStorage = class extends Service {
152885
152886
  (a) => a.name?.trim() && a.service?.trim()
152886
152887
  ) ?? void 0,
152887
152888
  customFanSpeedTags: request.customFanSpeedTags && Object.keys(request.customFanSpeedTags).length > 0 ? request.customFanSpeedTags : void 0,
152889
+ currentRoomEntity: request.currentRoomEntity?.trim() || void 0,
152888
152890
  valetudoIdentifier: request.valetudoIdentifier?.trim() || void 0,
152889
152891
  coverSwapOpenClose: request.coverSwapOpenClose || void 0,
152890
152892
  composedEntities: request.composedEntities?.filter((e) => e.entityId?.trim()) ?? void 0
152891
152893
  };
152892
- if (!config10.matterDeviceType && !config10.customName && config10.disabled !== true && !config10.filterLifeEntity && !config10.cleaningModeEntity && !config10.temperatureEntity && !config10.humidityEntity && !config10.batteryEntity && !config10.roomEntities && !config10.disableLockPin && !config10.powerEntity && !config10.energyEntity && !config10.pressureEntity && !config10.suctionLevelEntity && !config10.mopIntensityEntity && (!config10.customServiceAreas || config10.customServiceAreas.length === 0) && (!config10.customFanSpeedTags || Object.keys(config10.customFanSpeedTags).length === 0) && !config10.valetudoIdentifier && !config10.coverSwapOpenClose && (!config10.composedEntities || config10.composedEntities.length === 0)) {
152894
+ if (!config10.matterDeviceType && !config10.customName && config10.disabled !== true && !config10.filterLifeEntity && !config10.cleaningModeEntity && !config10.temperatureEntity && !config10.humidityEntity && !config10.batteryEntity && !config10.roomEntities && !config10.disableLockPin && !config10.powerEntity && !config10.energyEntity && !config10.pressureEntity && !config10.suctionLevelEntity && !config10.mopIntensityEntity && (!config10.customServiceAreas || config10.customServiceAreas.length === 0) && (!config10.customFanSpeedTags || Object.keys(config10.customFanSpeedTags).length === 0) && !config10.currentRoomEntity && !config10.valetudoIdentifier && !config10.coverSwapOpenClose && (!config10.composedEntities || config10.composedEntities.length === 0)) {
152893
152895
  bridgeMap.delete(request.entityId);
152894
152896
  } else {
152895
152897
  bridgeMap.set(request.entityId, config10);
@@ -168365,7 +168367,7 @@ var LevelControlServerBase = class extends FeaturedBase4 {
168365
168367
  this.reactTo(homeAssistant.onChange, this.update);
168366
168368
  }
168367
168369
  update(entity) {
168368
- if (!entity.state) {
168370
+ if (!entity.state || !entity.state.attributes) {
168369
168371
  return;
168370
168372
  }
168371
168373
  const { state } = entity;
@@ -168648,7 +168650,7 @@ var FanControlServerBase = class extends FeaturedBase5 {
168648
168650
  }
168649
168651
  }
168650
168652
  update(entity) {
168651
- if (!entity.state) {
168653
+ if (!entity.state || !entity.state.attributes) {
168652
168654
  return;
168653
168655
  }
168654
168656
  const config10 = this.state.config;
@@ -170574,7 +170576,7 @@ var ThermostatServerBase = class extends FullFeaturedBase {
170574
170576
  }
170575
170577
  // biome-ignore lint/correctness/noUnusedPrivateClassMembers: Called via thermostatPostInitialize + prototype copy
170576
170578
  update(entity) {
170577
- if (!entity.state) {
170579
+ if (!entity.state || !entity.state.attributes) {
170578
170580
  return;
170579
170581
  }
170580
170582
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
@@ -171903,7 +171905,7 @@ var GenericSwitchServerBase = class extends FeaturedBase7 {
171903
171905
  handleEventChange() {
171904
171906
  const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
171905
171907
  const entity = homeAssistant.entity;
171906
- if (!entity?.state) return;
171908
+ if (!entity?.state || !entity.state.attributes) return;
171907
171909
  const attrs = entity.state.attributes;
171908
171910
  const eventType = attrs.event_type;
171909
171911
  if (!eventType) return;
@@ -172254,7 +172256,7 @@ var ColorControlServerBase = class extends FeaturedBase8 {
172254
172256
  this.reactTo(homeAssistant.onChange, this.update);
172255
172257
  }
172256
172258
  update(entity) {
172257
- if (!entity.state) {
172259
+ if (!entity.state || !entity.state.attributes) {
172258
172260
  return;
172259
172261
  }
172260
172262
  const config10 = this.state.config;