don't round update entity images (#17972)

This commit is contained in:
Bram Kragten 2023-09-20 20:39:54 +02:00 committed by GitHub
parent 4b5c7021ff
commit 6179c75182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -131,11 +131,15 @@ export class StateBadge extends LitElement {
if (this.hass) {
imageUrl = this.hass.hassUrl(imageUrl);
}
if (computeDomain(stateObj.entity_id) === "camera") {
const domain = computeDomain(stateObj.entity_id);
if (domain === "camera") {
imageUrl = cameraUrlWithWidthHeight(imageUrl, 80, 80);
}
hostStyle.backgroundImage = `url(${imageUrl})`;
this._showIcon = false;
if (domain === "update") {
hostStyle.borderRadius = "0";
}
} else if (this.color) {
// Externally provided overriding color wins over state color
iconStyle.color = this.color;

View File

@ -86,7 +86,7 @@ class HaConfigUpdates extends SubscribeMixin(LitElement) {
return html`
<ha-list-item
twoline
graphic="avatar"
graphic="medium"
class=${entity.attributes.skipped_version ? "skipped" : ""}
.entity_id=${entity.entity_id}
.hasMeta=${!this.narrow}
@ -156,6 +156,9 @@ class HaConfigUpdates extends SubscribeMixin(LitElement) {
.skipped {
background: var(--secondary-background-color);
}
ha-list-item {
--mdc-list-item-graphic-size: 40px;
}
ha-icon-next {
color: var(--secondary-text-color);
height: 24px;