🐛 Fix Philips Hue API Connection (#2631)

* 🐛 Fix Philips Hue API Connection

* Philips Hue Node: Fixed typo in  update operation description
This commit is contained in:
Tom
2022-01-13 07:51:58 +01:00
committed by GitHub
parent c9e1892cd9
commit e0ef645514
4 changed files with 15 additions and 14 deletions

View File

@@ -74,13 +74,13 @@ export class PhilipsHue implements INodeType {
const lights = await philipsHueApiRequest.call(
this,
'GET',
`/bridge/${user}/lights`,
`/api/${user}/lights`,
);
const groups = await philipsHueApiRequest.call(
this,
'GET',
`/bridge/${user}/groups`,
`/api/${user}/groups`,
);
for (const light of Object.keys(lights)) {
@@ -144,7 +144,7 @@ export class PhilipsHue implements INodeType {
const data = await philipsHueApiRequest.call(
this,
'PUT',
`/bridge/${user}/lights/${lightId}/state`,
`/api/${user}/lights/${lightId}/state`,
body,
);
@@ -161,7 +161,7 @@ export class PhilipsHue implements INodeType {
const user = await getUser.call(this);
responseData = await philipsHueApiRequest.call(this, 'DELETE', `/bridge/${user}/lights/${lightId}`);
responseData = await philipsHueApiRequest.call(this, 'DELETE', `/api/${user}/lights/${lightId}`);
}
if (operation === 'getAll') {
@@ -169,7 +169,7 @@ export class PhilipsHue implements INodeType {
const user = await getUser.call(this);
const lights = await philipsHueApiRequest.call(this, 'GET', `/bridge/${user}/lights`);
const lights = await philipsHueApiRequest.call(this, 'GET', `/api/${user}/lights`);
responseData = Object.values(lights);
@@ -183,7 +183,7 @@ export class PhilipsHue implements INodeType {
const user = await getUser.call(this);
responseData = await philipsHueApiRequest.call(this, 'GET', `/bridge/${user}/lights/${lightId}`);
responseData = await philipsHueApiRequest.call(this, 'GET', `/api/${user}/lights/${lightId}`);
}
}
}