hopefully finished a stable 1.0.0

This commit is contained in:
jangxx 2019-01-29 21:39:25 +01:00
parent 0b13b21861
commit 513ad0727e
2 changed files with 10 additions and 2 deletions

View File

@ -29,6 +29,14 @@ class HCControlBase extends EventEmitter {
return this._name; return this._name;
} }
/**
* Run some sort of asynchronous initialization
* @returns A promise which resolves when the initialization is complete
*/
init() {
return Promise.resolve();
}
/** /**
* Updates the state by polling the controlled device * Updates the state by polling the controlled device
* @returns A promise which resolves when the state has been pulled * @returns A promise which resolves when the state has been pulled

View File

@ -1,4 +1,4 @@
const objectHash = require('node-object-hash'); const objectHash = require('node-object-hash')();
class BaseState { class BaseState {
constructor(cloneObj) { constructor(cloneObj) {
@ -9,7 +9,7 @@ class BaseState {
} }
get hash() { get hash() {
return objectHash(this.asObj); return objectHash.hash(this.asObj);
} }
static get default() { static get default() {