mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-16 15:16:38 +00:00
Move hidden attributes to hassUtil (#351)
* Move hidden attributes to hassUtil so they are acessible by custom components. * Rename to LOGIC_STATE_ATTRIBUTES
This commit is contained in:
parent
0c428134df
commit
8bd0ab22f5
@ -32,12 +32,6 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var FILTER_KEYS = [
|
||||
'entity_picture', 'friendly_name', 'icon', 'unit_of_measurement',
|
||||
'emulated_hue', 'emulated_hue_name', 'haaska_hidden', 'haaska_name',
|
||||
'homebridge_hidden', 'homebridge_name', 'supported_features', 'attribution',
|
||||
'custom_ui_state_card', 'device_class',
|
||||
];
|
||||
Polymer({
|
||||
is: 'ha-attributes',
|
||||
properties: {
|
||||
@ -55,7 +49,7 @@
|
||||
},
|
||||
|
||||
computeFiltersArray: function (extraFilters) {
|
||||
return FILTER_KEYS + (extraFilters ? extraFilters.split(',') : []);
|
||||
return window.hassUtil.LOGIC_STATE_ATTRIBUTES + (extraFilters ? extraFilters.split(',') : []);
|
||||
},
|
||||
|
||||
computeDisplayAttributes: function (stateObj, filtersArray) {
|
||||
|
@ -34,6 +34,13 @@ window.hassUtil.HIDE_MORE_INFO = [
|
||||
'input_select', 'scene', 'script', 'input_slider',
|
||||
];
|
||||
|
||||
window.hassUtil.LOGIC_STATE_ATTRIBUTES = [
|
||||
'entity_picture', 'friendly_name', 'icon', 'unit_of_measurement',
|
||||
'emulated_hue', 'emulated_hue_name', 'haaska_hidden', 'haaska_name',
|
||||
'homebridge_hidden', 'homebridge_name', 'supported_features', 'attribution',
|
||||
'custom_ui_state_card', 'device_class',
|
||||
];
|
||||
|
||||
window.hassUtil.LANGUAGE = navigator.languages ?
|
||||
navigator.languages[0] : navigator.language || navigator.userLanguage;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user