diff --git a/README.md b/README.md index c2634d3..5f216a0 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ If you like the app, consider a donation to support development ### Changelog +- V2.0.2 2018-12-08 : Bugfix of bugfix - V2.0.1 2018-12-07 : Bugfix for one trigger card - V2.0.0 2018-12-07 : SDK2 enabled - V1.2.5 2018-03-18 : Bugfix adjust timer diff --git a/app.json b/app.json index 05708d0..fb231a2 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,7 @@ "name": { "en": "CountDown" }, - "version": "2.0.1", + "version": "2.0.2", "compatibility": ">=1.5.0", "sdk": 2, "description": { diff --git a/lib/flow/triggers.js b/lib/flow/triggers.js index 3294370..a43eabc 100644 --- a/lib/flow/triggers.js +++ b/lib/flow/triggers.js @@ -20,7 +20,7 @@ module.exports = { let countdown_to_zero = new Homey.FlowCardTrigger('countdown_to_zero'); countdown_to_zero .registerRunListener((args, state) => { - console.log('countdown_to_zero') + console.log('countdown_to_zero ' + args.variable.name) //console.log(args); // this is the user input //console.log(state); // this is the state parameter, as passed in trigger() @@ -37,7 +37,7 @@ module.exports = { let countdown_started = new Homey.FlowCardTrigger('countdown_started'); countdown_started .registerRunListener((args, state) => { - console.log('countdown_started') + console.log('countdown_started ' + args.variable.name) //console.log(args); // this is the user input //console.log(state); // this is the state parameter, as passed in trigger() // If true, this flow should run @@ -53,7 +53,7 @@ module.exports = { let countdown_stopped = new Homey.FlowCardTrigger('countdown_stopped'); countdown_stopped .registerRunListener((args, state) => { - console.log('countdown_stopped') + console.log('countdown_stopped ' + args.variable.name) //console.log(args); // this is the user input // console.log(state); // this is the state parameter, as passed in trigger() @@ -70,7 +70,7 @@ module.exports = { let countdown_timer_changed = new Homey.FlowCardTrigger('countdown_timer_changed'); countdown_timer_changed .registerRunListener((args, state) => { - //console.log('countdown_timer_changed') + console.log('countdown_timer_changed ' + args.variable.name) //console.log(args); // this is the user input // console.log(state); // this is the state parameter, as passed in trigger() // If true, this flow should run @@ -90,7 +90,7 @@ module.exports = { let timer_running = new Homey.FlowCardCondition('timer_running'); timer_running .registerRunListener((args, state) => { - console.log('timer_running') + console.log('timer_running ' + args.variable.name) //console.log(args.variable); // this is the user input var result = variableManager.getVariable(args.variable.name); //console.log(result) @@ -148,7 +148,7 @@ module.exports = { let timer_greater_than_number = new Homey.FlowCardCondition('timer_greater_than_number'); timer_greater_than_number .registerRunListener((args, state) => { - console.log('timer_greater_than_number') + console.log('timer_greater_than_number ' + args.variable.name) //console.log(args.variable); // this is the user input //console.log(state) var result = variableManager.getVariable(args.variable.name); @@ -168,7 +168,7 @@ module.exports = { let set_countdown_timer = new Homey.FlowCardAction('set_countdown_timer'); set_countdown_timer .registerRunListener((args, state) => { - console.log('set_countdown_timer') + console.log('set_countdown_timer ' + args.variable.name) //console.log(args); // this is the user input //console.log(state); // this is the state parameter, as passed in trigger() @@ -190,7 +190,7 @@ module.exports = { let set_random_countdown_timer = new Homey.FlowCardAction('set_random_countdown_timer'); set_random_countdown_timer .registerRunListener((args, state) => { - console.log('set_random_countdown_timer') + console.log('set_random_countdown_timer ' + args.variable.name) //console.log(args); // this is the user input //console.log(state); // this is the state parameter, as passed in trigger() @@ -213,7 +213,7 @@ module.exports = { let adjust_countdown_timer = new Homey.FlowCardAction('adjust_countdown_timer'); adjust_countdown_timer .registerRunListener((args, state) => { - //console.log('adjust_countdown_timer ' + args.variable.name) + console.log('adjust_countdown_timer ' + args.variable.name) //console.log(args); // this is the user input //console.log(state); // this is the state parameter, as passed in trigger() @@ -238,7 +238,7 @@ module.exports = { let stop_countdown_timer = new Homey.FlowCardAction('stop_countdown_timer'); stop_countdown_timer .registerRunListener((args, state) => { - console.log('stop_countdown_timer') + console.log('stop_countdown_timer ' + args.variable.name) //console.log(args); // this is the user input //console.log(state); // this is the state parameter, as passed in trigger() diff --git a/lib/variablemanagement/variablemanagement.js b/lib/variablemanagement/variablemanagement.js index 5c99a8f..194a8e3 100644 --- a/lib/variablemanagement/variablemanagement.js +++ b/lib/variablemanagement/variablemanagement.js @@ -129,10 +129,10 @@ function processValueChanged(variables, oldVariable, newVariable) { } //countdown_timer_changed - if (newVariable.value !== oldVariable.value ){ + if (newVariable.value !== oldVariable.value && newVariable.value !== -1 ){ //console.log('variablemanager: counttimer changed') getTrigger('countdown_timer_changed').trigger(null, { "variable": newVariable.name, "value": newVariable.value }); - Homey.ManagerFlow.getCard('trigger','countdown_timer_changed').trigger(null, { "variable": newVariable.name, "value": newVariable.value }); + // Homey.ManagerFlow.getCard('trigger','countdown_timer_changed').trigger(null, { "variable": newVariable.name, "value": newVariable.value }); } //countdown_stopped