 
     getContact: () -> Promise.resolve @_contact
 
+    trigger: () ->
+      # trigger contact for the configured holdTime, reset afterwards
+      if not @timer?
+        @base.debug "Amazon dash button triggered (#{@macAddress})"
+        @_setContact not @_invert
+        clearTimeout @timer if @timer?
+        @timer = setTimeout( =>
+          @_setContact @_invert
+          @timer = null
+        , @config.holdTime
+        )
+      Promise.resolve()
+
   # ###Finally
   # Create a instance of my plugin
   # and return it to the framework.

      @debug = @plugin.debug || false
      @base = commons.base @, @config.class
      @candidateInfoHandler = (info) =>
        if not @timer? and info.mac is @macAddress
          @base.debug "Amazon dash button triggered (#{info.mac})"
          @_setContact not @_invert
          clearTimeout @timer if @timer?
          @timer = setTimeout( =>
            @_setContact @_invert
            @timer = null
          , @config.holdTime
          )
      super()
      @plugin.on 'candidateInfo', @candidateInfoHandler




  class AmazingDashButton extends env.devices.ContactSensor
    actions:
      trigger:
        description: "Closes the contact for the configured holdTime. Called when the dash button has been triggered"

    @prepareConfig: (config) =>
      address = (config.macAddress || '').replace /\W/g, ''
