1
0
Fork 0

ha: merge read & parse logic

master
Rob Pilling 2024-04-21 19:29:44 +01:00
parent e2a62eabca
commit 60c6f35151
1 changed files with 1 additions and 2 deletions

View File

@ -36,8 +36,7 @@ exports.getTriggers = function(){
var triggers; var triggers;
try{ try{
triggers = require("Storage").read("ha.trigger.json"); triggers = JSON.parse(require("Storage").read("ha.trigger.json"));
triggers = JSON.parse(triggers);
} catch(e) { } catch(e) {
// In case there are no user triggers yet, we show the default... // In case there are no user triggers yet, we show the default...
console.log("ha: error loading triggers:", e); console.log("ha: error loading triggers:", e);