Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
Lower config timeout & better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
maykar authored Jun 30, 2021
1 parent 4bfe630 commit 9bb52f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kiosk-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ class KioskMode {
const llConfig = lovelace.lovelace.config;
const config = llConfig.kiosk_mode || {};
this.processConfig(lovelace, config);
} catch {
if (this.llAttempts < 300) {
} catch (e) {
if (this.llAttempts < 200) {
setTimeout(() => this.getConfig(lovelace), 50);
} else {
console.log("Lovelace config not found, continuing with default configuration.");
console.log(e);
this.processConfig(lovelace, {});
}
}
Expand Down

0 comments on commit 9bb52f6

Please sign in to comment.