home-assistant-js-websocket
Advanced tools
Comparing version 8.2.0 to 9.0.0
@@ -27,3 +27,7 @@ /** | ||
console.warn(`Received event for unknown subscription ${message.id}. Unsubscribing.`); | ||
this.sendMessagePromise(messages.unsubscribeEvents(message.id)); | ||
this.sendMessagePromise(messages.unsubscribeEvents(message.id)).catch((err) => { | ||
if (DEBUG) { | ||
console.warn(` Error unsubsribing from unknown subscription ${message.id}`, err); | ||
} | ||
}); | ||
} | ||
@@ -30,0 +34,0 @@ break; |
@@ -245,3 +245,4 @@ (function (global, factory) { | ||
console.warn(`Received event for unknown subscription ${message.id}. Unsubscribing.`); | ||
this.sendMessagePromise(unsubscribeEvents(message.id)); | ||
this.sendMessagePromise(unsubscribeEvents(message.id)).catch((err) => { | ||
}); | ||
} | ||
@@ -248,0 +249,0 @@ break; |
@@ -53,3 +53,3 @@ export type Error = 1 | 2 | 3 | 4; | ||
config_source: string; | ||
safe_mode: boolean; | ||
recovery_mode: boolean; | ||
state: "NOT_RUNNING" | "STARTING" | "RUNNING" | "STOPPING" | "FINAL_WRITE"; | ||
@@ -56,0 +56,0 @@ external_url: string | null; |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "8.2.0", | ||
"version": "9.0.0", | ||
"description": "Home Assistant websocket client", | ||
@@ -40,5 +40,5 @@ "source": "lib/index.ts", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^13.0.0", | ||
"lint-staged": "^15.0.1", | ||
"mocha": "^8.0.1", | ||
"prettier": "^2.0.5", | ||
"prettier": "^3.0.0", | ||
"reify": "^0.20.12", | ||
@@ -45,0 +45,0 @@ "rollup": "^3.5.0", |
@@ -18,2 +18,12 @@ # :aerial_tramway: JavaScript websocket client for Home Assistant | ||
## Installation | ||
```bash | ||
# With npm | ||
npm i home-assistant-js-websocket | ||
# With yarn | ||
yarn add home-assistant-js-websocket | ||
``` | ||
## Usage | ||
@@ -41,3 +51,3 @@ | ||
"What host to connect to?", | ||
"http://localhost:8123" | ||
"http://localhost:8123", | ||
); | ||
@@ -142,3 +152,3 @@ // Redirect user to log in on their instance | ||
resolve(); | ||
}) | ||
}), | ||
); | ||
@@ -160,3 +170,3 @@ ``` | ||
resolve(); | ||
}) | ||
}), | ||
); | ||
@@ -173,3 +183,3 @@ connection.suspend(); | ||
resolve(); | ||
}) | ||
}), | ||
); | ||
@@ -443,3 +453,3 @@ ``` | ||
"http://localhost:8123", | ||
"YOUR ACCESS TOKEN" | ||
"YOUR ACCESS TOKEN", | ||
); | ||
@@ -446,0 +456,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177257
3724
473