@texturehq/device 1.14.0 → 1.16.0
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/common/supportLevel.d.ts +8 -2
- package/dist/common/supportLevel.d.ts.map +1 -1
- package/dist/common/supportLevel.js +2 -2
- package/dist/common/supportLevel.js.map +1 -1
- package/dist/deviceModel/entities.d.ts +44 -197
- package/dist/deviceModel/entities.d.ts.map +1 -1
- package/dist/deviceModel/entities.js +7 -7
- package/dist/deviceModel/entities.js.map +1 -1
- package/dist/deviceState/battery.d.ts +36 -156
- package/dist/deviceState/battery.d.ts.map +1 -1
- package/dist/deviceState/battery.js +16 -14
- package/dist/deviceState/battery.js.map +1 -1
- package/dist/deviceState/charger.d.ts +9 -36
- package/dist/deviceState/charger.d.ts.map +1 -1
- package/dist/deviceState/charger.js +7 -7
- package/dist/deviceState/charger.js.map +1 -1
- package/dist/deviceState/common.d.ts +46 -14
- package/dist/deviceState/common.d.ts.map +1 -1
- package/dist/deviceState/common.js +39 -8
- package/dist/deviceState/common.js.map +1 -1
- package/dist/deviceState/inverter.d.ts +25 -72
- package/dist/deviceState/inverter.d.ts.map +1 -1
- package/dist/deviceState/inverter.js +30 -6
- package/dist/deviceState/inverter.js.map +1 -1
- package/dist/deviceState/meter.d.ts +36 -634
- package/dist/deviceState/meter.d.ts.map +1 -1
- package/dist/deviceState/meter.js +31 -31
- package/dist/deviceState/meter.js.map +1 -1
- package/dist/deviceState/thermostat.d.ts +33 -39
- package/dist/deviceState/thermostat.d.ts.map +1 -1
- package/dist/deviceState/thermostat.js +8 -8
- package/dist/deviceState/thermostat.js.map +1 -1
- package/dist/deviceState/vehicle.d.ts +10 -74
- package/dist/deviceState/vehicle.d.ts.map +1 -1
- package/dist/deviceState/vehicle.js +13 -14
- package/dist/deviceState/vehicle.js.map +1 -1
- package/dist/deviceType/entities.d.ts +11 -2
- package/dist/deviceType/entities.d.ts.map +1 -1
- package/dist/deviceType/entities.js +2 -2
- package/dist/deviceType/entities.js.map +1 -1
- package/dist/manufacturer/entities.d.ts +17 -116
- package/dist/manufacturer/entities.d.ts.map +1 -1
- package/dist/manufacturer/entities.js +11 -11
- package/dist/manufacturer/entities.js.map +1 -1
- package/dist/metrics/aggregations.d.ts +7 -2
- package/dist/metrics/aggregations.d.ts.map +1 -1
- package/dist/metrics/aggregations.js +2 -2
- package/dist/metrics/aggregations.js.map +1 -1
- package/dist/metrics/groupBy.d.ts +5 -2
- package/dist/metrics/groupBy.d.ts.map +1 -1
- package/dist/metrics/groupBy.js +2 -2
- package/dist/metrics/groupBy.js.map +1 -1
- package/dist/metrics/range.d.ts +5 -21
- package/dist/metrics/range.d.ts.map +1 -1
- package/dist/metrics/range.js +25 -46
- package/dist/metrics/range.js.map +1 -1
- package/dist/metrics/units.d.ts +26 -2
- package/dist/metrics/units.d.ts.map +1 -1
- package/dist/metrics/units.js +2 -2
- package/dist/metrics/units.js.map +1 -1
- package/dist/metrics/window.d.ts +19 -11
- package/dist/metrics/window.d.ts.map +1 -1
- package/dist/metrics/window.js +4 -4
- package/dist/metrics/window.js.map +1 -1
- package/package.json +4 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BatteryStaticStateSchema = exports.BatteryStateSchema = exports.CoreBatteryStateSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
|
-
exports.CoreBatteryStateSchema =
|
|
6
|
+
exports.CoreBatteryStateSchema = v4_1.z.object({
|
|
7
7
|
/**
|
|
8
8
|
* Whether the battery is currently charging. The state could be unknown if not provided by the manufacturer.
|
|
9
9
|
* @example "charging"
|
|
@@ -13,12 +13,12 @@ exports.CoreBatteryStateSchema = zod_1.z.object({
|
|
|
13
13
|
* The current charge of the battery in watt-hours (Wh).
|
|
14
14
|
* @example 43200
|
|
15
15
|
*/
|
|
16
|
-
charge:
|
|
16
|
+
charge: v4_1.z.number().describe("The current charge of the battery in watt-hours (Wh)."),
|
|
17
17
|
/**
|
|
18
18
|
* The current charge of the battery as a percentage. Represented as a number between 0 and 100.
|
|
19
19
|
* @example 50
|
|
20
20
|
*/
|
|
21
|
-
chargePercentage:
|
|
21
|
+
chargePercentage: v4_1.z
|
|
22
22
|
.number()
|
|
23
23
|
.min(0)
|
|
24
24
|
.max(100)
|
|
@@ -33,13 +33,13 @@ exports.CoreBatteryStateSchema = zod_1.z.object({
|
|
|
33
33
|
* @example 1000
|
|
34
34
|
* @optional
|
|
35
35
|
*/
|
|
36
|
-
chargeRate:
|
|
36
|
+
chargeRate: v4_1.z.number().optional().describe("The current charge rate of the battery in watts (W)."),
|
|
37
37
|
/**
|
|
38
38
|
* The current charge percentage that should be reserved for backup power. Represented as a number between 0 and 100.
|
|
39
39
|
* @example 90
|
|
40
40
|
* @optional
|
|
41
41
|
*/
|
|
42
|
-
backupReserve:
|
|
42
|
+
backupReserve: v4_1.z
|
|
43
43
|
.number()
|
|
44
44
|
.min(0)
|
|
45
45
|
.max(100)
|
|
@@ -50,36 +50,38 @@ exports.CoreBatteryStateSchema = zod_1.z.object({
|
|
|
50
50
|
* @example true
|
|
51
51
|
* @optional
|
|
52
52
|
*/
|
|
53
|
-
isStormModeActive:
|
|
53
|
+
isStormModeActive: v4_1.z.boolean().optional().describe("Whether the battery has an active storm mode alert."),
|
|
54
54
|
/**
|
|
55
55
|
* Whether the battery has an active storm mode enabled.
|
|
56
56
|
* @example true
|
|
57
57
|
* @optional
|
|
58
58
|
*/
|
|
59
|
-
isStormModeEnabled:
|
|
59
|
+
isStormModeEnabled: v4_1.z.boolean().optional().describe("Whether the battery has storm mode enabled."),
|
|
60
60
|
/**
|
|
61
61
|
* The current strategy or mode the battery is operating in.
|
|
62
62
|
* @example "self-consumption"
|
|
63
63
|
*/
|
|
64
64
|
strategy: common_1.BatteryStrategiesEnum.optional(),
|
|
65
65
|
});
|
|
66
|
-
exports.BatteryStateSchema = exports.CoreBatteryStateSchema
|
|
67
|
-
|
|
66
|
+
exports.BatteryStateSchema = exports.CoreBatteryStateSchema
|
|
67
|
+
.extend(common_1.CoreGridStateSchema.shape)
|
|
68
|
+
.extend(common_1.CoreLoadStateSchema.shape);
|
|
69
|
+
exports.BatteryStaticStateSchema = v4_1.z.object({
|
|
68
70
|
/**
|
|
69
71
|
* The rated maximum capacity of the battery in watt-hours (Wh).
|
|
70
72
|
*/
|
|
71
|
-
capacity:
|
|
73
|
+
capacity: v4_1.z.number().describe("The rated maximum capacity of the battery in watt-hours (Wh)."),
|
|
72
74
|
/**
|
|
73
75
|
* The rated maximum charge rate of the battery in watts (W).
|
|
74
76
|
*/
|
|
75
|
-
maxChargeRate:
|
|
77
|
+
maxChargeRate: v4_1.z.number().optional().describe("The rated maximum charge rate of the battery in watts (W)."),
|
|
76
78
|
/**
|
|
77
79
|
* The rated maximum discharge rate of the battery in watts (W).
|
|
78
80
|
*/
|
|
79
|
-
maxDischargeRate:
|
|
81
|
+
maxDischargeRate: v4_1.z.number().optional().describe("The rated maximum discharge rate of the battery in watts (W)."),
|
|
80
82
|
/**
|
|
81
83
|
* The number of batteries in the system.
|
|
82
84
|
*/
|
|
83
|
-
numberOfBatteries:
|
|
85
|
+
numberOfBatteries: v4_1.z.number().int().positive().optional().describe("The number of batteries in the system."),
|
|
84
86
|
});
|
|
85
87
|
//# sourceMappingURL=battery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"battery.js","sourceRoot":"","sources":["../../src/deviceState/battery.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"battery.js","sourceRoot":"","sources":["../../src/deviceState/battery.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,qCAAqH;AAExG,QAAA,sBAAsB,GAAG,MAAC,CAAC,MAAM,CAAC;IAC7C;;;OAGG;IACH,aAAa,EAAE,iCAAwB;IACvC;;;OAGG;IACH,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IACpF;;;OAGG;IACH,gBAAgB,EAAE,MAAC;SAChB,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CAAC,+FAA+F,CAAC;IAC5G;;;;;;;;;OASG;IACH,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;IAClG;;;;OAIG;IACH,aAAa,EAAE,MAAC;SACb,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,4GAA4G,CAC7G;IACH;;;;OAIG;IACH,iBAAiB,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;IACzG;;;;OAIG;IACH,kBAAkB,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAClG;;;OAGG;IACH,QAAQ,EAAE,8BAAqB,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEU,QAAA,kBAAkB,GAAG,8BAAsB;KACrD,MAAM,CAAC,4BAAmB,CAAC,KAAK,CAAC;KACjC,MAAM,CAAC,4BAAmB,CAAC,KAAK,CAAC,CAAC;AAGxB,QAAA,wBAAwB,GAAG,MAAC,CAAC,MAAM,CAAC;IAC/C;;OAEG;IACH,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;IAC9F;;OAEG;IACH,aAAa,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4DAA4D,CAAC;IAC3G;;OAEG;IACH,gBAAgB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;IACjH;;OAEG;IACH,iBAAiB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;CAC7G,CAAC,CAAC"}
|
|
@@ -1,44 +1,17 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
2
|
export declare const ChargerStateSchema: z.ZodObject<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* Whether the charger is plugged in.
|
|
10
|
-
* @example true
|
|
11
|
-
*/
|
|
3
|
+
chargingState: z.ZodEnum<{
|
|
4
|
+
unknown: "unknown";
|
|
5
|
+
idle: "idle";
|
|
6
|
+
charging: "charging";
|
|
7
|
+
discharging: "discharging";
|
|
8
|
+
}>;
|
|
12
9
|
isPluggedIn: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
-
/**
|
|
14
|
-
* The voltage of the charger in volts (V).
|
|
15
|
-
* @example 240
|
|
16
|
-
*/
|
|
17
10
|
chargerVoltage: z.ZodOptional<z.ZodNumber>;
|
|
18
|
-
/**
|
|
19
|
-
* The current of the charger in amps (A).
|
|
20
|
-
* @example 40
|
|
21
|
-
*/
|
|
22
11
|
chargerCurrent: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
/**
|
|
24
|
-
* The wattage of the charger in watts (W).
|
|
25
|
-
* @example 7200
|
|
26
|
-
*/
|
|
27
12
|
chargerWattage: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
},
|
|
29
|
-
chargingState: "unknown" | "idle" | "charging" | "discharging";
|
|
30
|
-
isPluggedIn?: boolean | undefined;
|
|
31
|
-
chargerVoltage?: number | undefined;
|
|
32
|
-
chargerCurrent?: number | undefined;
|
|
33
|
-
chargerWattage?: number | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
chargingState: "unknown" | "idle" | "charging" | "discharging";
|
|
36
|
-
isPluggedIn?: boolean | undefined;
|
|
37
|
-
chargerVoltage?: number | undefined;
|
|
38
|
-
chargerCurrent?: number | undefined;
|
|
39
|
-
chargerWattage?: number | undefined;
|
|
40
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
41
14
|
export type ChargerState = z.infer<typeof ChargerStateSchema>;
|
|
42
|
-
export declare const ChargerStaticStateSchema: z.ZodObject<{},
|
|
15
|
+
export declare const ChargerStaticStateSchema: z.ZodObject<{}, z.core.$strip>;
|
|
43
16
|
export type ChargerStaticState = z.infer<typeof ChargerStaticStateSchema>;
|
|
44
17
|
//# sourceMappingURL=charger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charger.d.ts","sourceRoot":"","sources":["../../src/deviceState/charger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"charger.d.ts","sourceRoot":"","sources":["../../src/deviceState/charger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,eAAO,MAAM,kBAAkB;;;;;;;;;;;iBA4B7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,wBAAwB,gCAAe,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChargerStaticStateSchema = exports.ChargerStateSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
|
-
exports.ChargerStateSchema =
|
|
6
|
+
exports.ChargerStateSchema = v4_1.z.object({
|
|
7
7
|
/**
|
|
8
8
|
* Whether the charger is currently charging. The state could be unknown if not provided by the manufacturer.
|
|
9
9
|
* @example "charging"
|
|
@@ -13,22 +13,22 @@ exports.ChargerStateSchema = zod_1.z.object({
|
|
|
13
13
|
* Whether the charger is plugged in.
|
|
14
14
|
* @example true
|
|
15
15
|
*/
|
|
16
|
-
isPluggedIn:
|
|
16
|
+
isPluggedIn: v4_1.z.boolean().optional().describe("Whether the charger is plugged in."),
|
|
17
17
|
/**
|
|
18
18
|
* The voltage of the charger in volts (V).
|
|
19
19
|
* @example 240
|
|
20
20
|
*/
|
|
21
|
-
chargerVoltage:
|
|
21
|
+
chargerVoltage: v4_1.z.number().min(0).max(1_000).optional().describe("The voltage of the charger in volts (V)."),
|
|
22
22
|
/**
|
|
23
23
|
* The current of the charger in amps (A).
|
|
24
24
|
* @example 40
|
|
25
25
|
*/
|
|
26
|
-
chargerCurrent:
|
|
26
|
+
chargerCurrent: v4_1.z.number().min(0).max(1_000).optional().describe("The current of the charger in amps (A)."),
|
|
27
27
|
/**
|
|
28
28
|
* The wattage of the charger in watts (W).
|
|
29
29
|
* @example 7200
|
|
30
30
|
*/
|
|
31
|
-
chargerWattage:
|
|
31
|
+
chargerWattage: v4_1.z.number().min(0).max(100_000).optional().describe("The wattage of the charger in watts (W)."),
|
|
32
32
|
});
|
|
33
|
-
exports.ChargerStaticStateSchema =
|
|
33
|
+
exports.ChargerStaticStateSchema = v4_1.z.object({});
|
|
34
34
|
//# sourceMappingURL=charger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charger.js","sourceRoot":"","sources":["../../src/deviceState/charger.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"charger.js","sourceRoot":"","sources":["../../src/deviceState/charger.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,qCAAoD;AAEvC,QAAA,kBAAkB,GAAG,MAAC,CAAC,MAAM,CAAC;IACzC;;;OAGG;IACH,aAAa,EAAE,iCAAwB,CAAC,QAAQ,CAC9C,4GAA4G,CAC7G;IACD;;;OAGG;IACH,WAAW,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IAClF;;;OAGG;IACH,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC5G;;;OAGG;IACH,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC3G;;;OAGG;IACH,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAC/G,CAAC,CAAC;AAGU,QAAA,wBAAwB,GAAG,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
2
|
/**
|
|
3
3
|
* The grid status.
|
|
4
4
|
* Shared for the inverter and battery devices.
|
|
5
5
|
* @example "exporting"
|
|
6
6
|
*/
|
|
7
7
|
export declare const GridStatuses: readonly ["exporting", "importing", "idle", "unknown"];
|
|
8
|
-
export declare const GridStatusEnum: z.ZodEnum<
|
|
8
|
+
export declare const GridStatusEnum: z.ZodEnum<{
|
|
9
|
+
unknown: "unknown";
|
|
10
|
+
idle: "idle";
|
|
11
|
+
exporting: "exporting";
|
|
12
|
+
importing: "importing";
|
|
13
|
+
}>;
|
|
9
14
|
export type GridStatus = z.infer<typeof GridStatusEnum>;
|
|
10
15
|
/**
|
|
11
16
|
* The recent estimate of power output to/from the grid in Watts (W).
|
|
@@ -23,7 +28,12 @@ export declare const GridEnergy: z.ZodNumber;
|
|
|
23
28
|
* @example "charging"
|
|
24
29
|
*/
|
|
25
30
|
export declare const BatteryChargingState: readonly ["charging", "discharging", "idle", "unknown"];
|
|
26
|
-
export declare const BatteryChargingStateEnum: z.ZodEnum<
|
|
31
|
+
export declare const BatteryChargingStateEnum: z.ZodEnum<{
|
|
32
|
+
unknown: "unknown";
|
|
33
|
+
idle: "idle";
|
|
34
|
+
charging: "charging";
|
|
35
|
+
discharging: "discharging";
|
|
36
|
+
}>;
|
|
27
37
|
export type BatteryChargingState = z.infer<typeof BatteryChargingStateEnum>;
|
|
28
38
|
/**
|
|
29
39
|
* Battery strategies or modes.
|
|
@@ -32,19 +42,41 @@ export type BatteryChargingState = z.infer<typeof BatteryChargingStateEnum>;
|
|
|
32
42
|
* But below are some of the most common strategies and modes that batteries offer in some form.
|
|
33
43
|
*/
|
|
34
44
|
export declare const BatteryStrategies: readonly ["unknown", "self_consumption", "time_of_use", "backup"];
|
|
35
|
-
export declare const BatteryStrategiesEnum: z.ZodDefault<z.ZodEnum<
|
|
45
|
+
export declare const BatteryStrategiesEnum: z.ZodDefault<z.ZodEnum<{
|
|
46
|
+
unknown: "unknown";
|
|
47
|
+
self_consumption: "self_consumption";
|
|
48
|
+
time_of_use: "time_of_use";
|
|
49
|
+
backup: "backup";
|
|
50
|
+
}>>;
|
|
36
51
|
export type BatteryStrategy = z.infer<typeof BatteryStrategiesEnum>;
|
|
37
52
|
export declare const CoreGridStateSchema: z.ZodObject<{
|
|
38
|
-
gridStatus: z.ZodOptional<z.ZodEnum<
|
|
53
|
+
gridStatus: z.ZodOptional<z.ZodEnum<{
|
|
54
|
+
unknown: "unknown";
|
|
55
|
+
idle: "idle";
|
|
56
|
+
exporting: "exporting";
|
|
57
|
+
importing: "importing";
|
|
58
|
+
}>>;
|
|
39
59
|
gridPower: z.ZodOptional<z.ZodNumber>;
|
|
40
60
|
gridEnergy: z.ZodOptional<z.ZodNumber>;
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
/**
|
|
63
|
+
* The instantaneous or average load power consumed by the home during this measurement interval in Watts (W).
|
|
64
|
+
* Represents the measured or projected power consumption for the measurement interval.
|
|
65
|
+
* @example 3500
|
|
66
|
+
*/
|
|
67
|
+
export declare const LoadPower: z.ZodNumber;
|
|
68
|
+
/**
|
|
69
|
+
* The measured or projected energy usage for the home load during the measurement interval in Watt-hours (Wh).
|
|
70
|
+
* Represents the measured or projected energy usage for the measurement interval.
|
|
71
|
+
* @example 2500
|
|
72
|
+
*/
|
|
73
|
+
export declare const LoadEnergy: z.ZodNumber;
|
|
74
|
+
/**
|
|
75
|
+
* Core schema for load-related state fields.
|
|
76
|
+
* Shared by inverter and battery devices to track home energy consumption.
|
|
77
|
+
*/
|
|
78
|
+
export declare const CoreLoadStateSchema: z.ZodObject<{
|
|
79
|
+
loadPower: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
loadEnergy: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
}, z.core.$strip>;
|
|
50
82
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/deviceState/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/deviceState/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;GAIG;AACH,eAAO,MAAM,YAAY,wDAAyD,CAAC;AACnF,eAAO,MAAM,cAAc;;;;;EAEkD,CAAC;AAC9E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,SAAS,aAKnB,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,UAAU,aAAsF,CAAC;AAE9G;;;GAGG;AACH,eAAO,MAAM,oBAAoB,yDAA0D,CAAC;AAC5F,eAAO,MAAM,wBAAwB;;;;;EAIlC,CAAC;AACJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,mEAWpB,CAAC;AACX,eAAO,MAAM,qBAAqB;;;;;GAGsC,CAAC;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,mBAAmB;;;;;;;;;iBAiB9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,SAAS,aAA4I,CAAC;AAEnK;;;;GAIG;AACH,eAAO,MAAM,UAAU,aAKpB,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;iBAW9B,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoreGridStateSchema = exports.BatteryStrategiesEnum = exports.BatteryStrategies = exports.BatteryChargingStateEnum = exports.BatteryChargingState = exports.GridEnergy = exports.GridPower = exports.GridStatusEnum = exports.GridStatuses = void 0;
|
|
4
|
-
const
|
|
3
|
+
exports.CoreLoadStateSchema = exports.LoadEnergy = exports.LoadPower = exports.CoreGridStateSchema = exports.BatteryStrategiesEnum = exports.BatteryStrategies = exports.BatteryChargingStateEnum = exports.BatteryChargingState = exports.GridEnergy = exports.GridPower = exports.GridStatusEnum = exports.GridStatuses = void 0;
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
5
|
/**
|
|
6
6
|
* The grid status.
|
|
7
7
|
* Shared for the inverter and battery devices.
|
|
8
8
|
* @example "exporting"
|
|
9
9
|
*/
|
|
10
10
|
exports.GridStatuses = ["exporting", "importing", "idle", "unknown"];
|
|
11
|
-
exports.GridStatusEnum =
|
|
11
|
+
exports.GridStatusEnum = v4_1.z
|
|
12
12
|
.enum(exports.GridStatuses)
|
|
13
13
|
.describe("The current grid status (importing, exporting, idle, unknown).");
|
|
14
14
|
/**
|
|
@@ -16,7 +16,7 @@ exports.GridStatusEnum = zod_1.z
|
|
|
16
16
|
* Positive values indicate importing from the grid, negative values indicate exporting to the grid.
|
|
17
17
|
* @example 5000
|
|
18
18
|
*/
|
|
19
|
-
exports.GridPower =
|
|
19
|
+
exports.GridPower = v4_1.z
|
|
20
20
|
.number()
|
|
21
21
|
.int()
|
|
22
22
|
.describe("The recent estimate of power output to/from the grid in Watts (W). Positive values indicate importing from the grid, negative values indicate exporting to the grid.");
|
|
@@ -24,13 +24,13 @@ exports.GridPower = zod_1.z
|
|
|
24
24
|
* Estimated recent grid energy usage in Watt-hours (Wh).
|
|
25
25
|
* @example 5000
|
|
26
26
|
*/
|
|
27
|
-
exports.GridEnergy =
|
|
27
|
+
exports.GridEnergy = v4_1.z.number().int().describe("Estimated recent grid energy usage in Watt-hours (Wh).");
|
|
28
28
|
/**
|
|
29
29
|
* The charging state.
|
|
30
30
|
* @example "charging"
|
|
31
31
|
*/
|
|
32
32
|
exports.BatteryChargingState = ["charging", "discharging", "idle", "unknown"];
|
|
33
|
-
exports.BatteryChargingStateEnum =
|
|
33
|
+
exports.BatteryChargingStateEnum = v4_1.z
|
|
34
34
|
.enum(exports.BatteryChargingState)
|
|
35
35
|
.describe("Whether the battery is currently charging. The state could be unknown if not provided by the manufacturer.");
|
|
36
36
|
/**
|
|
@@ -51,11 +51,11 @@ exports.BatteryStrategies = [
|
|
|
51
51
|
// With this strategy, the main goal is to keep the battery charged to a certain level (typically 100%) to be prepared for a power outage.
|
|
52
52
|
"backup",
|
|
53
53
|
];
|
|
54
|
-
exports.BatteryStrategiesEnum =
|
|
54
|
+
exports.BatteryStrategiesEnum = v4_1.z
|
|
55
55
|
.enum(exports.BatteryStrategies)
|
|
56
56
|
.default("unknown")
|
|
57
57
|
.describe("The current strategy or mode the battery is operating in.");
|
|
58
|
-
exports.CoreGridStateSchema =
|
|
58
|
+
exports.CoreGridStateSchema = v4_1.z.object({
|
|
59
59
|
// /**
|
|
60
60
|
// * The current grid status (importing, exporting, idle, unknown).
|
|
61
61
|
// * @example "exporting"
|
|
@@ -73,4 +73,35 @@ exports.CoreGridStateSchema = zod_1.z.object({
|
|
|
73
73
|
// */
|
|
74
74
|
gridEnergy: exports.GridEnergy.optional(),
|
|
75
75
|
});
|
|
76
|
+
/**
|
|
77
|
+
* The instantaneous or average load power consumed by the home during this measurement interval in Watts (W).
|
|
78
|
+
* Represents the measured or projected power consumption for the measurement interval.
|
|
79
|
+
* @example 3500
|
|
80
|
+
*/
|
|
81
|
+
exports.LoadPower = v4_1.z.number().min(0).describe("The measured or projected power consumption for the home load during the measurement interval in Watts (W).");
|
|
82
|
+
/**
|
|
83
|
+
* The measured or projected energy usage for the home load during the measurement interval in Watt-hours (Wh).
|
|
84
|
+
* Represents the measured or projected energy usage for the measurement interval.
|
|
85
|
+
* @example 2500
|
|
86
|
+
*/
|
|
87
|
+
exports.LoadEnergy = v4_1.z
|
|
88
|
+
.number()
|
|
89
|
+
.min(0)
|
|
90
|
+
.describe("The measured or projected energy usage for the home load during the measurement interval in Watt-hours (Wh).");
|
|
91
|
+
/**
|
|
92
|
+
* Core schema for load-related state fields.
|
|
93
|
+
* Shared by inverter and battery devices to track home energy consumption.
|
|
94
|
+
*/
|
|
95
|
+
exports.CoreLoadStateSchema = v4_1.z.object({
|
|
96
|
+
// /**
|
|
97
|
+
// * The instantaneous or average load power consumed by the home during this measurement interval in Watts (W).
|
|
98
|
+
// * @example 3500
|
|
99
|
+
// */
|
|
100
|
+
loadPower: exports.LoadPower.optional(),
|
|
101
|
+
// /**
|
|
102
|
+
// * The energy consumed by the home load during the measurement interval in Watt-hours (Wh).
|
|
103
|
+
// * @example 2500
|
|
104
|
+
// */
|
|
105
|
+
loadEnergy: exports.LoadEnergy.optional(),
|
|
106
|
+
});
|
|
76
107
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/deviceState/common.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/deviceState/common.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B;;;;GAIG;AACU,QAAA,YAAY,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AACtE,QAAA,cAAc,GAAG,MAAC;KAC5B,IAAI,CAAC,oBAAY,CAAC;KAClB,QAAQ,CAAC,gEAAgE,CAAC,CAAC;AAG9E;;;;GAIG;AACU,QAAA,SAAS,GAAG,MAAC;KACvB,MAAM,EAAE;KACR,GAAG,EAAE;KACL,QAAQ,CACP,sKAAsK,CACvK,CAAC;AAEJ;;;GAGG;AACU,QAAA,UAAU,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC,CAAC;AAE9G;;;GAGG;AACU,QAAA,oBAAoB,GAAG,CAAC,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAC/E,QAAA,wBAAwB,GAAG,MAAC;KACtC,IAAI,CAAC,4BAAoB,CAAC;KAC1B,QAAQ,CACP,4GAA4G,CAC7G,CAAC;AAGJ;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG;IAC/B,oFAAoF;IACpF,SAAS;IACT,6FAA6F;IAC7F,uFAAuF;IACvF,kBAAkB;IAClB,4HAA4H;IAC5H,sHAAsH;IACtH,aAAa;IACb,0IAA0I;IAC1I,QAAQ;CACA,CAAC;AACE,QAAA,qBAAqB,GAAG,MAAC;KACnC,IAAI,CAAC,yBAAiB,CAAC;KACvB,OAAO,CAAC,SAAS,CAAC;KAClB,QAAQ,CAAC,2DAA2D,CAAC,CAAC;AAG5D,QAAA,mBAAmB,GAAG,MAAC,CAAC,MAAM,CAAC;IAC1C,MAAM;IACN,oEAAoE;IACpE,0BAA0B;IAC1B,MAAM;IACN,UAAU,EAAE,sBAAc,CAAC,QAAQ,EAAE;IACrC,MAAM;IACN,wEAAwE;IACxE,uGAAuG;IACvG,mBAAmB;IACnB,MAAM;IACN,SAAS,EAAE,iBAAS,CAAC,QAAQ,EAAE;IAC/B,MAAM;IACN,4DAA4D;IAC5D,mBAAmB;IACnB,MAAM;IACN,UAAU,EAAE,kBAAU,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAEH;;;;GAIG;AACU,QAAA,SAAS,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6GAA6G,CAAC,CAAC;AAEnK;;;;GAIG;AACU,QAAA,UAAU,GAAG,MAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,CACP,8GAA8G,CAC/G,CAAC;AAEJ;;;GAGG;AACU,QAAA,mBAAmB,GAAG,MAAC,CAAC,MAAM,CAAC;IAC1C,MAAM;IACN,iHAAiH;IACjH,mBAAmB;IACnB,MAAM;IACN,SAAS,EAAE,iBAAS,CAAC,QAAQ,EAAE;IAC/B,MAAM;IACN,8FAA8F;IAC9F,mBAAmB;IACnB,MAAM;IACN,UAAU,EAAE,kBAAU,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC"}
|
|
@@ -1,89 +1,42 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
2
|
export declare const InverterStateSchema: z.ZodObject<{
|
|
3
|
-
/**
|
|
4
|
-
* The power output of the inverter in watts (W).
|
|
5
|
-
* @example 5000
|
|
6
|
-
*/
|
|
7
3
|
power: z.ZodNumber;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* @optional
|
|
11
|
-
* @example { charge: 43200, chargePercentage: 50, chargingState: "charging" }
|
|
12
|
-
*/
|
|
4
|
+
generatedEnergy: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
lifetimeEnergyGenerated: z.ZodOptional<z.ZodNumber>;
|
|
13
6
|
batteryState: z.ZodOptional<z.ZodObject<{
|
|
14
|
-
chargingState: z.ZodEnum<
|
|
7
|
+
chargingState: z.ZodEnum<{
|
|
8
|
+
unknown: "unknown";
|
|
9
|
+
idle: "idle";
|
|
10
|
+
charging: "charging";
|
|
11
|
+
discharging: "discharging";
|
|
12
|
+
}>;
|
|
15
13
|
charge: z.ZodNumber;
|
|
16
14
|
chargePercentage: z.ZodNumber;
|
|
17
15
|
chargeRate: z.ZodOptional<z.ZodNumber>;
|
|
18
16
|
backupReserve: z.ZodOptional<z.ZodNumber>;
|
|
19
17
|
isStormModeActive: z.ZodOptional<z.ZodBoolean>;
|
|
20
18
|
isStormModeEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
strategy: z.ZodOptional<z.ZodDefault<z.ZodEnum<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
charge: number;
|
|
34
|
-
chargePercentage: number;
|
|
35
|
-
chargeRate?: number | undefined;
|
|
36
|
-
backupReserve?: number | undefined;
|
|
37
|
-
isStormModeActive?: boolean | undefined;
|
|
38
|
-
isStormModeEnabled?: boolean | undefined;
|
|
39
|
-
strategy?: "unknown" | "self_consumption" | "time_of_use" | "backup" | undefined;
|
|
19
|
+
strategy: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
20
|
+
unknown: "unknown";
|
|
21
|
+
self_consumption: "self_consumption";
|
|
22
|
+
time_of_use: "time_of_use";
|
|
23
|
+
backup: "backup";
|
|
24
|
+
}>>>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
gridStatus: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
unknown: "unknown";
|
|
28
|
+
idle: "idle";
|
|
29
|
+
exporting: "exporting";
|
|
30
|
+
importing: "importing";
|
|
40
31
|
}>>;
|
|
41
|
-
} & {
|
|
42
|
-
gridStatus: z.ZodOptional<z.ZodEnum<["exporting", "importing", "idle", "unknown"]>>;
|
|
43
32
|
gridPower: z.ZodOptional<z.ZodNumber>;
|
|
44
33
|
gridEnergy: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
gridPower?: number | undefined;
|
|
49
|
-
gridEnergy?: number | undefined;
|
|
50
|
-
batteryState?: {
|
|
51
|
-
chargingState: "unknown" | "idle" | "charging" | "discharging";
|
|
52
|
-
charge: number;
|
|
53
|
-
chargePercentage: number;
|
|
54
|
-
chargeRate?: number | undefined;
|
|
55
|
-
backupReserve?: number | undefined;
|
|
56
|
-
isStormModeActive?: boolean | undefined;
|
|
57
|
-
isStormModeEnabled?: boolean | undefined;
|
|
58
|
-
strategy?: "unknown" | "self_consumption" | "time_of_use" | "backup" | undefined;
|
|
59
|
-
} | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
power: number;
|
|
62
|
-
gridStatus?: "unknown" | "idle" | "exporting" | "importing" | undefined;
|
|
63
|
-
gridPower?: number | undefined;
|
|
64
|
-
gridEnergy?: number | undefined;
|
|
65
|
-
batteryState?: {
|
|
66
|
-
chargingState: "unknown" | "idle" | "charging" | "discharging";
|
|
67
|
-
charge: number;
|
|
68
|
-
chargePercentage: number;
|
|
69
|
-
chargeRate?: number | undefined;
|
|
70
|
-
backupReserve?: number | undefined;
|
|
71
|
-
isStormModeActive?: boolean | undefined;
|
|
72
|
-
isStormModeEnabled?: boolean | undefined;
|
|
73
|
-
strategy?: "unknown" | "self_consumption" | "time_of_use" | "backup" | undefined;
|
|
74
|
-
} | undefined;
|
|
75
|
-
}>;
|
|
34
|
+
loadPower: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
loadEnergy: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
}, z.core.$strip>;
|
|
76
37
|
export type InverterState = z.infer<typeof InverterStateSchema>;
|
|
77
38
|
export declare const InverterStaticStateSchema: z.ZodObject<{
|
|
78
|
-
/**
|
|
79
|
-
* The maximum power output of the inverter in watts (W).
|
|
80
|
-
* @example 5000
|
|
81
|
-
*/
|
|
82
39
|
power: z.ZodNumber;
|
|
83
|
-
},
|
|
84
|
-
power: number;
|
|
85
|
-
}, {
|
|
86
|
-
power: number;
|
|
87
|
-
}>;
|
|
40
|
+
}, z.core.$strip>;
|
|
88
41
|
export type InverterStaticState = z.infer<typeof InverterStaticStateSchema>;
|
|
89
42
|
//# sourceMappingURL=inverter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverter.d.ts","sourceRoot":"","sources":["../../src/deviceState/inverter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"inverter.d.ts","sourceRoot":"","sources":["../../src/deviceState/inverter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2CI,CAAC;AACrC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,yBAAyB;;iBAMpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,16 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InverterStaticStateSchema = exports.InverterStateSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
5
|
const battery_1 = require("./battery");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
|
-
exports.InverterStateSchema =
|
|
7
|
+
exports.InverterStateSchema = v4_1.z
|
|
8
8
|
.object({
|
|
9
9
|
/**
|
|
10
10
|
* The power output of the inverter in watts (W).
|
|
11
11
|
* @example 5000
|
|
12
12
|
*/
|
|
13
|
-
power:
|
|
13
|
+
power: v4_1.z.number().min(0).max(10_000_000).describe("The power output of the inverter in watts (W)."),
|
|
14
|
+
/**
|
|
15
|
+
* The energy generated by the inverter during the measurement interval in watt-hours (Wh).
|
|
16
|
+
* Represents the measured or projected energy production for the measurement interval.
|
|
17
|
+
* @example 4200
|
|
18
|
+
* @optional
|
|
19
|
+
*/
|
|
20
|
+
generatedEnergy: v4_1.z
|
|
21
|
+
.number()
|
|
22
|
+
.min(0)
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("The energy generated by the inverter during the measurement interval in watt-hours (Wh)."),
|
|
25
|
+
/**
|
|
26
|
+
* The cumulative energy generated by the inverter over its lifetime in watt-hours (Wh).
|
|
27
|
+
* This is a monotonically increasing counter that represents total production at this point in time.
|
|
28
|
+
* @example 125000000
|
|
29
|
+
* @optional
|
|
30
|
+
*/
|
|
31
|
+
lifetimeEnergyGenerated: v4_1.z
|
|
32
|
+
.number()
|
|
33
|
+
.min(0)
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("The cumulative energy generated by the inverter over its lifetime in watt-hours (Wh)."),
|
|
14
36
|
/**
|
|
15
37
|
* The current state of the battery (mostly for hybrid inverters with battery backup support).
|
|
16
38
|
* @optional
|
|
@@ -19,12 +41,14 @@ exports.InverterStateSchema = zod_1.z
|
|
|
19
41
|
batteryState: battery_1.CoreBatteryStateSchema.optional(),
|
|
20
42
|
})
|
|
21
43
|
// attach grid state to inverter state
|
|
22
|
-
.
|
|
23
|
-
|
|
44
|
+
.extend(common_1.CoreGridStateSchema.shape)
|
|
45
|
+
// attach load state to inverter state
|
|
46
|
+
.extend(common_1.CoreLoadStateSchema.shape);
|
|
47
|
+
exports.InverterStaticStateSchema = v4_1.z.object({
|
|
24
48
|
/**
|
|
25
49
|
* The maximum power output of the inverter in watts (W).
|
|
26
50
|
* @example 5000
|
|
27
51
|
*/
|
|
28
|
-
power:
|
|
52
|
+
power: v4_1.z.number().min(0).max(10_000_000).describe("The maximum power output of the inverter in watts (W)."),
|
|
29
53
|
});
|
|
30
54
|
//# sourceMappingURL=inverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverter.js","sourceRoot":"","sources":["../../src/deviceState/inverter.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"inverter.js","sourceRoot":"","sources":["../../src/deviceState/inverter.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,uCAAmD;AACnD,qCAAoE;AAEvD,QAAA,mBAAmB,GAAG,MAAC;KACjC,MAAM,CAAC;IACN;;;OAGG;IACH,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,gDAAgD,CAAC;IACnG;;;;;OAKG;IACH,eAAe,EAAE,MAAC;SACf,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CACP,0FAA0F,CAC3F;IACH;;;;;OAKG;IACH,uBAAuB,EAAE,MAAC;SACvB,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CACP,uFAAuF,CACxF;IACH;;;;OAIG;IACH,YAAY,EAAE,gCAAsB,CAAC,QAAQ,EAAE;CAChD,CAAC;IACF,sCAAsC;KACrC,MAAM,CAAC,4BAAmB,CAAC,KAAK,CAAC;IAClC,sCAAsC;KACrC,MAAM,CAAC,4BAAmB,CAAC,KAAK,CAAC,CAAC;AAGxB,QAAA,yBAAyB,GAAG,MAAC,CAAC,MAAM,CAAC;IAChD;;;OAGG;IACH,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,wDAAwD,CAAC;CAC5G,CAAC,CAAC"}
|