Skip to content

Commit

Permalink
fix: Update 3r virate xyz axis (#8462)
Browse files Browse the repository at this point in the history
Co-authored-by: jintj <[email protected]>
Co-authored-by: Koen Kanters <[email protected]>
  • Loading branch information
3 people authored Dec 10, 2024
1 parent ea9f815 commit 6e3c0e3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/devices/third_reality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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} from '../lib/types';
import {DefinitionWithExtend, Fz, KeyValue} from '../lib/types';

const e = exposes.presets;

Expand All @@ -14,8 +14,10 @@ const fzLocal = {
cluster: '3rVirationSpecialcluster',
type: ['attributeReport', 'readResponse'],
convert: (model, msg, publish, options, meta) => {
if (msg.data['0'] == 0) return;
const payload = {x_axis: msg.data['x_axis'], y_axis: msg.data['y_axis'], z_axis: msg.data['z_axis']};
const payload: KeyValue = {};
if (msg.data['xAxis']) payload.x_axis = msg.data['xAxis'];
if (msg.data['yAxis']) payload.y_axis = msg.data['yAxis'];
if (msg.data['zAxis']) payload.z_axis = msg.data['zAxis'];
return payload;
},
} satisfies Fz.Converter,
Expand Down

0 comments on commit 6e3c0e3

Please sign in to comment.