bugfix getCurrentTimer

This commit is contained in:
peter
2022-08-01 17:15:50 +00:00
parent 7cc05ca590
commit 2d587a459e

View File

@@ -119,6 +119,7 @@ instance.prototype.update_variables = function (system) {
self.setVariableDefinitions(variables) self.setVariableDefinitions(variables)
self.setVariable('timerId', null) self.setVariable('timerId', null)
self.setVariable('timerDescription', null) self.setVariable('timerDescription', null)
} }
instance.prototype.init_presets = function () { instance.prototype.init_presets = function () {
@@ -256,10 +257,10 @@ instance.prototype.action = function (action) {
break break
} }
case 'getCurrentTimer': { case 'getCurrentTimer': {
self.getCurrentTimer().then((result) => { self.getCurrentTimer().then((timerId) => {
self.log('debug', 'Current timer id ' + timerId.id + ' ' + timerId.description) self.log('debug', 'Current timer id ' + timerId.id + ' ' + timerId.description)
self.setVariable('timerId', result.id) self.setVariable('timerId', timerId.id)
self.setVariable('timerDescription', result.description) self.setVariable('timerDescription', timerId.description)
}) })
break break
} }