Skip to content

Commit b37f96f

Browse files
committed
Update SetHeatMode to support other heater types
Thanks to @afri in #1
1 parent 458048b commit b37f96f

File tree

13 files changed

+111
-35
lines changed

13 files changed

+111
-35
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [v0.5.0] - 2025-03-21
9+
10+
### Changed
11+
12+
- [Breaking change] SetHeatMode message now accepts a HeaterType value rather than an enabled boolean to support other heater types than just MasterTemp.
13+
814
## [v0.4.0] - 2025-01-25
915

1016
### Changed

cjs/example.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cjs/example.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cjs/messages/set-heater.d.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
import { ICRequest } from "./request.js";
2+
export declare enum HeaterType {
3+
NoChange = 0,
4+
Off = 1,
5+
Heater = 2,
6+
SolarOnly = 3,
7+
SolarPreferred = 4,
8+
UltraTemp = 5,
9+
UltraTempPreferred = 6,
10+
HybridGas = 7,
11+
HybridUltraTemp = 8,
12+
HybridHybrid = 9,
13+
HybridDual = 10,
14+
MasterTemp = 11,
15+
MaxETherm = 12,
16+
ETI250 = 13
17+
}
218
/**
319
* Requests to turn a body's heater on or off.
420
*
5-
* This is very WIP. For my pool and my heater configuration, the MODE needs to be 11 to enable my
6-
* heater and 1 to disable all heaters. I have a feeling 11 is unique to my system's configuration,
7-
* but I can't yet determine how to know what 11 maps to in order to make this more generic.
8-
*
921
* Note that this doesn't necessarily start heating the body by itself - if the body's pump is
1022
* currently off, enabling the heater will not turn it on. If the pump/body is on, then this will
1123
* enable the heater and no further action is required.
1224
*
1325
* @returns the object used to issue this request
1426
*/
15-
export declare function SetHeatMode(bodyObjnam: string, enabled: boolean): ICRequest;
27+
export declare function SetHeatMode(bodyObjnam: string, heaterType: HeaterType): ICRequest;

cjs/messages/set-heater.js

Lines changed: 20 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cjs/messages/set-heater.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/example.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/example.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)