mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-08 09:56:36 +00:00
Remove no longer needed blocks (#1262)
This commit is contained in:
parent
4d48a63141
commit
10c997b7b2
@ -7,13 +7,12 @@ import computeStateName from '../common/entity/compute_state_name.js';
|
|||||||
import EventsMixin from '../mixins/events-mixin.js';
|
import EventsMixin from '../mixins/events-mixin.js';
|
||||||
import LocalizeMixin from '../mixins/localize-mixin.js';
|
import LocalizeMixin from '../mixins/localize-mixin.js';
|
||||||
|
|
||||||
{
|
const UPDATE_INTERVAL = 10000; // ms
|
||||||
const UPDATE_INTERVAL = 10000; // ms
|
/*
|
||||||
/*
|
|
||||||
* @appliesMixin LocalizeMixin
|
* @appliesMixin LocalizeMixin
|
||||||
* @appliesMixin EventsMixin
|
* @appliesMixin EventsMixin
|
||||||
*/
|
*/
|
||||||
class HaCameraCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
class HaCameraCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style include="paper-material-styles">
|
<style include="paper-material-styles">
|
||||||
@ -119,6 +118,5 @@ import LocalizeMixin from '../mixins/localize-mixin.js';
|
|||||||
_computeStateName(stateObj) {
|
_computeStateName(stateObj) {
|
||||||
return computeStateName(stateObj);
|
return computeStateName(stateObj);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
customElements.define('ha-camera-card', HaCameraCard);
|
|
||||||
}
|
}
|
||||||
|
customElements.define('ha-camera-card', HaCameraCard);
|
||||||
|
@ -12,24 +12,23 @@ import computeStateDomain from '../common/entity/compute_state_domain.js';
|
|||||||
import splitByGroups from '../common/entity/split_by_groups.js';
|
import splitByGroups from '../common/entity/split_by_groups.js';
|
||||||
import getGroupEntities from '../common/entity/get_group_entities.js';
|
import getGroupEntities from '../common/entity/get_group_entities.js';
|
||||||
|
|
||||||
{
|
// mapping domain to size of the card.
|
||||||
// mapping domain to size of the card.
|
const DOMAINS_WITH_CARD = {
|
||||||
const DOMAINS_WITH_CARD = {
|
|
||||||
camera: 4,
|
camera: 4,
|
||||||
history_graph: 4,
|
history_graph: 4,
|
||||||
media_player: 3,
|
media_player: 3,
|
||||||
persistent_notification: 0,
|
persistent_notification: 0,
|
||||||
plant: 3,
|
plant: 3,
|
||||||
weather: 4,
|
weather: 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 4 types:
|
// 4 types:
|
||||||
// badges: 0 .. 10
|
// badges: 0 .. 10
|
||||||
// before groups < 0
|
// before groups < 0
|
||||||
// groups: X
|
// groups: X
|
||||||
// rest: 100
|
// rest: 100
|
||||||
|
|
||||||
const PRIORITY = {
|
const PRIORITY = {
|
||||||
// before groups < 0
|
// before groups < 0
|
||||||
configurator: -20,
|
configurator: -20,
|
||||||
persistent_notification: -15,
|
persistent_notification: -15,
|
||||||
@ -43,15 +42,15 @@ import getGroupEntities from '../common/entity/get_group_entities.js';
|
|||||||
sensor: 5,
|
sensor: 5,
|
||||||
binary_sensor: 6,
|
binary_sensor: 6,
|
||||||
mailbox: 7,
|
mailbox: 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
const getPriority = domain =>
|
const getPriority = domain =>
|
||||||
((domain in PRIORITY) ? PRIORITY[domain] : 100);
|
((domain in PRIORITY) ? PRIORITY[domain] : 100);
|
||||||
|
|
||||||
const sortPriority = (domainA, domainB) =>
|
const sortPriority = (domainA, domainB) =>
|
||||||
domainA.priority - domainB.priority;
|
domainA.priority - domainB.priority;
|
||||||
|
|
||||||
const entitySortBy = (entityA, entityB) => {
|
const entitySortBy = (entityA, entityB) => {
|
||||||
const nameA = (entityA.attributes.friendly_name ||
|
const nameA = (entityA.attributes.friendly_name ||
|
||||||
entityA.entity_id).toLowerCase();
|
entityA.entity_id).toLowerCase();
|
||||||
const nameB = (entityB.attributes.friendly_name ||
|
const nameB = (entityB.attributes.friendly_name ||
|
||||||
@ -64,9 +63,9 @@ import getGroupEntities from '../common/entity/get_group_entities.js';
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
const iterateDomainSorted = (collection, func) => {
|
const iterateDomainSorted = (collection, func) => {
|
||||||
Object.keys(collection)
|
Object.keys(collection)
|
||||||
.map(key => collection[key])
|
.map(key => collection[key])
|
||||||
.sort(sortPriority)
|
.sort(sortPriority)
|
||||||
@ -74,9 +73,9 @@ import getGroupEntities from '../common/entity/get_group_entities.js';
|
|||||||
domain.states.sort(entitySortBy);
|
domain.states.sort(entitySortBy);
|
||||||
func(domain);
|
func(domain);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
class HaCards extends PolymerElement {
|
class HaCards extends PolymerElement {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style include="iron-flex iron-flex-factors"></style>
|
<style include="iron-flex iron-flex-factors"></style>
|
||||||
@ -142,7 +141,7 @@ import getGroupEntities from '../common/entity/get_group_entities.js';
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,6 +362,5 @@ import getGroupEntities from '../common/entity/get_group_entities.js';
|
|||||||
|
|
||||||
return cards;
|
return cards;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
customElements.define('ha-cards', HaCards);
|
|
||||||
}
|
}
|
||||||
|
customElements.define('ha-cards', HaCards);
|
||||||
|
@ -8,14 +8,13 @@ import computeStateDomain from '../common/entity/compute_state_domain.js';
|
|||||||
import computeStateDisplay from '../common/entity/compute_state_display.js';
|
import computeStateDisplay from '../common/entity/compute_state_display.js';
|
||||||
import LocalizeMixin from '../mixins/localize-mixin.js';
|
import LocalizeMixin from '../mixins/localize-mixin.js';
|
||||||
|
|
||||||
{
|
const RECENT_THRESHOLD = 60000; // 1 minute
|
||||||
const RECENT_THRESHOLD = 60000; // 1 minute
|
const RECENT_CACHE = {};
|
||||||
const RECENT_CACHE = {};
|
const DOMAINS_USE_LAST_UPDATED = ['thermostat', 'climate'];
|
||||||
const DOMAINS_USE_LAST_UPDATED = ['thermostat', 'climate'];
|
const LINE_ATTRIBUTES_TO_KEEP = ['temperature', 'current_temperature', 'target_temp_low', 'target_temp_high'];
|
||||||
const LINE_ATTRIBUTES_TO_KEEP = ['temperature', 'current_temperature', 'target_temp_low', 'target_temp_high'];
|
const stateHistoryCache = {};
|
||||||
const stateHistoryCache = {};
|
|
||||||
|
|
||||||
function computeHistory(stateHistory, localize, language) {
|
function computeHistory(stateHistory, localize, language) {
|
||||||
const lineChartDevices = {};
|
const lineChartDevices = {};
|
||||||
const timelineDevices = [];
|
const timelineDevices = [];
|
||||||
if (!stateHistory) {
|
if (!stateHistory) {
|
||||||
@ -96,12 +95,12 @@ import LocalizeMixin from '../mixins/localize-mixin.js';
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
return { line: unitStates, timeline: timelineDevices };
|
return { line: unitStates, timeline: timelineDevices };
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @appliesMixin LocalizeMixin
|
* @appliesMixin LocalizeMixin
|
||||||
*/
|
*/
|
||||||
class HaStateHistoryData extends LocalizeMixin(PolymerElement) {
|
class HaStateHistoryData extends LocalizeMixin(PolymerElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
hass: {
|
hass: {
|
||||||
@ -383,6 +382,5 @@ import LocalizeMixin from '../mixins/localize-mixin.js';
|
|||||||
|
|
||||||
return prom;
|
return prom;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
customElements.define('ha-state-history-data', HaStateHistoryData);
|
|
||||||
}
|
}
|
||||||
|
customElements.define('ha-state-history-data', HaStateHistoryData);
|
||||||
|
@ -12,11 +12,10 @@ import featureClassNames from '../../../common/entity/feature_class_names';
|
|||||||
|
|
||||||
import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
||||||
|
|
||||||
{
|
const FEATURE_CLASS_NAMES = {
|
||||||
const FEATURE_CLASS_NAMES = {
|
|
||||||
128: 'has-set_tilt_position',
|
128: 'has-set_tilt_position',
|
||||||
};
|
};
|
||||||
class MoreInfoCover extends LocalizeMixin(PolymerElement) {
|
class MoreInfoCover extends LocalizeMixin(PolymerElement) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style include="iron-flex"></style>
|
<style include="iron-flex"></style>
|
||||||
@ -111,7 +110,6 @@ import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
|||||||
coverTiltPositionSliderChanged(ev) {
|
coverTiltPositionSliderChanged(ev) {
|
||||||
this.entityObj.setCoverTiltPosition(ev.target.value);
|
this.entityObj.setCoverTiltPosition(ev.target.value);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('more-info-cover', MoreInfoCover);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('more-info-cover', MoreInfoCover);
|
||||||
|
@ -14,18 +14,17 @@ import featureClassNames from '../../../common/entity/feature_class_names';
|
|||||||
import EventsMixin from '../../../mixins/events-mixin.js';
|
import EventsMixin from '../../../mixins/events-mixin.js';
|
||||||
import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
||||||
|
|
||||||
{
|
const FEATURE_CLASS_NAMES = {
|
||||||
const FEATURE_CLASS_NAMES = {
|
|
||||||
1: 'has-brightness',
|
1: 'has-brightness',
|
||||||
2: 'has-color_temp',
|
2: 'has-color_temp',
|
||||||
4: 'has-effect_list',
|
4: 'has-effect_list',
|
||||||
16: 'has-color',
|
16: 'has-color',
|
||||||
128: 'has-white_value',
|
128: 'has-white_value',
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* @appliesMixin EventsMixin
|
* @appliesMixin EventsMixin
|
||||||
*/
|
*/
|
||||||
class MoreInfoLight extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
class MoreInfoLight extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style include="iron-flex"></style>
|
<style include="iron-flex"></style>
|
||||||
@ -260,7 +259,6 @@ import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
|||||||
colorPicked(ev) {
|
colorPicked(ev) {
|
||||||
this.serviceChangeColor(this.hass, this.stateObj.entity_id, ev.detail.hs);
|
this.serviceChangeColor(this.hass, this.stateObj.entity_id, ev.detail.hs);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('more-info-light', MoreInfoLight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('more-info-light', MoreInfoLight);
|
||||||
|
@ -16,11 +16,10 @@ import isComponentLoaded from '../../../common/config/is_component_loaded.js';
|
|||||||
import EventsMixin from '../../../mixins/events-mixin.js';
|
import EventsMixin from '../../../mixins/events-mixin.js';
|
||||||
import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
||||||
|
|
||||||
{
|
/*
|
||||||
/*
|
|
||||||
* @appliesMixin EventsMixin
|
* @appliesMixin EventsMixin
|
||||||
*/
|
*/
|
||||||
class MoreInfoMediaPlayer extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
class MoreInfoMediaPlayer extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style include="iron-flex iron-flex-alignment"></style>
|
<style include="iron-flex iron-flex-alignment"></style>
|
||||||
@ -286,7 +285,6 @@ import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
|||||||
this.ttsMessage = '';
|
this.ttsMessage = '';
|
||||||
this.$.ttsInput.focus();
|
this.$.ttsInput.focus();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('more-info-media_player', MoreInfoMediaPlayer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('more-info-media_player', MoreInfoMediaPlayer);
|
||||||
|
@ -17,16 +17,15 @@ import isComponentLoaded from '../../common/config/is_component_loaded.js';
|
|||||||
import { DOMAINS_MORE_INFO_NO_HISTORY } from '../../common/const.js';
|
import { DOMAINS_MORE_INFO_NO_HISTORY } from '../../common/const.js';
|
||||||
import EventsMixin from '../../mixins/events-mixin.js';
|
import EventsMixin from '../../mixins/events-mixin.js';
|
||||||
|
|
||||||
{
|
const DOMAINS_NO_INFO = [
|
||||||
const DOMAINS_NO_INFO = [
|
|
||||||
'camera',
|
'camera',
|
||||||
'configurator',
|
'configurator',
|
||||||
'history_graph',
|
'history_graph',
|
||||||
];
|
];
|
||||||
/*
|
/*
|
||||||
* @appliesMixin EventsMixin
|
* @appliesMixin EventsMixin
|
||||||
*/
|
*/
|
||||||
class MoreInfoControls extends EventsMixin(PolymerElement) {
|
class MoreInfoControls extends EventsMixin(PolymerElement) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style include="ha-style-dialog">
|
<style include="ha-style-dialog">
|
||||||
@ -158,6 +157,5 @@ import EventsMixin from '../../mixins/events-mixin.js';
|
|||||||
_gotoSettings() {
|
_gotoSettings() {
|
||||||
this.fire('more-info-page', { page: 'settings' });
|
this.fire('more-info-page', { page: 'settings' });
|
||||||
}
|
}
|
||||||
}
|
|
||||||
customElements.define('more-info-controls', MoreInfoControls);
|
|
||||||
}
|
}
|
||||||
|
customElements.define('more-info-controls', MoreInfoControls);
|
||||||
|
@ -17,10 +17,9 @@ import(/* webpackChunkName: "ha-sidebar" */ '../components/ha-sidebar.js');
|
|||||||
import(/* webpackChunkName: "more-info-dialog" */ '../dialogs/ha-more-info-dialog.js');
|
import(/* webpackChunkName: "more-info-dialog" */ '../dialogs/ha-more-info-dialog.js');
|
||||||
import(/* webpackChunkName: "voice-command-dialog" */ '../dialogs/ha-voice-command-dialog.js');
|
import(/* webpackChunkName: "voice-command-dialog" */ '../dialogs/ha-voice-command-dialog.js');
|
||||||
|
|
||||||
{
|
const NON_SWIPABLE_PANELS = ['kiosk', 'map'];
|
||||||
const NON_SWIPABLE_PANELS = ['kiosk', 'map'];
|
|
||||||
|
|
||||||
class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style>
|
<style>
|
||||||
@ -127,7 +126,6 @@ import(/* webpackChunkName: "voice-command-dialog" */ '../dialogs/ha-voice-comma
|
|||||||
_computeDisableSwipe(hass) {
|
_computeDisableSwipe(hass) {
|
||||||
return NON_SWIPABLE_PANELS.indexOf(hass.panelUrl) !== -1;
|
return NON_SWIPABLE_PANELS.indexOf(hass.panelUrl) !== -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('home-assistant-main', HomeAssistantMain);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('home-assistant-main', HomeAssistantMain);
|
||||||
|
@ -24,15 +24,14 @@ import computeLocationName from '../common/config/location_name.js';
|
|||||||
import NavigateMixin from '../mixins/navigate-mixin.js';
|
import NavigateMixin from '../mixins/navigate-mixin.js';
|
||||||
import EventsMixin from '../mixins/events-mixin.js';
|
import EventsMixin from '../mixins/events-mixin.js';
|
||||||
|
|
||||||
{
|
const DEFAULT_VIEW_ENTITY_ID = 'group.default_view';
|
||||||
const DEFAULT_VIEW_ENTITY_ID = 'group.default_view';
|
const ALWAYS_SHOW_DOMAIN = ['persistent_notification', 'configurator'];
|
||||||
const ALWAYS_SHOW_DOMAIN = ['persistent_notification', 'configurator'];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @appliesMixin EventsMixin
|
* @appliesMixin EventsMixin
|
||||||
* @appliesMixin NavigateMixin
|
* @appliesMixin NavigateMixin
|
||||||
*/
|
*/
|
||||||
class PartialCards extends EventsMixin(NavigateMixin(PolymerElement)) {
|
class PartialCards extends EventsMixin(NavigateMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style include="iron-flex iron-positioning ha-style">
|
<style include="iron-flex iron-positioning ha-style">
|
||||||
@ -347,7 +346,6 @@ import EventsMixin from '../mixins/events-mixin.js';
|
|||||||
|
|
||||||
return orderedGroupEntities;
|
return orderedGroupEntities;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('partial-cards', PartialCards);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('partial-cards', PartialCards);
|
||||||
|
@ -12,20 +12,19 @@ import './ha-config-cloud-login.js';
|
|||||||
import './ha-config-cloud-register.js';
|
import './ha-config-cloud-register.js';
|
||||||
import NavigateMixin from '../../../mixins/navigate-mixin.js';
|
import NavigateMixin from '../../../mixins/navigate-mixin.js';
|
||||||
|
|
||||||
{
|
const LOGGED_IN_URLS = [
|
||||||
const LOGGED_IN_URLS = [
|
|
||||||
'/cloud/account',
|
'/cloud/account',
|
||||||
];
|
];
|
||||||
const NOT_LOGGED_IN_URLS = [
|
const NOT_LOGGED_IN_URLS = [
|
||||||
'/cloud/login',
|
'/cloud/login',
|
||||||
'/cloud/register',
|
'/cloud/register',
|
||||||
'/cloud/forgot-password',
|
'/cloud/forgot-password',
|
||||||
];
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @appliesMixin NavigateMixin
|
* @appliesMixin NavigateMixin
|
||||||
*/
|
*/
|
||||||
class HaConfigCloud extends NavigateMixin(PolymerElement) {
|
class HaConfigCloud extends NavigateMixin(PolymerElement) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<app-route route="[[route]]" pattern="/cloud/:page" data="{{_routeData}}" tail="{{_routeTail}}"></app-route>
|
<app-route route="[[route]]" pattern="/cloud/:page" data="{{_routeData}}" tail="{{_routeTail}}"></app-route>
|
||||||
@ -105,7 +104,6 @@ import NavigateMixin from '../../../mixins/navigate-mixin.js';
|
|||||||
_equals(a, b) {
|
_equals(a, b) {
|
||||||
return a === b;
|
return a === b;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('ha-config-cloud', HaConfigCloud);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('ha-config-cloud', HaConfigCloud);
|
||||||
|
@ -13,12 +13,11 @@ import './ha-config-flow.js';
|
|||||||
import EventsMixin from '../../../mixins/events-mixin.js';
|
import EventsMixin from '../../../mixins/events-mixin.js';
|
||||||
import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
||||||
|
|
||||||
{
|
/*
|
||||||
/*
|
|
||||||
* @appliesMixin LocalizeMixin
|
* @appliesMixin LocalizeMixin
|
||||||
* @appliesMixin EventsMixin
|
* @appliesMixin EventsMixin
|
||||||
*/
|
*/
|
||||||
class HaConfigManager extends
|
class HaConfigManager extends
|
||||||
LocalizeMixin(EventsMixin(PolymerElement)) {
|
LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
@ -198,7 +197,6 @@ import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
|||||||
_computeIntegrationTitle(localize, integration) {
|
_computeIntegrationTitle(localize, integration) {
|
||||||
return localize(`component.${integration}.config.title`);
|
return localize(`component.${integration}.config.title`);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('ha-config-entries', HaConfigManager);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('ha-config-entries', HaConfigManager);
|
||||||
|
@ -11,16 +11,15 @@ import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
|||||||
|
|
||||||
import isComponentLoaded from '../../../common/config/is_component_loaded.js';
|
import isComponentLoaded from '../../../common/config/is_component_loaded.js';
|
||||||
|
|
||||||
{
|
const CORE_PAGES = [
|
||||||
const CORE_PAGES = [
|
|
||||||
'core',
|
'core',
|
||||||
'customize',
|
'customize',
|
||||||
];
|
];
|
||||||
/*
|
/*
|
||||||
* @appliesMixin LocalizeMixin
|
* @appliesMixin LocalizeMixin
|
||||||
* @appliesMixin NavigateMixin
|
* @appliesMixin NavigateMixin
|
||||||
*/
|
*/
|
||||||
class HaConfigNavigation extends
|
class HaConfigNavigation extends
|
||||||
LocalizeMixin(NavigateMixin(PolymerElement)) {
|
LocalizeMixin(NavigateMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
@ -82,7 +81,6 @@ import isComponentLoaded from '../../../common/config/is_component_loaded.js';
|
|||||||
_navigate(ev) {
|
_navigate(ev) {
|
||||||
this.navigate('/config/' + ev.model.item);
|
this.navigate('/config/' + ev.model.item);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('ha-config-navigation', HaConfigNavigation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('ha-config-navigation', HaConfigNavigation);
|
||||||
|
@ -12,9 +12,8 @@ import '../../components/ha-service-picker.js';
|
|||||||
import '../../resources/ha-style.js';
|
import '../../resources/ha-style.js';
|
||||||
import '../../util/app-localstorage-document.js';
|
import '../../util/app-localstorage-document.js';
|
||||||
|
|
||||||
{
|
const ERROR_SENTINEL = {};
|
||||||
const ERROR_SENTINEL = {};
|
class HaPanelDevService extends PolymerElement {
|
||||||
class HaPanelDevService extends PolymerElement {
|
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style include='ha-style'>
|
<style include='ha-style'>
|
||||||
@ -298,7 +297,6 @@ import '../../util/app-localstorage-document.js';
|
|||||||
entity_id: ev.target.value
|
entity_id: ev.target.value
|
||||||
}), null, 2);
|
}), null, 2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('ha-panel-dev-service', HaPanelDevService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('ha-panel-dev-service', HaPanelDevService);
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
||||||
|
|
||||||
{
|
var DATE_CACHE = {};
|
||||||
var DATE_CACHE = {};
|
|
||||||
|
|
||||||
class HaLogbookData extends PolymerElement {
|
class HaLogbookData extends PolymerElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
hass: {
|
hass: {
|
||||||
@ -70,7 +69,6 @@ import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|||||||
DATE_CACHE[this.filterDate] = null;
|
DATE_CACHE[this.filterDate] = null;
|
||||||
this.filterDateChanged(this.filterDate);
|
this.filterDateChanged(this.filterDate);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('ha-logbook-data', HaLogbookData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customElements.define('ha-logbook-data', HaLogbookData);
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
||||||
|
|
||||||
{
|
const STORED_STATE = [
|
||||||
const STORED_STATE = [
|
|
||||||
'dockedSidebar',
|
'dockedSidebar',
|
||||||
'selectedTheme',
|
'selectedTheme',
|
||||||
'selectedLanguage',
|
'selectedLanguage',
|
||||||
];
|
];
|
||||||
|
|
||||||
class HaPrefStorage extends PolymerElement {
|
class HaPrefStorage extends PolymerElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
hass: Object,
|
hass: Object,
|
||||||
@ -44,6 +43,5 @@ import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|||||||
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
customElements.define('ha-pref-storage', HaPrefStorage);
|
|
||||||
}
|
}
|
||||||
|
customElements.define('ha-pref-storage', HaPrefStorage);
|
||||||
|
@ -2,14 +2,13 @@ import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|||||||
|
|
||||||
import EventsMixin from '../mixins/events-mixin.js';
|
import EventsMixin from '../mixins/events-mixin.js';
|
||||||
|
|
||||||
{
|
/* eslint-disable no-console */
|
||||||
/* eslint-disable no-console */
|
const DEBUG = false;
|
||||||
const DEBUG = false;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @appliesMixin EventsMixin
|
* @appliesMixin EventsMixin
|
||||||
*/
|
*/
|
||||||
class HaUrlSync extends EventsMixin(PolymerElement) {
|
class HaUrlSync extends EventsMixin(PolymerElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
hass: {
|
hass: {
|
||||||
@ -70,6 +69,5 @@ import EventsMixin from '../mixins/events-mixin.js';
|
|||||||
super.disconnectedCallback();
|
super.disconnectedCallback();
|
||||||
window.removeEventListener('popstate', this.popstateChangeListener);
|
window.removeEventListener('popstate', this.popstateChangeListener);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
customElements.define('ha-url-sync', HaUrlSync);
|
|
||||||
}
|
}
|
||||||
|
customElements.define('ha-url-sync', HaUrlSync);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user