mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 02:57:34 +00:00
chore(philips-hue): correct the log text (#1523)
This commit is contained in:
@@ -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;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user