Skip to content

Commit 4d7502d

Browse files
committed
Prettier
1 parent 89e0aba commit 4d7502d

File tree

5 files changed

+12
-25
lines changed

5 files changed

+12
-25
lines changed

src/driver/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,8 @@ const { Utils } = require('gateway-addon');
1818

1919
const { PROFILE_ID } = require('../zb-constants');
2020

21-
const {
22-
DEBUG_flow,
23-
DEBUG_frames,
24-
DEBUG_frameDetail,
25-
DEBUG_frameParsing,
26-
} = require('../zb-debug').default;
21+
const { DEBUG_flow, DEBUG_frames, DEBUG_frameDetail, DEBUG_frameParsing } =
22+
require('../zb-debug').default;
2723

2824
const WAIT_TIMEOUT_DELAY = 1 * 1000;
2925
const EXTENDED_TIMEOUT_DELAY = 10 * 1000;

src/driver/xbee.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,8 @@ const {
2222
ZigbeeDriver,
2323
} = require('./index');
2424

25-
const {
26-
DEBUG_flow,
27-
DEBUG_frameDetail,
28-
DEBUG_frames,
29-
DEBUG_rawFrames,
30-
} = require('../zb-debug').default;
25+
const { DEBUG_flow, DEBUG_frameDetail, DEBUG_frames, DEBUG_rawFrames } =
26+
require('../zb-debug').default;
3127

3228
const C = xbeeApi.constants;
3329
const AT_CMD = at.AT_CMD;

src/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,7 @@ const cc2531SerialProber = new SerialProber({
160160
],
161161

162162
probeRsp: [
163-
0xfe,
164-
0x02,
165-
0x61,
166-
0x01,
163+
0xfe, 0x02, 0x61, 0x01,
167164
// CAPABILITIES
168165
],
169166

src/zigbee2mqtt/zigbee2mqtt-device.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class Zigbee2MqttDevice extends Device {
107107

108108
private createLightProperties(expose: Expos): void {
109109
if (expose.features) {
110-
((this as unknown) as { '@type': string[] })['@type'].push('Light');
110+
(this as unknown as { '@type': string[] })['@type'].push('Light');
111111

112112
for (const feature of expose.features) {
113113
if (feature.name) {
@@ -184,7 +184,7 @@ export class Zigbee2MqttDevice extends Device {
184184

185185
private createSmartPlugProperties(expose: Expos): void {
186186
if (expose.features) {
187-
((this as unknown) as { '@type': string[] })['@type'].push('SmartPlug');
187+
(this as unknown as { '@type': string[] })['@type'].push('SmartPlug');
188188

189189
for (const feature of expose.features) {
190190
if (feature.name) {
@@ -216,7 +216,7 @@ export class Zigbee2MqttDevice extends Device {
216216

217217
private createThermostatProperties(expose: Expos): void {
218218
if (expose.features) {
219-
((this as unknown) as { '@type': string[] })['@type'].push('Thermostat');
219+
(this as unknown as { '@type': string[] })['@type'].push('Thermostat');
220220

221221
for (const feature of expose.features) {
222222
if (feature.name) {
@@ -304,7 +304,7 @@ export class Zigbee2MqttDevice extends Device {
304304
}
305305

306306
if (isPushbutton) {
307-
const device = (this as unknown) as { '@type': string[] };
307+
const device = this as unknown as { '@type': string[] };
308308
device['@type'].push('PushButton');
309309
}
310310
} else {
@@ -372,9 +372,7 @@ export class Zigbee2MqttDevice extends Device {
372372
continue;
373373
}
374374

375-
const exists = ((this as unknown) as { events: Map<string, EventSchema> }).events.has(
376-
value
377-
);
375+
const exists = (this as unknown as { events: Map<string, EventSchema> }).events.has(value);
378376

379377
if (!exists) {
380378
if (debug()) {
@@ -423,7 +421,7 @@ export class Zigbee2MqttDevice extends Device {
423421
}
424422

425423
fetchValues(): void {
426-
const { properties } = (this as unknown) as {
424+
const { properties } = this as unknown as {
427425
properties: Map<string, Zigbee2MqttProperty<Any>>;
428426
};
429427

src/zigbee2mqtt/zigbee2mqtt-property.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class Zigbee2MqttProperty<T extends Any> extends Property<T> {
8484

8585
switch (name) {
8686
case 'occupancy': {
87-
const device = (this.getDevice() as unknown) as { '@type': string[] };
87+
const device = this.getDevice() as unknown as { '@type': string[] };
8888
device['@type'].push('MotionSensor');
8989
this.setAtType('MotionProperty');
9090
break;

0 commit comments

Comments
 (0)