Update Home Assistant JS Websocket
parent
81949d1f42
commit
a3528a1eb1
|
@ -28,7 +28,7 @@
|
|||
"author": "Paulus Schoutsen <Paulus@PaulusSchoutsen.nl> (http://paulusschoutsen.nl)",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"home-assistant-js-websocket": "^0.7.3"
|
||||
"home-assistant-js-websocket": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "^1.8.0",
|
||||
|
|
|
@ -6,7 +6,9 @@ window.HASS_DEMO = __DEMO__;
|
|||
const init = window.createHassConnection = function (password) {
|
||||
const proto = window.location.protocol === 'https:' ? 'wss' : 'ws';
|
||||
const url = `${proto}://${window.location.host}/api/websocket`;
|
||||
const options = {};
|
||||
const options = {
|
||||
setupRetry: 10,
|
||||
};
|
||||
if (password !== undefined) {
|
||||
options.authToken = password;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
</div>
|
||||
<div id="validatebox" hidden$="[[!showSpinner]]">
|
||||
<paper-spinner active="true"></paper-spinner><br />
|
||||
<div class="validatemessage">Loading data</div>
|
||||
<div class="validatemessage">[[computeLoadingMsg(isValidating)]]</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -127,6 +127,10 @@ Polymer({
|
|||
window.removeInitMsg();
|
||||
},
|
||||
|
||||
computeLoadingMsg: function (isValidating) {
|
||||
return isValidating ? 'Connecting' : 'Loading data';
|
||||
},
|
||||
|
||||
computeShowSpinner: function (forceShowLoading, isValidating) {
|
||||
return forceShowLoading || isValidating;
|
||||
},
|
||||
|
|
|
@ -2802,9 +2802,9 @@ hoek@2.x.x:
|
|||
version "2.16.3"
|
||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
|
||||
|
||||
home-assistant-js-websocket@^0.7.3:
|
||||
version "0.7.3"
|
||||
resolved "https://registry.yarnpkg.com/home-assistant-js-websocket/-/home-assistant-js-websocket-0.7.3.tgz#e65ac99b59a0b2c623048457c259808d67030c7f"
|
||||
home-assistant-js-websocket@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/home-assistant-js-websocket/-/home-assistant-js-websocket-1.0.0.tgz#d3c0f9e96002189e0b25c837e970d68204e8077c"
|
||||
|
||||
homedir-polyfill@^1.0.0:
|
||||
version "1.0.1"
|
||||
|
|
Loading…
Reference in New Issue