trane-thermostat-api 1.0.0 → 1.0.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Spencer S
3
+ Copyright (c) 2026 sbs44
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  import { BrandType } from '../types/constants';
2
2
  import { NexiaClientConfig, UpdateOptions } from '../types/api';
3
- import { INexiaClient, INexiaThermostat, INexiaAutomation } from '../types/interfaces';
3
+ import { INexiaClient, ITraneThermostat, INexiaAutomation } from '../types/interfaces';
4
4
  export declare class NexiaClient implements INexiaClient {
5
5
  private readonly httpClient;
6
6
  private readonly authManager;
@@ -16,9 +16,9 @@ export declare class NexiaClient implements INexiaClient {
16
16
  login(): Promise<void>;
17
17
  logout(): Promise<void>;
18
18
  isAuthenticated(): boolean;
19
- getThermostats(): Promise<INexiaThermostat[]>;
19
+ getThermostats(): Promise<ITraneThermostat[]>;
20
20
  getAutomations(): Promise<INexiaAutomation[]>;
21
- getThermostatById(id: string): INexiaThermostat | undefined;
21
+ getThermostatById(id: string): ITraneThermostat | undefined;
22
22
  getAutomationById(id: string): INexiaAutomation | undefined;
23
23
  update(options?: UpdateOptions): Promise<void>;
24
24
  get<T>(url: string, headers?: Record<string, string>): Promise<T>;
@@ -1,8 +1,8 @@
1
1
  import { ThermostatData, DeviceCapabilities, SystemStatusSummary, HumidityOptions, FanOptions } from '../types/api';
2
- import { INexiaThermostat, INexiaZone } from '../types/interfaces';
2
+ import { ITraneThermostat, INexiaZone } from '../types/interfaces';
3
3
  import { AirCleanerMode, TemperatureUnit } from '../types/constants';
4
4
  import { NexiaClient } from '../client/nexia-client';
5
- export declare class NexiaThermostat implements INexiaThermostat {
5
+ export declare class NexiaThermostat implements ITraneThermostat {
6
6
  private readonly client;
7
7
  private readonly data;
8
8
  private readonly zonesMap;
@@ -1,5 +1,5 @@
1
1
  import { ZoneData, ZoneStatusSummary, TemperatureOptions, HoldOptions, SensorSelectionOptions } from '../types/api';
2
- import { INexiaZone, INexiaThermostat, INexiaSensor } from '../types/interfaces';
2
+ import { INexiaZone, ITraneThermostat, INexiaSensor } from '../types/interfaces';
3
3
  import { OperationMode, PresetMode } from '../types/constants';
4
4
  import { NexiaClient } from '../client/nexia-client';
5
5
  export declare class NexiaZone implements INexiaZone {
@@ -7,7 +7,7 @@ export declare class NexiaZone implements INexiaZone {
7
7
  private readonly thermostatRef;
8
8
  private readonly data;
9
9
  private readonly sensorsMap;
10
- constructor(client: NexiaClient, thermostat: INexiaThermostat, data: ZoneData);
10
+ constructor(client: NexiaClient, thermostat: ITraneThermostat, data: ZoneData);
11
11
  get id(): string;
12
12
  get name(): string;
13
13
  get isNativeZone(): boolean;
@@ -36,7 +36,7 @@ export declare class NexiaZone implements INexiaZone {
36
36
  getSensorById(sensorId: number): INexiaSensor | undefined;
37
37
  selectActiveSensors(options: SensorSelectionOptions): Promise<void>;
38
38
  loadCurrentSensorState(): Promise<void>;
39
- get thermostat(): INexiaThermostat;
39
+ get thermostat(): ITraneThermostat;
40
40
  validateTemperatureSetpoints(heatTemp: number, coolTemp: number): boolean;
41
41
  roundTemperature(temperature: number): number;
42
42
  private initializeSensors;
@@ -4,9 +4,9 @@ export interface INexiaClient {
4
4
  login(): Promise<void>;
5
5
  logout(): Promise<void>;
6
6
  isAuthenticated(): boolean;
7
- getThermostats(): Promise<INexiaThermostat[]>;
7
+ getThermostats(): Promise<ITraneThermostat[]>;
8
8
  getAutomations(): Promise<INexiaAutomation[]>;
9
- getThermostatById(id: string): INexiaThermostat | undefined;
9
+ getThermostatById(id: string): ITraneThermostat | undefined;
10
10
  getAutomationById(id: string): INexiaAutomation | undefined;
11
11
  update(options?: UpdateOptions): Promise<void>;
12
12
  readonly brand: BrandType;
@@ -14,7 +14,7 @@ export interface INexiaClient {
14
14
  getHouseId(): number | undefined;
15
15
  readonly lastUpdate: Date | null;
16
16
  }
17
- export interface INexiaThermostat {
17
+ export interface ITraneThermostat {
18
18
  readonly id: string;
19
19
  readonly name: string;
20
20
  readonly model: string;
@@ -99,7 +99,7 @@ export interface INexiaZone {
99
99
  readonly sensorIds: number[];
100
100
  getSensorById(sensorId: number): INexiaSensor | undefined;
101
101
  selectActiveSensors(options: SensorSelectionOptions): Promise<void>;
102
- readonly thermostat: INexiaThermostat;
102
+ readonly thermostat: ITraneThermostat;
103
103
  validateTemperatureSetpoints(heatTemp: number, coolTemp: number): boolean;
104
104
  roundTemperature(temperature: number): number;
105
105
  }
@@ -195,12 +195,12 @@ export interface IHomebridgePlatform {
195
195
  export interface IHomebridgeAccessory {
196
196
  readonly platform: IHomebridgePlatform;
197
197
  readonly accessory: any;
198
- readonly device: INexiaThermostat | INexiaZone | INexiaSensor;
198
+ readonly device: ITraneThermostat | INexiaZone | INexiaSensor;
199
199
  setupServices(): void;
200
200
  updateCharacteristics(): void;
201
201
  }
202
202
  export interface INexiaTypeGuards {
203
- isThermostat(device: any): device is INexiaThermostat;
203
+ isThermostat(device: any): device is ITraneThermostat;
204
204
  isZone(device: any): device is INexiaZone;
205
205
  isSensor(device: any): device is INexiaSensor;
206
206
  isAutomation(device: any): device is INexiaAutomation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trane-thermostat-api",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Node.js TypeScript library for controlling Trane/Nexia/American Standard thermostats",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,8 +10,7 @@
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
  },
@@ -23,7 +22,7 @@
23
22
  "typescript",
24
23
  "hvac"
25
24
  ],
26
- "author": "Spencer S",
25
+ "author": "sbs44",
27
26
  "license": "MIT",
28
27
  "dependencies": {
29
28
  "axios": "^1.13.4",