Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for ELKO Super TR + ctm_thermostat #7871

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/devices/ctm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ const fzLocal = {
// Load
result.load = data[0x0401];
}
if (data.hasOwnProperty('elkoLoad')) {
// Load
result.load = data['elkoLoad'];
}
if (data.hasOwnProperty(0x0402)) {
// Display text
result.display_text = data[0x0402];
Expand All @@ -123,10 +127,27 @@ const fzLocal = {
};
result.sensor = utils.getFromLookup(data[0x0403], sensorModeLookup);
}
if (data.hasOwnProperty('elkoSensor')) {
// Sensor
const sensorModeLookup = {
0: 'air',
1: 'floor',
2: 'external',
3: 'regulator',
4: 'mv_air',
5: 'mv_external',
6: 'mv_regulator',
};
result.sensor = utils.getFromLookup(data['elkoSensor'], sensorModeLookup);
}
if (data.hasOwnProperty(0x0405)) {
// Regulator mode
result.regulator_mode = data[0x0405] ? 'regulator' : 'thermostat';
}
if (data.hasOwnProperty('elkoRegulatorMode')) {
// Regulator mode
result.regulator_mode = data['elkoRegulatorMode'] ? 'regulator' : 'thermostat';
}
if (data.hasOwnProperty(0x0406)) {
// Power status
result.power_status = data[0x0406] ? 'ON' : 'OFF';
Expand All @@ -139,6 +160,10 @@ const fzLocal = {
// Mean power
result.mean_power = data[0x0408];
}
if (data.hasOwnProperty('elkoMeanPower')) {
// Mean power
result.mean_power = data['elkoMeanPower'];
}
if (data.hasOwnProperty(0x0409)) {
// Floor temp
result.floor_temp = utils.precisionRound(data[0x0409], 2) / 100;
Expand All @@ -151,18 +176,34 @@ const fzLocal = {
// Night switching
result.night_switching = data[0x0411] ? 'ON' : 'OFF';
}
if (data.hasOwnProperty('elkoNightSwitching')) {
// Night switching
result.night_switching = data['elkoNightSwitching'] ? 'ON' : 'OFF';
}
if (data.hasOwnProperty(0x0412)) {
// Frost guard
result.frost_guard = data[0x0412] ? 'ON' : 'OFF';
}
if (data.hasOwnProperty('elkoFrostGuard')) {
// Frost guard
result.frost_guard = data['elkoFrostGuard'] ? 'ON' : 'OFF';
}
if (data.hasOwnProperty(0x0413)) {
// Child lock
result.child_lock = data[0x0413] ? 'LOCK' : 'UNLOCK';
}
if (data.hasOwnProperty('elkoChildLock')) {
// Child lock
result.child_lock = data['elkoChildLock'] ? 'LOCK' : 'UNLOCK';
}
if (data.hasOwnProperty(0x0414)) {
// Max floor temp
result.max_floor_temp = data[0x0414];
}
if (data.hasOwnProperty('elkoMaxFloorTemp')) {
// Max floor temp
result.max_floor_temp = data['elkoMaxFloorTemp'];
}
if (data.hasOwnProperty(0x0415)) {
// Running_state
result.running_state = data[0x0415] ? 'heat' : 'idle';
Expand Down
4 changes: 2 additions & 2 deletions src/devices/elko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ const definitions: Definition[] = [
description: 'Device in regulator or thermostat mode.',
access: 'ALL',
reporting: {attribute: 'elkoRegulatorMode', min: 0, max: constants.repInterval.HOUR, change: null},
valueOn: ['regulator', 0],
valueOff: ['thermostat', 1],
valueOn: ['regulator', 1],
valueOff: ['thermostat', 0],
}),
numeric({
name: 'regulator_time',
Expand Down
Loading