# Class Power#deleteOffTimer

Power

- Defined in: power.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Power#deleteOffTimer(successCallback, errorCallback, options) Deletes 'off timer'.

## Class Detail

Power#deleteOffTimer(successCallback, errorCallback, options)
Deletes 'off timer'. The timer in the list that matches the parameter will be removed.

    // Javascript code
    function deleteOffTimer () {
      var options = {
         hour : 9,
         minute : 0,
         week : Power.TimerWeek.MONDAY + Power.TimerWeek.FRIDAY
      };

      function successCb() {
         // Do something
      }

      function failureCb(cbObject) {
         var errorCode = cbObject.errorCode;
         var errorText = cbObject.errorText;
         console.log ("Error Code [" + errorCode + "]: " + errorText);
      }

      var power = new Power();
      power.deleteOffTimer(successCb, failureCb, options);
    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.
{Object} options

  Property | Type | Description | Required
  --- | --- | --- | ---
  hour | Number | hour (0~23) | required
  minute | Number | minute (0~59) | required
  week | Number | week Power.TimerWeek To use it on multiple day of week, set the sum of week. For example, 1 + 64 (Power.TimerWeek.Monday + Power.TimerWeek.Sunday) means that this timer works on every Monday and Sunday. | required

Since:
  1.0
Returns:

  If the method is successfully executed, success callback function is called without a parameter. If an error occurs, failure callback function is called with failure callback object as a parameter.

See:
  Power.getOffTimerList(), InputSource.getInputSourceStatus()