Skip to content

Commit 5f0f668

Browse files
committed
correctly scale HEATING_CONTROL_HMIP.LEVEL
- closes #460 - closes #748 - closes #756
1 parent c9fe92b commit 5f0f668

File tree

8 files changed

+57
-53
lines changed

8 files changed

+57
-53
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ To update all available images execute `npm run update-images`
160160

161161
### __WORK IN PROGRESS__
162162
* (foxriver76) added new images (closes #778, closes #873, closes #882)
163-
* (foxriver76) fix wrong paramsets (closes #617, closes #584, closes #539, closes #764)
163+
* (foxriver76) fix wrong paramsets (closes #617, closes #584, closes #539, closes #764, closes #460, closes #748, closes #756)
164164
* (foxriver76) fix wrong events (closes #872)
165165

166166
### 1.15.16 (2022-12-08)

build/lib/tools.js

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

build/lib/tools.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.

build/main.js

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

build/main.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.

src/lib/_types.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,8 @@ export interface ListDevicesEntry {
114114
export type Daemon = 'CUxD' | 'virtual-devices' | 'rfd' | 'hs485d' | 'HMIP';
115115

116116
export interface FixParamsetParams {
117-
/** the parameter key e.g. LEVEL */
118-
key: string;
119-
/** the paramset */
117+
/** the paramset, which will be fixed */
120118
paramObj: ParamsetObjectWithSpecial | ParamsetObject;
121-
/** the object to fix */
122-
obj: ioBroker.SettableStateObject;
123119
/** selected daemon type */
124120
daemon: Daemon;
125121
}

src/lib/tools.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,26 +273,31 @@ export function combineEPaperCommand(
273273
* @param params relevant parameters
274274
*/
275275
export function fixParamset(params: FixParamsetParams): void {
276-
const { key, obj, paramObj, daemon } = params;
276+
const { paramObj, daemon } = params;
277277

278278
// #346: it seems like if devices connect to a HMIP-HAP, RSSI_DEVICE shows 128, eq3 should fix this, but lets workaround
279-
if (key === 'RSSI_DEVICE') {
280-
obj.common.max = 128;
279+
if (paramObj.ID === 'RSSI_DEVICE') {
280+
paramObj.MAX = 128;
281281
}
282282

283283
// #617, #584: for the codes there is often a value greater than max set, so we remove the max for now
284284
if (paramObj.CONTROL === 'MAINTENANCE.CODE_ID') {
285-
delete obj.common.max;
285+
paramObj.MAX = 9_999;
286286
}
287287

288288
// # 539: while HMIP heating groups correctly have min 4.5 this is not the case for rfd somehow
289289
if (paramObj.CONTROL === 'HEATING_CONTROL.SETPOINT' && daemon === 'virtual-devices') {
290-
obj.common.min = 4.5;
290+
paramObj.MIN = 4.5;
291291
}
292292

293293
// #764: HMIP heating groups active profile is declared with a max of 3 but 6 is the real max
294294
if (paramObj.CONTROL === 'HEATING_CONTROL_HMIP.ACTIVE_PROFILE' && daemon === 'virtual-devices') {
295-
obj.common.max = 6;
295+
paramObj.MAX = 6;
296+
}
297+
298+
// #460 #748, #756: Heating control levels are displayed as UNIT: % with max of 1, but it should scale to 100
299+
if (paramObj.CONTROL === 'HEATING_CONTROL_HMIP.LEVEL') {
300+
paramObj.UNIT = '100%';
296301
}
297302
}
298303

0 commit comments

Comments
 (0)