hoffmation-base 3.0.0-alpha.48 → 3.0.0-alpha.49
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.
|
@@ -149,6 +149,7 @@ class AcDevice {
|
|
|
149
149
|
return ac_mode_1.AcMode.Off;
|
|
150
150
|
}
|
|
151
151
|
if ((_b = devices_1.Devices.energymanager) === null || _b === void 0 ? void 0 : _b.acBlocked) {
|
|
152
|
+
acOn && this.log(models_1.LogLevel.Info, 'We should turn off now, as energy-manager demands off.');
|
|
152
153
|
return ac_mode_1.AcMode.Off;
|
|
153
154
|
}
|
|
154
155
|
// Check Turn Off Time
|
|
@@ -7,6 +7,7 @@ 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");
|
|
10
11
|
class VictronDevice {
|
|
11
12
|
constructor(opts) {
|
|
12
13
|
/** @inheritDoc */
|
|
@@ -168,7 +169,14 @@ class VictronDevice {
|
|
|
168
169
|
this._lastBatteryPersist = now;
|
|
169
170
|
}
|
|
170
171
|
toJSON() {
|
|
171
|
-
return utils_1.Utils.jsonFilter(this, ['_victronConsumer'])
|
|
172
|
+
return (0, lodash_1.extend)(utils_1.Utils.jsonFilter(this, ['_victronConsumer', '_excessEnergyConsumer']), {
|
|
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
|
+
});
|
|
172
180
|
}
|
|
173
181
|
/**
|
|
174
182
|
* Changes the grid set point of the Victron device, to the desired value.
|