mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-24 04:39:01 +00:00
Expose build type on window (#630)
* Expose build type on window * Build two panels for Hass.io
This commit is contained in:
@@ -3,10 +3,11 @@ import * as HAWS from 'home-assistant-js-websocket';
|
||||
window.HAWS = HAWS;
|
||||
window.HASS_DEMO = __DEMO__;
|
||||
window.HASS_DEV = __DEV__;
|
||||
window.HASS_BUILD = __BUILD__;
|
||||
|
||||
const init = window.createHassConnection = function (password) {
|
||||
const proto = window.location.protocol === 'https:' ? 'wss' : 'ws';
|
||||
const url = `${proto}://${window.location.host}/api/websocket${window.location.search}`;
|
||||
const url = `${proto}://${window.location.host}/api/websocket?${window.HASS_BUILD}`;
|
||||
const options = {
|
||||
setupRetry: 10,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user