mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 04:46:34 +00:00
Rename exclude_attributes to hide_attributes for clarity (#13436)
This commit is contained in:
parent
7d3d800d4c
commit
1b5c30712e
@ -16,12 +16,12 @@ class HaEntityAttributePicker extends LitElement {
|
|||||||
@property() public entityId?: string;
|
@property() public entityId?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of attributes to be excluded.
|
* List of attributes to be hidden.
|
||||||
* @type {Array}
|
* @type {Array}
|
||||||
* @attr exclude-attributes
|
* @attr hide-attributes
|
||||||
*/
|
*/
|
||||||
@property({ type: Array, attribute: "exclude-attributes" })
|
@property({ type: Array, attribute: "hide-attributes" })
|
||||||
public excludeAttributes?: string[];
|
public hideAttributes?: string[];
|
||||||
|
|
||||||
@property({ type: Boolean }) public autofocus = false;
|
@property({ type: Boolean }) public autofocus = false;
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ class HaEntityAttributePicker extends LitElement {
|
|||||||
const state = this.entityId ? this.hass.states[this.entityId] : undefined;
|
const state = this.entityId ? this.hass.states[this.entityId] : undefined;
|
||||||
(this._comboBox as any).items = state
|
(this._comboBox as any).items = state
|
||||||
? Object.keys(state.attributes)
|
? Object.keys(state.attributes)
|
||||||
.filter((key) => !this.excludeAttributes?.includes(key))
|
.filter((key) => !this.hideAttributes?.includes(key))
|
||||||
.map((key) => ({
|
.map((key) => ({
|
||||||
value: key,
|
value: key,
|
||||||
label: formatAttributeName(key),
|
label: formatAttributeName(key),
|
||||||
|
@ -32,7 +32,7 @@ export class HaSelectorAttribute extends SubscribeMixin(LitElement) {
|
|||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.entityId=${this.selector.attribute.entity_id ||
|
.entityId=${this.selector.attribute.entity_id ||
|
||||||
this.context?.filter_entity}
|
this.context?.filter_entity}
|
||||||
.excludeAttributes=${this.selector.attribute.exclude_attributes}
|
.hideAttributes=${this.selector.attribute.hide_attributes}
|
||||||
.value=${this.value}
|
.value=${this.value}
|
||||||
.label=${this.label}
|
.label=${this.label}
|
||||||
.helper=${this.helper}
|
.helper=${this.helper}
|
||||||
|
@ -65,7 +65,7 @@ export interface AreaSelector {
|
|||||||
export interface AttributeSelector {
|
export interface AttributeSelector {
|
||||||
attribute: {
|
attribute: {
|
||||||
entity_id?: string;
|
entity_id?: string;
|
||||||
exclude_attributes?: readonly string[];
|
hide_attributes?: readonly string[];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ export default class HaNumericStateCondition extends LitElement {
|
|||||||
selector: {
|
selector: {
|
||||||
attribute: {
|
attribute: {
|
||||||
entity_id: entityId,
|
entity_id: entityId,
|
||||||
exclude_attributes: [
|
hide_attributes: [
|
||||||
"access_token",
|
"access_token",
|
||||||
"auto_update",
|
"auto_update",
|
||||||
"available_modes",
|
"available_modes",
|
||||||
|
@ -38,7 +38,7 @@ export class HaStateCondition extends LitElement implements ConditionElement {
|
|||||||
selector: {
|
selector: {
|
||||||
attribute: {
|
attribute: {
|
||||||
entity_id: entityId,
|
entity_id: entityId,
|
||||||
exclude_attributes: [
|
hide_attributes: [
|
||||||
"access_token",
|
"access_token",
|
||||||
"available_modes",
|
"available_modes",
|
||||||
"color_modes",
|
"color_modes",
|
||||||
|
@ -24,7 +24,7 @@ export class HaNumericStateTrigger extends LitElement {
|
|||||||
selector: {
|
selector: {
|
||||||
attribute: {
|
attribute: {
|
||||||
entity_id: entityId,
|
entity_id: entityId,
|
||||||
exclude_attributes: [
|
hide_attributes: [
|
||||||
"access_token",
|
"access_token",
|
||||||
"auto_update",
|
"auto_update",
|
||||||
"available_modes",
|
"available_modes",
|
||||||
|
@ -57,7 +57,7 @@ export class HaStateTrigger extends LitElement implements TriggerElement {
|
|||||||
selector: {
|
selector: {
|
||||||
attribute: {
|
attribute: {
|
||||||
entity_id: entityId ? entityId[0] : undefined,
|
entity_id: entityId ? entityId[0] : undefined,
|
||||||
exclude_attributes: [
|
hide_attributes: [
|
||||||
"access_token",
|
"access_token",
|
||||||
"available_modes",
|
"available_modes",
|
||||||
"color_modes",
|
"color_modes",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user