mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
fix showing edit entity icon in more info dialog (#3066)
* fix showing cog * Remove unused value * Lint
This commit is contained in:
parent
70072786a1
commit
559164e159
@ -170,7 +170,7 @@ class HaMoreInfoDialog extends DialogMixin(PolymerElement) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!isComponentLoaded(this.hass, "config.entity_registry") ||
|
!isComponentLoaded(this.hass, "config") ||
|
||||||
(oldVal && oldVal.entity_id === newVal.entity_id)
|
(oldVal && oldVal.entity_id === newVal.entity_id)
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
|
@ -10,7 +10,6 @@ import LocalizeMixin from "../../mixins/localize-mixin";
|
|||||||
|
|
||||||
import computeStateName from "../../common/entity/compute_state_name";
|
import computeStateName from "../../common/entity/compute_state_name";
|
||||||
import computeDomain from "../../common/entity/compute_domain";
|
import computeDomain from "../../common/entity/compute_domain";
|
||||||
import isComponentLoaded from "../../common/config/is_component_loaded";
|
|
||||||
import { updateEntityRegistryEntry } from "../../data/entity_registry";
|
import { updateEntityRegistryEntry } from "../../data/entity_registry";
|
||||||
|
|
||||||
import "../../components/ha-paper-icon-button-arrow-prev";
|
import "../../components/ha-paper-icon-button-arrow-prev";
|
||||||
@ -74,11 +73,6 @@ class MoreInfoSettings extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
|||||||
hass: Object,
|
hass: Object,
|
||||||
stateObj: Object,
|
stateObj: Object,
|
||||||
|
|
||||||
_componentLoaded: {
|
|
||||||
type: Boolean,
|
|
||||||
computed: "_computeComponentLoaded(hass)",
|
|
||||||
},
|
|
||||||
|
|
||||||
registryInfo: {
|
registryInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
observer: "_registryInfoChanged",
|
observer: "_registryInfoChanged",
|
||||||
@ -95,10 +89,6 @@ class MoreInfoSettings extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
|||||||
return computeStateName(stateObj);
|
return computeStateName(stateObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
_computeComponentLoaded(hass) {
|
|
||||||
return isComponentLoaded(hass, "config.entity_registry");
|
|
||||||
}
|
|
||||||
|
|
||||||
_computeInvalid(entityId) {
|
_computeInvalid(entityId) {
|
||||||
return computeDomain(this.stateObj.entity_id) !== computeDomain(entityId);
|
return computeDomain(this.stateObj.entity_id) !== computeDomain(entityId);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user