Skip to content

Commit

Permalink
Add debug-output to get location-info
Browse files Browse the repository at this point in the history
  • Loading branch information
yusijs committed Feb 12, 2024
1 parent 0095792 commit 5d07312
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ process.on('exit', () => {
try {
for (const location of homes) {
const homeData = await home(location.locationId);
if (process.env.GET_LOCATION) {
console.log(
`Getting location info for ${location.name}. The process will exit afterwards`
);
console.log(JSON.stringify(homeData, null, 2));
process.exit(1);
}
logger.debug(`Home data retrieved from homely:
${JSON.stringify(homeData, null, 2)}`);
Expand Down

0 comments on commit 5d07312

Please sign in to comment.