chore(philips-hue): correct the log text (#1523)

This commit is contained in:
Collin Garvey
2020-12-27 02:18:06 -05:00
committed by GitHub
parent a908ce417b
commit ca1564e8fa
+4 -4
View File
@@ -44,12 +44,12 @@ const adjustLightsWithAPI = (hueBridge: Api) => {
if (lightIds) { if (lightIds) {
const arrayOfIDs = lightIds.split(','); const arrayOfIDs = lightIds.split(',');
arrayOfIDs.forEach((light) => { arrayOfIDs.forEach((light) => {
logger.debug('adjusting all hue lights'); logger.debug('adjusting specified lights');
(hueBridge.lights.setLightState( (hueBridge.lights.setLightState(
light, light,
lightState lightState
) as Promise<any>).catch((error: Error) => { ) as Promise<any>).catch((error: Error) => {
logger.error('Failed to adjust all lights.'); logger.error('Failed to adjust specified lights.');
logger.error(error); logger.error(error);
throw error; throw error;
}); });
@@ -60,12 +60,12 @@ const adjustLightsWithAPI = (hueBridge: Api) => {
.getAll() .getAll()
.then((allLights: any[]) => { .then((allLights: any[]) => {
allLights.forEach((light: any) => { allLights.forEach((light: any) => {
logger.debug('adjusting specified lights'); logger.debug('adjusting all hue lights');
(hueBridge.lights.setLightState( (hueBridge.lights.setLightState(
light, light,
lightState lightState
) as Promise<any>).catch((error: Error) => { ) as Promise<any>).catch((error: Error) => {
logger.error('Failed to adjust specified lights.'); logger.error('Failed to adjust all lights.');
logger.error(error); logger.error(error);
throw error; throw error;
}); });