 
         ###
           Same as rejectWithErrorString, but has been deprecated
-          @param {Function} reject - function to reject a promise on return, may be null
+          @param {Function} reject - function to reject a promise on return,
+                                     may be null
           @param {Error} error  - error object
           @deprecated
         ###

          only updated if the value has been changed.
          @param {String} attributeName - the attribute name
          @param {Any} value - the attribute value
          @param [Boolean} [discrete=false] - True if attribute value is discrete,
          e.g., a switch state. False, otherwise.
        ###
        setAttribute: (attributeName, value, discrete=false) ->
          if value? and not discrete or device['_' + attributeName] isnt value

            timerData.target = timerData.delay
            timerData.startTime = Date.now() - timerData.delay
          else
            elapsed = Date.now() - timerData.startTime
            adjust = timerData.target - elapsed

          timerData.target += timerData.delay
          if common._periodicTimers.hasOwnProperty(id)
            common._periodicTimers[id] =
              setTimeout(taskHandler, timerData.delay + adjust)
            timerData.func()

        return id
