@riddix/hamh 2.1.0-alpha.586 → 2.1.0-alpha.587
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.
package/dist/backend/cli.js
CHANGED
|
@@ -174258,6 +174258,9 @@ var AirQualitySensorServerImpl = class extends AirQualityServerWithFeatures {
|
|
|
174258
174258
|
this.reactTo(homeAssistant.onChange, this.update);
|
|
174259
174259
|
}
|
|
174260
174260
|
update(entity) {
|
|
174261
|
+
if (!entity.state || !entity.state.attributes) {
|
|
174262
|
+
return;
|
|
174263
|
+
}
|
|
174261
174264
|
const state = entity.state.state;
|
|
174262
174265
|
const attributes7 = entity.state.attributes;
|
|
174263
174266
|
const deviceClass = attributes7.device_class;
|
|
@@ -174437,6 +174440,9 @@ var StandalonePowerServer = class extends ElectricalPowerMeasurementServer {
|
|
|
174437
174440
|
this.reactTo(homeAssistant.onChange, this.update);
|
|
174438
174441
|
}
|
|
174439
174442
|
update(entity) {
|
|
174443
|
+
if (!entity.state || !entity.state.attributes) {
|
|
174444
|
+
return;
|
|
174445
|
+
}
|
|
174440
174446
|
const state = entity.state.state;
|
|
174441
174447
|
if (state == null || Number.isNaN(+state)) return;
|
|
174442
174448
|
const attrs = entity.state.attributes;
|
|
@@ -174492,6 +174498,9 @@ var StandaloneEnergyServer = class extends EnergyFeaturedBase {
|
|
|
174492
174498
|
this.reactTo(homeAssistant.onChange, this.update);
|
|
174493
174499
|
}
|
|
174494
174500
|
update(entity) {
|
|
174501
|
+
if (!entity.state || !entity.state.attributes) {
|
|
174502
|
+
return;
|
|
174503
|
+
}
|
|
174495
174504
|
const attrs = entity.state.attributes;
|
|
174496
174505
|
if (attrs.device_class !== SensorDeviceClass.energy) return;
|
|
174497
174506
|
const state = entity.state.state;
|
|
@@ -175308,6 +175317,9 @@ var TvocAirQualityServer = class extends TvocAirQualityServerBase {
|
|
|
175308
175317
|
this.reactTo(homeAssistant.onChange, this.update);
|
|
175309
175318
|
}
|
|
175310
175319
|
update(entity) {
|
|
175320
|
+
if (!entity.state || !entity.state.attributes) {
|
|
175321
|
+
return;
|
|
175322
|
+
}
|
|
175311
175323
|
const state = entity.state.state;
|
|
175312
175324
|
const attributes7 = entity.state.attributes;
|
|
175313
175325
|
const deviceClass = attributes7.device_class;
|