mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 02:06:42 +00:00
Fix For Selecting Device Class (#12010)
This commit is contained in:
parent
f4e28da0a3
commit
9b6c935ffb
@ -11,6 +11,7 @@ import {
|
|||||||
} from "lit";
|
} from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
|
import { stopPropagation } from "../../../common/dom/stop_propagation";
|
||||||
import { computeDomain } from "../../../common/entity/compute_domain";
|
import { computeDomain } from "../../../common/entity/compute_domain";
|
||||||
import { domainIcon } from "../../../common/entity/domain_icon";
|
import { domainIcon } from "../../../common/entity/domain_icon";
|
||||||
import "../../../components/ha-alert";
|
import "../../../components/ha-alert";
|
||||||
@ -166,7 +167,10 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
|
|||||||
"ui.dialogs.entity_registry.editor.device_class"
|
"ui.dialogs.entity_registry.editor.device_class"
|
||||||
)}
|
)}
|
||||||
.value=${this._deviceClass}
|
.value=${this._deviceClass}
|
||||||
|
naturalMenuWidth
|
||||||
|
fixedMenuPosition
|
||||||
@selected=${this._deviceClassChanged}
|
@selected=${this._deviceClassChanged}
|
||||||
|
@closed=${stopPropagation}
|
||||||
>
|
>
|
||||||
${OVERRIDE_DEVICE_CLASSES[domain].map(
|
${OVERRIDE_DEVICE_CLASSES[domain].map(
|
||||||
(deviceClass: string) => html`
|
(deviceClass: string) => html`
|
||||||
@ -422,6 +426,7 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
ha-select {
|
ha-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin: 8px 0;
|
||||||
}
|
}
|
||||||
ha-switch {
|
ha-switch {
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user