From 992c5cba103e9a2d573c18981a415529a98731a5 Mon Sep 17 00:00:00 2001 From: Jan Scheiper Date: Thu, 6 Aug 2020 00:04:35 +0200 Subject: [PATCH] added deinit() method --- ControlBase.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ControlBase.js b/ControlBase.js index a927695..7eb50f8 100644 --- a/ControlBase.js +++ b/ControlBase.js @@ -41,6 +41,14 @@ class HCControlBase extends EventEmitter { return Promise.resolve(); } + /** + * Run some sort of asynchronous de-initialization/cleanup + * @returns A promise which resolves when the de-initialization is complete + */ + deinit() { + return Promise.resolve(); + } + /** * Updates the state by polling the controlled device * @returns A promise which resolves when the state has been pulled