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