diff --git a/src/devices/third_reality.ts b/src/devices/third_reality.ts index e24e4be174aaa..b82488e169881 100644 --- a/src/devices/third_reality.ts +++ b/src/devices/third_reality.ts @@ -5,19 +5,17 @@ import tz from '../converters/toZigbee'; import * as exposes from '../lib/exposes'; import {battery, deviceAddCustomCluster, humidity, iasZoneAlarm, light, onOff, temperature} from '../lib/modernExtend'; import * as reporting from '../lib/reporting'; -import {DefinitionWithExtend, Fz, KeyValue} from '../lib/types'; +import {DefinitionWithExtend, Fz} from '../lib/types'; const e = exposes.presets; const fzLocal = { thirdreality_acceleration: { - cluster: '65521', + cluster: '3rVirationSpecialcluster', type: ['attributeReport', 'readResponse'], convert: (model, msg, publish, options, meta) => { - const payload: KeyValue = {}; - if (msg.data['1']) payload.x_axis = msg.data['1']; - if (msg.data['2']) payload.y_axis = msg.data['2']; - if (msg.data['3']) payload.z_axis = msg.data['3']; + if (msg.data['0'] == 0) return; + const payload = {xAxis: msg.data['xAxis'], yAxis: msg.data['yAxis'], zAxis: msg.data['zAxis']}; return payload; }, } satisfies Fz.Converter, @@ -427,9 +425,9 @@ const definitions: DefinitionWithExtend[] = [ manufacturerCode: 0x1233, attributes: { coolDownTime: {ID: 0x0004, type: Zcl.DataType.UINT16}, - xAxis: {ID: 0x0001, type: Zcl.DataType.UINT16}, - yAxis: {ID: 0x0002, type: Zcl.DataType.UINT16}, - zAxis: {ID: 0x0003, type: Zcl.DataType.UINT16}, + xAxis: {ID: 0x0001, type: Zcl.DataType.INT16}, + yAxis: {ID: 0x0002, type: Zcl.DataType.INT16}, + zAxis: {ID: 0x0003, type: Zcl.DataType.INT16}, }, commands: {}, commandsResponse: {},