Skip to content

Commit

Permalink
0.7.14
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandlehner committed Feb 28, 2020
1 parent 3c3069f commit d1f4223
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ let Characteristic;
let Accessory;
let RxInputs;
const pollingtoevent = require('polling-to-event');
const round = require('math-round');

const accessories = [];
const info = require('./package.json');
Expand Down Expand Up @@ -409,7 +408,7 @@ class OnkyoAccessory {
if (this.mapVolume100) {
const volumeMultiplier = this.maxVolume / 100;
const newVolume = response / volumeMultiplier;
this.v_state = round(newVolume);
this.v_state = Math.round(newVolume);
this.log.debug('eventVolume - message: %s, new v_state %s PERCENT', response, this.v_state);
} else {
this.v_state = response;
Expand Down Expand Up @@ -595,7 +594,7 @@ class OnkyoAccessory {
if (this.mapVolume100) {
const volumeMultiplier = this.maxVolume / 100;
const newVolume = volumeMultiplier * volumeLvl;
this.v_state = round(newVolume);
this.v_state = Math.round(newVolume);
this.log.debug('setVolumeState - actual mode, PERCENT, volume v_state: %s', this.v_state);
} else if (volumeLvl > this.maxVolume) {
// Determin if maxVolume threshold breached, if so set to max.
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-onkyo",
"version": "0.7.13",
"version": "0.7.14",
"description": "Homebridge plugin for Onkyo Receivers",
"main": "index.js",
"scripts": {
Expand All @@ -13,7 +13,6 @@
},
"dependencies": {
"eiscp": "git+https://github.com/tillbaks/node-eiscp.git",
"math-round": "^1.0.0",
"polling-to-event": "^2.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit d1f4223

Please sign in to comment.