mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-02 05:57:54 +00:00
comment
This commit is contained in:
parent
62d471888f
commit
0eb28ea733
@ -17,6 +17,7 @@ import {
|
|||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
|
import { computeDomain } from "../../common/entity/compute_domain";
|
||||||
import { PolymerChangedEvent } from "../../polymer-types";
|
import { PolymerChangedEvent } from "../../polymer-types";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import { formatAttributeName } from "../../util/hass-attributes-util";
|
import { formatAttributeName } from "../../util/hass-attributes-util";
|
||||||
@ -179,9 +180,7 @@ class HaEntityAttributePicker extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Object.keys(stateObj.attributes).filter((attr) =>
|
return Object.keys(stateObj.attributes).filter((attr) =>
|
||||||
SELECTABLE_ATTRIBUTES[entity.substring(0, entity.indexOf("."))].includes(
|
SELECTABLE_ATTRIBUTES[computeDomain(entity)].includes(attr)
|
||||||
attr
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user