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) {
|
||||
const arrayOfIDs = lightIds.split(',');
|
||||
arrayOfIDs.forEach((light) => {
|
||||
logger.debug('adjusting all hue lights');
|
||||
logger.debug('adjusting specified lights');
|
||||
(hueBridge.lights.setLightState(
|
||||
light,
|
||||
lightState
|
||||
) as Promise<any>).catch((error: Error) => {
|
||||
logger.error('Failed to adjust all lights.');
|
||||
logger.error('Failed to adjust specified lights.');
|
||||
logger.error(error);
|
||||
throw error;
|
||||
});
|
||||
@@ -60,12 +60,12 @@ const adjustLightsWithAPI = (hueBridge: Api) => {
|
||||
.getAll()
|
||||
.then((allLights: any[]) => {
|
||||
allLights.forEach((light: any) => {
|
||||
logger.debug('adjusting specified lights');
|
||||
logger.debug('adjusting all hue lights');
|
||||
(hueBridge.lights.setLightState(
|
||||
light,
|
||||
lightState
|
||||
) as Promise<any>).catch((error: Error) => {
|
||||
logger.error('Failed to adjust specified lights.');
|
||||
logger.error('Failed to adjust all lights.');
|
||||
logger.error(error);
|
||||
throw error;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user