hoffmation-base 3.0.0-alpha.50 → 3.0.0-alpha.51
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.
|
@@ -7,7 +7,6 @@ const models_1 = require("../../../models");
|
|
|
7
7
|
const log_service_1 = require("../log-service");
|
|
8
8
|
const victron_mqtt_consumer_1 = require("victron-mqtt-consumer");
|
|
9
9
|
const time_callback_service_1 = require("../time-callback-service");
|
|
10
|
-
const lodash_1 = require("lodash");
|
|
11
10
|
class VictronDevice {
|
|
12
11
|
constructor(opts) {
|
|
13
12
|
/** @inheritDoc */
|
|
@@ -169,14 +168,17 @@ class VictronDevice {
|
|
|
169
168
|
this._lastBatteryPersist = now;
|
|
170
169
|
}
|
|
171
170
|
toJSON() {
|
|
172
|
-
return
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
171
|
+
return {
|
|
172
|
+
...{
|
|
173
|
+
battery: this.battery,
|
|
174
|
+
acBlocked: this.acBlocked,
|
|
175
|
+
excessEnergy: this.excessEnergy,
|
|
176
|
+
drawingWattage: this.drawingWattage,
|
|
177
|
+
injectingWattage: this.injectingWattage,
|
|
178
|
+
selfConsumingWattage: this.selfConsumingWattage,
|
|
179
|
+
},
|
|
180
|
+
...utils_1.Utils.jsonFilter(this, ['_victronConsumer', '_excessEnergyConsumer']),
|
|
181
|
+
};
|
|
180
182
|
}
|
|
181
183
|
/**
|
|
182
184
|
* Changes the grid set point of the Victron device, to the desired value.
|