File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,19 @@ namespace OZW {
104104 OpenZWave::Manager::Get ()->PressButton (*ozwvid);
105105 }
106106 }
107-
108-
107+
108+ // ===================================================================
109+ NAN_METHOD (OZW::ReleaseButton)
110+ // ===================================================================
111+ {
112+ Nan::HandleScope scope;
113+ OpenZWave::ValueID* ozwvid = populateValueId (info);
114+ if (ozwvid == NULL ) {
115+ Nan::ThrowTypeError (" OpenZWave valueId not found" );
116+ } else {
117+ OpenZWave::Manager::Get ()->ReleaseButton (*ozwvid);
118+ }
119+ }
109120 /*
110121 * Write a new location string to the device, if supported.
111122 */
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ namespace OZW {
117117 Nan::SetPrototypeMethod (t, " switchAllOn" , OZW::SwitchAllOn);
118118 Nan::SetPrototypeMethod (t, " switchAllOff" , OZW::SwitchAllOff);
119119 Nan::SetPrototypeMethod (t, " pressButton" , OZW::PressButton);
120+ Nan::SetPrototypeMethod (t, " releaseButton" , OZW::ReleaseButton);
120121 //
121122 Nan::SetPrototypeMethod (t, " refreshNodeInfo" , OZW::RefreshNodeInfo); // ** new
122123 Nan::SetPrototypeMethod (t, " requestNodeState" , OZW::RequestNodeState); // ** new
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ namespace OZW {
111111 static NAN_METHOD (SwitchAllOn);
112112 static NAN_METHOD (SwitchAllOff);
113113 static NAN_METHOD (PressButton);
114+ static NAN_METHOD (ReleaseButton);
114115 //
115116 static NAN_METHOD (RefreshNodeInfo);
116117 static NAN_METHOD (RequestNodeState);
You can’t perform that action at this time.
0 commit comments