Skip to content

Commit

Permalink
🐛 Fix power on behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasvdh committed Jul 2, 2019
1 parent c590eb3 commit 68eacb3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "codes.lucasvdh.philips-jointspace",
"version": "0.3.1",
"version": "0.3.2",
"compatibility": ">=1.5.0",
"sdk": 2,
"name": {
Expand Down
10 changes: 3 additions & 7 deletions drivers/philips-jointspace/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,12 @@ class PhilipsTV extends Homey.Device {
if (value === true) {
this.deviceLog('turning on device');

(new Promise((resolve, reject) => {
return (new Promise((resolve, reject) => {
this.powerOnDevice(resolve, reject);
})).then((response) => {
this.deviceLog('Powered on', response);
}).catch((error) => {
this.deviceLog('Power on failed');
console.log(error);
});

return true;
return response;
})
} else {
return this.getJointspaceClient().setPowerState('Standby');
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "philips-jointspace",
"version": "0.3.1",
"version": "0.3.2",
"dependencies": {
"request": "^2.88.0",
"https": "^1.0.0",
Expand Down

0 comments on commit 68eacb3

Please sign in to comment.