Skip to content

Commit

Permalink
fix(ignore): fix 99613a7
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Apr 25, 2024
1 parent 260daff commit 99af051
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/devices/sonoff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -805,23 +805,23 @@ const definitions: Definition[] = [
extend: [
binary({
name: 'child_lock',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'childLock',
description: 'Enables/disables physical input on the device',
valueOn: ['LOCK', 0x01],
valueOff: ['UNLOCK', 0x00],
}),
binary({
name: 'open_window',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'openWindow',
description: 'Automatically turns off the radiator when local temperature drops by more than 1.5°C in 4.5 minutes.',
valueOn: ['ON', 0x01],
valueOff: ['OFF', 0x00],
}),
numeric({
name: 'frost_protection_temperature',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'frostProtectionTemperature',
description: 'Minimum temperature at which to automatically turn on the radiator, ' +
'if system mode is off, to prevent pipes freezing.',
Expand All @@ -833,45 +833,45 @@ const definitions: Definition[] = [
}),
numeric({
name: 'idle_steps',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'idleSteps',
description: 'Number of steps used for calibration (no-load steps)',
access: 'STATE_GET',
}),
numeric({
name: 'closing_steps',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'closingSteps',
description: 'Number of steps it takes to close the valve',
access: 'STATE_GET',
}),
numeric({
name: 'valve_opening_limit_voltage',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'valveOpeningLimitVoltage',
description: 'Valve opening limit voltage',
unit: 'mV',
access: 'STATE_GET',
}),
numeric({
name: 'valve_closing_limit_voltage',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'valveClosingLimitVoltage',
description: 'Valve closing limit voltage',
unit: 'mV',
access: 'STATE_GET',
}),
numeric({
name: 'valve_motor_running_voltage',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'valveMotorRunningVoltage',
description: 'Valve motor running voltage',
unit: 'mV',
access: 'STATE_GET',
}),
numeric({
name: 'valve_opening_degree',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'valveOpeningDegree',
description: 'Valve open position (percentage) control. ' +
'If the opening degree is set to 100%, the valve is fully open when it is opened. ' +
Expand All @@ -885,7 +885,7 @@ const definitions: Definition[] = [
}),
numeric({
name: 'valve_closing_degree',
cluster: 'sonoffTrvzbCluster',
cluster: 'customSonoffTrvzb',
attribute: 'valveClosingDegree',
description: 'Valve closed position (percentage) control. ' +
'If the closing degree is set to 100%, the valve is fully closed when it is closed. ' +
Expand All @@ -911,11 +911,10 @@ const definitions: Definition[] = [
await endpoint.read(0xFC11, [0x0000, 0x6000, 0x6002, 0x6003, 0x6004, 0x6005, 0x6006, 0x6007]);
},
onEvent: async (type, data, device, settings, state) => {
const name = 'sonoffTrvzbCluster';
const name = 'customSonoffTrvzb';
if (!device.customClusters[name]) {
device.addCustomCluster(name, {
ID: 0xfc11,
manufacturerCode: 0x1286,
attributes: {
childLock: {ID: 0x0000, type: Zcl.DataType.boolean},
tamper: {ID: 0x2000, type: Zcl.DataType.uint8},
Expand Down

0 comments on commit 99af051

Please sign in to comment.