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

Namron touch thermostat bug fix #4210

Merged
merged 1 commit into from
May 5, 2022
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
4 changes: 2 additions & 2 deletions converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -1693,10 +1693,10 @@ const converters = {
result.temperature_display = lookup[data[0x1008]];
}
if (data.hasOwnProperty(0x1009)) { // WindowOpenCheck
result.window_open_check = data[0x1009];
result.window_open_check = data[0x1009] / 2;
}
if (data.hasOwnProperty(0x100A)) { // Hysterersis
result.hysterersis = data[0x100A];
result.hysterersis = precisionRound(data[0x100A], 2) / 10;
}
if (data.hasOwnProperty(0x100B)) { // DisplayAutoOffEnable
const lookup = {0: 'enable', 1: 'disable'};
Expand Down
4 changes: 2 additions & 2 deletions converters/toZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -3062,10 +3062,10 @@ const converters = {
const payload = {0x1008: {value: lookup[value], type: herdsman.Zcl.DataType.enum8}};
await entity.write('hvacThermostat', payload, manufacturerOptions.sunricher);
} else if (key==='window_open_check') {
const payload = {0x1009: {value: Math.round(value * 10), type: 0x20}};
const payload = {0x1009: {value: value * 2, type: 0x20}};
await entity.write('hvacThermostat', payload, manufacturerOptions.sunricher);
} else if (key==='hysterersis') {
const payload = {0x100A: {value: Math.round(value * 10), type: 0x20}};
const payload = {0x100A: {value: value* 10, type: 0x20}};
await entity.write('hvacThermostat', payload, manufacturerOptions.sunricher);
} else if (key==='display_auto_off_enabled') {
const lookup = {'enable': 0, 'disabled': 1};
Expand Down
12 changes: 6 additions & 6 deletions devices/namron.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ module.exports = [
exposes.climate()
.withSetpoint('occupied_heating_setpoint', 0, 40, 0.1)
.withLocalTemperature()
.withLocalTemperatureCalibration(-30, 30, 0.1)
.withLocalTemperatureCalibration(-3, 3, 0.1)
.withSystemMode(['off', 'auto', 'heat'])
.withRunningState(['idle', 'heat']),
exposes.binary('away_mode', ea.ALL, 'ON', 'OFF')
Expand Down Expand Up @@ -308,16 +308,16 @@ module.exports = [
.withDescription('The temperature on the display. Default: Room Temperature.'),
exposes.numeric('window_open_check', ea.ALL)
.withUnit('°C')
.withValueMin(3).withValueMax(8).withValueStep(0.5)
.withDescription('The threshold to detect window open, between 3 and 8 in 0.5 °C. Default: 0 (disabled).'),
.withValueMin(1.5).withValueMax(4).withValueStep(0.5)
.withDescription('The threshold to detect window open, between 1.5 and 4 in 0.5 °C. Default: 0 (disabled).'),
exposes.numeric('hysterersis', ea.ALL)
.withUnit('°C')
.withValueMin(5).withValueMax(20).withValueStep(0.1)
.withDescription('Hysteresis setting, between 5 and 20 in 0.1 °C. Default: 5.'),
.withValueMin(0.5).withValueMax(2).withValueStep(0.1)
.withDescription('Hysteresis setting, between 0.5 and 2 in 0.1 °C. Default: 0.5.'),
exposes.enum('display_auto_off_enabled', ea.ALL, ['enable', 'disabled']),
exposes.numeric('alarm_airtemp_overvalue', ea.ALL)
.withUnit('°C')
.withValueMin(20).withValueMax(60).withValueStep(1)
.withValueMin(20).withValueMax(60)
.withDescription('Room temperature alarm threshold, between 20 and 60 in °C. 0 means disabled. Default: 45.'),
],
configure: async (device, coordinatorEndpoint, logger) => {
Expand Down