trane-thermostat-api 1.0.0 → 1.0.2
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/LICENSE +1 -1
- package/README.md +11 -20
- package/dist/client/auth.d.ts.map +1 -1
- package/dist/client/auth.js +27 -13
- package/dist/client/auth.js.map +1 -1
- package/dist/client/nexia-client.d.ts +3 -3
- package/dist/client/trane-client.d.ts +49 -0
- package/dist/client/trane-client.d.ts.map +1 -0
- package/dist/client/trane-client.js +332 -0
- package/dist/client/trane-client.js.map +1 -0
- package/dist/devices/nexia-thermostat.d.ts +2 -2
- package/dist/devices/nexia-zone.d.ts +3 -3
- package/dist/devices/trane-automation.d.ts +15 -0
- package/dist/devices/trane-automation.d.ts.map +1 -0
- package/dist/devices/trane-automation.js +39 -0
- package/dist/devices/trane-automation.js.map +1 -0
- package/dist/devices/trane-sensor.d.ts +34 -0
- package/dist/devices/trane-sensor.d.ts.map +1 -0
- package/dist/devices/trane-sensor.js +152 -0
- package/dist/devices/trane-sensor.js.map +1 -0
- package/dist/devices/trane-thermostat.d.ts +74 -0
- package/dist/devices/trane-thermostat.d.ts.map +1 -0
- package/dist/devices/trane-thermostat.js +457 -0
- package/dist/devices/trane-thermostat.js.map +1 -0
- package/dist/devices/trane-zone.d.ts +61 -0
- package/dist/devices/trane-zone.d.ts.map +1 -0
- package/dist/devices/trane-zone.js +370 -0
- package/dist/devices/trane-zone.js.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +11 -11
- package/dist/types/api.d.ts +36 -6
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/constants.d.ts +2 -5
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/constants.js +3 -6
- package/dist/types/constants.js.map +1 -1
- package/dist/types/interfaces.d.ts +23 -23
- package/dist/utils/errors.d.ts +13 -13
- package/dist/utils/errors.js +21 -21
- package/dist/utils/validation.d.ts +1 -1
- package/dist/utils/validation.js +3 -3
- package/package.json +4 -8
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { BrandType, OperationMode, PresetMode, AirCleanerMode, TemperatureUnit, SensorType } from './constants';
|
|
2
2
|
import { TemperatureOptions, HumidityOptions, FanOptions, HoldOptions, UpdateOptions, SensorSelectionOptions, DeviceCapabilities, SystemStatusSummary, ZoneStatusSummary } from './api';
|
|
3
|
-
export interface
|
|
3
|
+
export interface ITraneClient {
|
|
4
4
|
login(): Promise<void>;
|
|
5
5
|
logout(): Promise<void>;
|
|
6
6
|
isAuthenticated(): boolean;
|
|
7
|
-
getThermostats(): Promise<
|
|
8
|
-
getAutomations(): Promise<
|
|
9
|
-
getThermostatById(id: string):
|
|
10
|
-
getAutomationById(id: string):
|
|
7
|
+
getThermostats(): Promise<ITraneThermostat[]>;
|
|
8
|
+
getAutomations(): Promise<ITraneAutomation[]>;
|
|
9
|
+
getThermostatById(id: string): ITraneThermostat | undefined;
|
|
10
|
+
getAutomationById(id: string): ITraneAutomation | undefined;
|
|
11
11
|
update(options?: UpdateOptions): Promise<void>;
|
|
12
12
|
readonly brand: BrandType;
|
|
13
13
|
readonly username: string;
|
|
14
14
|
getHouseId(): number | undefined;
|
|
15
15
|
readonly lastUpdate: Date | null;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface ITraneThermostat {
|
|
18
18
|
readonly id: string;
|
|
19
19
|
readonly name: string;
|
|
20
20
|
readonly model: string;
|
|
@@ -66,12 +66,12 @@ export interface INexiaThermostat {
|
|
|
66
66
|
setAirCleanerMode(mode: AirCleanerMode): Promise<void>;
|
|
67
67
|
setEmergencyHeat(enabled: boolean): Promise<void>;
|
|
68
68
|
setFollowSchedule(follow: boolean): Promise<void>;
|
|
69
|
-
readonly zones:
|
|
69
|
+
readonly zones: ITraneZone[];
|
|
70
70
|
readonly zoneIds: string[];
|
|
71
|
-
getZoneById(zoneId: string):
|
|
71
|
+
getZoneById(zoneId: string): ITraneZone | undefined;
|
|
72
72
|
refresh(): Promise<void>;
|
|
73
73
|
}
|
|
74
|
-
export interface
|
|
74
|
+
export interface ITraneZone {
|
|
75
75
|
readonly id: string;
|
|
76
76
|
readonly name: string;
|
|
77
77
|
readonly isNativeZone: boolean;
|
|
@@ -94,16 +94,16 @@ export interface INexiaZone {
|
|
|
94
94
|
readonly availablePresets: PresetMode[];
|
|
95
95
|
readonly currentPreset: PresetMode | null;
|
|
96
96
|
setPreset(preset: PresetMode): Promise<void>;
|
|
97
|
-
readonly sensors:
|
|
97
|
+
readonly sensors: ITraneSensor[];
|
|
98
98
|
readonly activeSensorIds: Set<number>;
|
|
99
99
|
readonly sensorIds: number[];
|
|
100
|
-
getSensorById(sensorId: number):
|
|
100
|
+
getSensorById(sensorId: number): ITraneSensor | undefined;
|
|
101
101
|
selectActiveSensors(options: SensorSelectionOptions): Promise<void>;
|
|
102
|
-
readonly thermostat:
|
|
102
|
+
readonly thermostat: ITraneThermostat;
|
|
103
103
|
validateTemperatureSetpoints(heatTemp: number, coolTemp: number): boolean;
|
|
104
104
|
roundTemperature(temperature: number): number;
|
|
105
105
|
}
|
|
106
|
-
export interface
|
|
106
|
+
export interface ITraneSensor {
|
|
107
107
|
readonly id: number;
|
|
108
108
|
readonly name: string;
|
|
109
109
|
readonly type: SensorType;
|
|
@@ -123,7 +123,7 @@ export interface INexiaSensor {
|
|
|
123
123
|
readonly hasOnlineStatus: boolean;
|
|
124
124
|
isDataValid(): boolean;
|
|
125
125
|
}
|
|
126
|
-
export interface
|
|
126
|
+
export interface ITraneAutomation {
|
|
127
127
|
readonly id: string;
|
|
128
128
|
readonly name: string;
|
|
129
129
|
readonly description: string;
|
|
@@ -131,7 +131,7 @@ export interface INexiaAutomation {
|
|
|
131
131
|
setEnabled(enabled: boolean): Promise<void>;
|
|
132
132
|
activate(): Promise<void>;
|
|
133
133
|
}
|
|
134
|
-
export interface
|
|
134
|
+
export interface TraneConfig {
|
|
135
135
|
username: string;
|
|
136
136
|
password: string;
|
|
137
137
|
brand?: BrandType;
|
|
@@ -141,13 +141,13 @@ export interface NexiaConfig {
|
|
|
141
141
|
timeout?: number;
|
|
142
142
|
retryAttempts?: number;
|
|
143
143
|
}
|
|
144
|
-
export interface
|
|
144
|
+
export interface TraneEvent {
|
|
145
145
|
type: 'update' | 'error' | 'connected' | 'disconnected';
|
|
146
146
|
timestamp: Date;
|
|
147
147
|
data?: any;
|
|
148
148
|
error?: Error;
|
|
149
149
|
}
|
|
150
|
-
export interface
|
|
150
|
+
export interface ITraneEventListener {
|
|
151
151
|
onUpdate?(data: any): void;
|
|
152
152
|
onError?(error: Error): void;
|
|
153
153
|
onConnected?(): void;
|
|
@@ -195,15 +195,15 @@ export interface IHomebridgePlatform {
|
|
|
195
195
|
export interface IHomebridgeAccessory {
|
|
196
196
|
readonly platform: IHomebridgePlatform;
|
|
197
197
|
readonly accessory: any;
|
|
198
|
-
readonly device:
|
|
198
|
+
readonly device: ITraneThermostat | ITraneZone | ITraneSensor;
|
|
199
199
|
setupServices(): void;
|
|
200
200
|
updateCharacteristics(): void;
|
|
201
201
|
}
|
|
202
|
-
export interface
|
|
203
|
-
isThermostat(device: any): device is
|
|
204
|
-
isZone(device: any): device is
|
|
205
|
-
isSensor(device: any): device is
|
|
206
|
-
isAutomation(device: any): device is
|
|
202
|
+
export interface ITraneTypeGuards {
|
|
203
|
+
isThermostat(device: any): device is ITraneThermostat;
|
|
204
|
+
isZone(device: any): device is ITraneZone;
|
|
205
|
+
isSensor(device: any): device is ITraneSensor;
|
|
206
|
+
isAutomation(device: any): device is ITraneAutomation;
|
|
207
207
|
isValidTemperature(value: any, unit: TemperatureUnit): boolean;
|
|
208
208
|
isValidHumidity(value: any): boolean;
|
|
209
209
|
isValidFanSpeed(value: any): boolean;
|
package/dist/utils/errors.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare class
|
|
1
|
+
export declare class TraneError extends Error {
|
|
2
2
|
code: string;
|
|
3
3
|
readonly timestamp: Date;
|
|
4
4
|
constructor(message: string, code?: string);
|
|
5
5
|
}
|
|
6
|
-
export declare class AuthenticationError extends
|
|
6
|
+
export declare class AuthenticationError extends TraneError {
|
|
7
7
|
constructor(message?: string);
|
|
8
8
|
}
|
|
9
9
|
export declare class RateLimitError extends AuthenticationError {
|
|
@@ -13,7 +13,7 @@ export declare class RateLimitError extends AuthenticationError {
|
|
|
13
13
|
export declare class SessionExpiredError extends AuthenticationError {
|
|
14
14
|
constructor(message?: string);
|
|
15
15
|
}
|
|
16
|
-
export declare class ValidationError extends
|
|
16
|
+
export declare class ValidationError extends TraneError {
|
|
17
17
|
readonly field?: string;
|
|
18
18
|
readonly value?: unknown;
|
|
19
19
|
constructor(message: string, field?: string, value?: unknown);
|
|
@@ -35,7 +35,7 @@ export declare class DeadbandValidationError extends ValidationError {
|
|
|
35
35
|
readonly coolTemp: number;
|
|
36
36
|
constructor(message: string, deadband: number, heatTemp: number, coolTemp: number);
|
|
37
37
|
}
|
|
38
|
-
export declare class ApiError extends
|
|
38
|
+
export declare class ApiError extends TraneError {
|
|
39
39
|
readonly statusCode?: number;
|
|
40
40
|
readonly response?: unknown;
|
|
41
41
|
constructor(message: string, statusCode?: number, response?: unknown);
|
|
@@ -43,7 +43,7 @@ export declare class ApiError extends NexiaError {
|
|
|
43
43
|
export declare class HttpError extends ApiError {
|
|
44
44
|
constructor(message: string, statusCode: number, response?: unknown);
|
|
45
45
|
}
|
|
46
|
-
export declare class NetworkError extends
|
|
46
|
+
export declare class NetworkError extends TraneError {
|
|
47
47
|
readonly originalError?: Error;
|
|
48
48
|
constructor(message: string, originalError?: Error);
|
|
49
49
|
}
|
|
@@ -51,26 +51,26 @@ export declare class TimeoutError extends NetworkError {
|
|
|
51
51
|
readonly timeout: number;
|
|
52
52
|
constructor(message: string, timeout: number);
|
|
53
53
|
}
|
|
54
|
-
export declare class DeviceNotFoundError extends
|
|
54
|
+
export declare class DeviceNotFoundError extends TraneError {
|
|
55
55
|
readonly deviceId: string;
|
|
56
56
|
readonly deviceType: string;
|
|
57
57
|
constructor(message: string, deviceId: string, deviceType?: string);
|
|
58
58
|
}
|
|
59
|
-
export declare class FeatureNotSupportedError extends
|
|
59
|
+
export declare class FeatureNotSupportedError extends TraneError {
|
|
60
60
|
readonly feature: string;
|
|
61
61
|
readonly deviceModel?: string;
|
|
62
62
|
constructor(feature: string, deviceModel?: string);
|
|
63
63
|
}
|
|
64
|
-
export declare class OperationNotAllowedError extends
|
|
64
|
+
export declare class OperationNotAllowedError extends TraneError {
|
|
65
65
|
readonly operation: string;
|
|
66
66
|
readonly reason?: string;
|
|
67
67
|
constructor(operation: string, reason?: string);
|
|
68
68
|
}
|
|
69
|
-
export declare class ConfigurationError extends
|
|
69
|
+
export declare class ConfigurationError extends TraneError {
|
|
70
70
|
readonly configField?: string;
|
|
71
71
|
constructor(message: string, configField?: string);
|
|
72
72
|
}
|
|
73
|
-
export declare class ParseError extends
|
|
73
|
+
export declare class ParseError extends TraneError {
|
|
74
74
|
readonly data?: unknown;
|
|
75
75
|
constructor(message: string, data?: unknown);
|
|
76
76
|
}
|
|
@@ -81,14 +81,14 @@ export declare class ErrorFactory {
|
|
|
81
81
|
static createDeadbandError(heatTemp: number, coolTemp: number, deadband: number, unit: string): DeadbandValidationError;
|
|
82
82
|
private static getHttpStatusMessage;
|
|
83
83
|
}
|
|
84
|
-
export declare function
|
|
84
|
+
export declare function isTraneError(error: unknown): error is TraneError;
|
|
85
85
|
export declare function isAuthenticationError(error: unknown): error is AuthenticationError;
|
|
86
86
|
export declare function isValidationError(error: unknown): error is ValidationError;
|
|
87
87
|
export declare function isApiError(error: unknown): error is ApiError;
|
|
88
88
|
export declare function isNetworkError(error: unknown): error is NetworkError;
|
|
89
89
|
export declare class ErrorHandler {
|
|
90
|
-
static handle(error: unknown):
|
|
91
|
-
static isRetryable(error:
|
|
90
|
+
static handle(error: unknown): TraneError;
|
|
91
|
+
static isRetryable(error: TraneError): boolean;
|
|
92
92
|
static getRetryDelay(attempt: number, baseDelay?: number): number;
|
|
93
93
|
}
|
|
94
94
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/utils/errors.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ErrorHandler = exports.ErrorFactory = exports.ParseError = exports.ConfigurationError = exports.OperationNotAllowedError = exports.FeatureNotSupportedError = exports.DeviceNotFoundError = exports.TimeoutError = exports.NetworkError = exports.HttpError = exports.ApiError = exports.DeadbandValidationError = exports.TemperatureValidationError = exports.ValidationError = exports.SessionExpiredError = exports.RateLimitError = exports.AuthenticationError = exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.ErrorHandler = exports.ErrorFactory = exports.ParseError = exports.ConfigurationError = exports.OperationNotAllowedError = exports.FeatureNotSupportedError = exports.DeviceNotFoundError = exports.TimeoutError = exports.NetworkError = exports.HttpError = exports.ApiError = exports.DeadbandValidationError = exports.TemperatureValidationError = exports.ValidationError = exports.SessionExpiredError = exports.RateLimitError = exports.AuthenticationError = exports.TraneError = void 0;
|
|
4
|
+
exports.isTraneError = isTraneError;
|
|
5
5
|
exports.isAuthenticationError = isAuthenticationError;
|
|
6
6
|
exports.isValidationError = isValidationError;
|
|
7
7
|
exports.isApiError = isApiError;
|
|
8
8
|
exports.isNetworkError = isNetworkError;
|
|
9
|
-
class
|
|
9
|
+
class TraneError extends Error {
|
|
10
10
|
constructor(message, code = 'UNKNOWN_ERROR') {
|
|
11
11
|
super(message);
|
|
12
|
-
this.name = '
|
|
12
|
+
this.name = 'TraneError';
|
|
13
13
|
this.code = code;
|
|
14
14
|
this.timestamp = new Date();
|
|
15
15
|
if (Error.captureStackTrace) {
|
|
16
|
-
Error.captureStackTrace(this,
|
|
16
|
+
Error.captureStackTrace(this, TraneError);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
exports.
|
|
21
|
-
class AuthenticationError extends
|
|
20
|
+
exports.TraneError = TraneError;
|
|
21
|
+
class AuthenticationError extends TraneError {
|
|
22
22
|
constructor(message = 'Authentication failed') {
|
|
23
23
|
super(message, 'AUTH_ERROR');
|
|
24
24
|
this.name = 'AuthenticationError';
|
|
@@ -42,7 +42,7 @@ class SessionExpiredError extends AuthenticationError {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
exports.SessionExpiredError = SessionExpiredError;
|
|
45
|
-
class ValidationError extends
|
|
45
|
+
class ValidationError extends TraneError {
|
|
46
46
|
constructor(message, field, value) {
|
|
47
47
|
super(message, 'VALIDATION_ERROR');
|
|
48
48
|
this.name = 'ValidationError';
|
|
@@ -72,7 +72,7 @@ class DeadbandValidationError extends ValidationError {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
exports.DeadbandValidationError = DeadbandValidationError;
|
|
75
|
-
class ApiError extends
|
|
75
|
+
class ApiError extends TraneError {
|
|
76
76
|
constructor(message, statusCode, response) {
|
|
77
77
|
super(message, 'API_ERROR');
|
|
78
78
|
this.name = 'ApiError';
|
|
@@ -89,7 +89,7 @@ class HttpError extends ApiError {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
exports.HttpError = HttpError;
|
|
92
|
-
class NetworkError extends
|
|
92
|
+
class NetworkError extends TraneError {
|
|
93
93
|
constructor(message, originalError) {
|
|
94
94
|
super(message, 'NETWORK_ERROR');
|
|
95
95
|
this.name = 'NetworkError';
|
|
@@ -106,7 +106,7 @@ class TimeoutError extends NetworkError {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
exports.TimeoutError = TimeoutError;
|
|
109
|
-
class DeviceNotFoundError extends
|
|
109
|
+
class DeviceNotFoundError extends TraneError {
|
|
110
110
|
constructor(message, deviceId, deviceType = 'device') {
|
|
111
111
|
super(message, 'DEVICE_NOT_FOUND');
|
|
112
112
|
this.name = 'DeviceNotFoundError';
|
|
@@ -115,7 +115,7 @@ class DeviceNotFoundError extends NexiaError {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
exports.DeviceNotFoundError = DeviceNotFoundError;
|
|
118
|
-
class FeatureNotSupportedError extends
|
|
118
|
+
class FeatureNotSupportedError extends TraneError {
|
|
119
119
|
constructor(feature, deviceModel) {
|
|
120
120
|
const message = deviceModel
|
|
121
121
|
? `Feature '${feature}' is not supported on device model '${deviceModel}'`
|
|
@@ -127,7 +127,7 @@ class FeatureNotSupportedError extends NexiaError {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
exports.FeatureNotSupportedError = FeatureNotSupportedError;
|
|
130
|
-
class OperationNotAllowedError extends
|
|
130
|
+
class OperationNotAllowedError extends TraneError {
|
|
131
131
|
constructor(operation, reason) {
|
|
132
132
|
const message = reason
|
|
133
133
|
? `Operation '${operation}' is not allowed: ${reason}`
|
|
@@ -139,7 +139,7 @@ class OperationNotAllowedError extends NexiaError {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
exports.OperationNotAllowedError = OperationNotAllowedError;
|
|
142
|
-
class ConfigurationError extends
|
|
142
|
+
class ConfigurationError extends TraneError {
|
|
143
143
|
constructor(message, configField) {
|
|
144
144
|
super(message, 'CONFIG_ERROR');
|
|
145
145
|
this.name = 'ConfigurationError';
|
|
@@ -147,7 +147,7 @@ class ConfigurationError extends NexiaError {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
exports.ConfigurationError = ConfigurationError;
|
|
150
|
-
class ParseError extends
|
|
150
|
+
class ParseError extends TraneError {
|
|
151
151
|
constructor(message, data) {
|
|
152
152
|
super(message, 'PARSE_ERROR');
|
|
153
153
|
this.name = 'ParseError';
|
|
@@ -189,8 +189,8 @@ class ErrorFactory {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
exports.ErrorFactory = ErrorFactory;
|
|
192
|
-
function
|
|
193
|
-
return error instanceof
|
|
192
|
+
function isTraneError(error) {
|
|
193
|
+
return error instanceof TraneError;
|
|
194
194
|
}
|
|
195
195
|
function isAuthenticationError(error) {
|
|
196
196
|
return error instanceof AuthenticationError;
|
|
@@ -206,16 +206,16 @@ function isNetworkError(error) {
|
|
|
206
206
|
}
|
|
207
207
|
class ErrorHandler {
|
|
208
208
|
static handle(error) {
|
|
209
|
-
if (
|
|
209
|
+
if (isTraneError(error)) {
|
|
210
210
|
return error;
|
|
211
211
|
}
|
|
212
212
|
if (error instanceof Error) {
|
|
213
|
-
return new
|
|
213
|
+
return new TraneError(error.message, 'UNKNOWN_ERROR');
|
|
214
214
|
}
|
|
215
215
|
if (typeof error === 'string') {
|
|
216
|
-
return new
|
|
216
|
+
return new TraneError(error, 'UNKNOWN_ERROR');
|
|
217
217
|
}
|
|
218
|
-
return new
|
|
218
|
+
return new TraneError('An unknown error occurred', 'UNKNOWN_ERROR');
|
|
219
219
|
}
|
|
220
220
|
static isRetryable(error) {
|
|
221
221
|
return (isNetworkError(error) ||
|
|
@@ -32,7 +32,7 @@ export declare class GeneralValidator {
|
|
|
32
32
|
static validateDate(value: any, fieldName: string): Date;
|
|
33
33
|
static validateRequiredProperties<T extends Record<string, any>>(obj: any, requiredProps: (keyof T)[], objectName: string): void;
|
|
34
34
|
}
|
|
35
|
-
export declare class
|
|
35
|
+
export declare class TraneValidator {
|
|
36
36
|
static validateTemperatureConfig(config: {
|
|
37
37
|
heatTemp?: number;
|
|
38
38
|
coolTemp?: number;
|
package/dist/utils/validation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TraneValidator = exports.GeneralValidator = exports.FanSpeedValidator = exports.HumidityValidator = exports.TemperatureValidator = void 0;
|
|
4
4
|
const constants_1 = require("../types/constants");
|
|
5
5
|
const errors_1 = require("./errors");
|
|
6
6
|
class TemperatureValidator {
|
|
@@ -214,7 +214,7 @@ class GeneralValidator {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
exports.GeneralValidator = GeneralValidator;
|
|
217
|
-
class
|
|
217
|
+
class TraneValidator {
|
|
218
218
|
static validateTemperatureConfig(config) {
|
|
219
219
|
const { heatTemp, coolTemp, deadband, unit, setTemp } = config;
|
|
220
220
|
if (setTemp !== undefined) {
|
|
@@ -268,5 +268,5 @@ class NexiaValidator {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
exports.
|
|
271
|
+
exports.TraneValidator = TraneValidator;
|
|
272
272
|
//# sourceMappingURL=validation.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trane-thermostat-api",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Node.js TypeScript library for controlling Trane
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Node.js TypeScript library for controlling Trane thermostats",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -10,20 +10,16 @@
|
|
|
10
10
|
"test": "jest",
|
|
11
11
|
"test:watch": "jest --watch",
|
|
12
12
|
"test:coverage": "jest --coverage",
|
|
13
|
-
"lint": "eslint src --ext .ts",
|
|
14
|
-
"lint:fix": "eslint src --ext .ts --fix",
|
|
13
|
+
"lint": "eslint src --ext .ts --fix",
|
|
15
14
|
"prepublishOnly": "npm run build",
|
|
16
15
|
"type-check": "tsc --noEmit"
|
|
17
16
|
},
|
|
18
17
|
"keywords": [
|
|
19
18
|
"trane",
|
|
20
|
-
"nexia",
|
|
21
|
-
"american-standard",
|
|
22
19
|
"thermostat",
|
|
23
|
-
"typescript",
|
|
24
20
|
"hvac"
|
|
25
21
|
],
|
|
26
|
-
"author": "
|
|
22
|
+
"author": "sbs44",
|
|
27
23
|
"license": "MIT",
|
|
28
24
|
"dependencies": {
|
|
29
25
|
"axios": "^1.13.4",
|