Skip to content

Commit

Permalink
2021.31.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandlehner committed Aug 6, 2021
1 parent 7cf2c39 commit 680f618
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 46 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use strict';
/* eslint arrow-body-style: ["off", "never"] */

let Service;
Expand Down Expand Up @@ -28,7 +27,7 @@ class OnkyoPlatform {
platform.numberReceivers = platform.receivers.length;
platform.log.debug('Creating %s receivers...', platform.numberReceivers);
if (platform.numberReceivers === 0) return;
receivers.forEach(receiver => {
receivers.forEach(receiver => { // eslint-disable-line unicorn/no-array-for-each
if (!this.connections[receiver.ip_address]) {
platform.log.debug('Creating new connection for ip %s', receiver.ip_address);
this.connections[receiver.ip_address] = require('eiscp');
Expand Down Expand Up @@ -131,7 +130,7 @@ class OnkyoAccessory {
this.avrSerial = this.config.serial || this.ip_address;
this.log.debug('avrSerial: %s', this.avrSerial);
this.switchHandling = 'check';
if (this.interval > 10 && this.interval < 100000)
if (this.interval > 10 && this.interval < 100_000)
this.switchHandling = 'poll';

this.eiscp.on('debug', this.eventDebug.bind(this));
Expand Down
91 changes: 50 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-onkyo",
"version": "2021.28.1",
"version": "2021.32.1",
"description": "Homebridge plugin for Onkyo Receivers",
"main": "index.js",
"scripts": {
Expand All @@ -18,7 +18,7 @@
"devDependencies": {
"eslint": ">=7.30.0",
"eslint-plugin-ava": "^12.0.0",
"eslint-plugin-unicorn": "^25.0.1",
"eslint-plugin-unicorn": "latest",
"eslint-plugin-json": "^3.0.0",
"xo": ">=0.40.1"
},
Expand All @@ -41,6 +41,9 @@
"xo": {
"space": false,
"rules": {
"unicorn/prefer-module": "warn",
"unicorn/no-new-array": "warn",
"unicorn/no-array-for-each": "warn",
"camelcase": "off",
"kebabCase": "off",
"no-mixed-spaces-and-tabs": "warn",
Expand Down

0 comments on commit 680f618

Please sign in to comment.