mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix lock more info with attributes (#15622)
* Fix lock more info with attributes * Update src/dialogs/more-info/controls/more-info-lock.ts Co-authored-by: Bram Kragten <mail@bramkragten.nl> --------- Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
4b428a60cd
commit
ea95fb98aa
@ -21,7 +21,7 @@ class MoreInfoLock extends LitElement {
|
|||||||
}
|
}
|
||||||
return html`
|
return html`
|
||||||
${this.stateObj.attributes.code_format
|
${this.stateObj.attributes.code_format
|
||||||
? html`
|
? html`<div class="code">
|
||||||
<ha-textfield
|
<ha-textfield
|
||||||
.label=${this.hass.localize("ui.card.lock.code")}
|
.label=${this.hass.localize("ui.card.lock.code")}
|
||||||
.pattern=${this.stateObj.attributes.code_format}
|
.pattern=${this.stateObj.attributes.code_format}
|
||||||
@ -36,7 +36,7 @@ class MoreInfoLock extends LitElement {
|
|||||||
: html`<mwc-button @click=${this._callService} data-service="lock"
|
: html`<mwc-button @click=${this._callService} data-service="lock"
|
||||||
>${this.hass.localize("ui.card.lock.lock")}</mwc-button
|
>${this.hass.localize("ui.card.lock.lock")}</mwc-button
|
||||||
>`}
|
>`}
|
||||||
`
|
</div>`
|
||||||
: ""}
|
: ""}
|
||||||
<ha-attributes
|
<ha-attributes
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
@ -59,6 +59,18 @@ class MoreInfoLock extends LitElement {
|
|||||||
:host {
|
:host {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.code {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
ha-attributes {
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user