mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-17 15:46:36 +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 () {
|
(function () {
|
||||||
'use strict';
|
'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({
|
Polymer({
|
||||||
is: 'ha-attributes',
|
is: 'ha-attributes',
|
||||||
properties: {
|
properties: {
|
||||||
@ -55,7 +49,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
computeFiltersArray: function (extraFilters) {
|
computeFiltersArray: function (extraFilters) {
|
||||||
return FILTER_KEYS + (extraFilters ? extraFilters.split(',') : []);
|
return window.hassUtil.LOGIC_STATE_ATTRIBUTES + (extraFilters ? extraFilters.split(',') : []);
|
||||||
},
|
},
|
||||||
|
|
||||||
computeDisplayAttributes: function (stateObj, filtersArray) {
|
computeDisplayAttributes: function (stateObj, filtersArray) {
|
||||||
|
@ -34,6 +34,13 @@ window.hassUtil.HIDE_MORE_INFO = [
|
|||||||
'input_select', 'scene', 'script', 'input_slider',
|
'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 ?
|
window.hassUtil.LANGUAGE = navigator.languages ?
|
||||||
navigator.languages[0] : navigator.language || navigator.userLanguage;
|
navigator.languages[0] : navigator.language || navigator.userLanguage;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user