Skip to content

Commit

Permalink
don't round update entity images (#17972)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Sep 20, 2023
1 parent 4b5c702 commit 6179c75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/entity/state-badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion src/panels/config/dashboard/ha-config-updates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6179c75

Please sign in to comment.