Skip to content

Commit

Permalink
Add new design to humidifier card (#18711)
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya authored Nov 22, 2023
1 parent 61717e1 commit 9163b9c
Show file tree
Hide file tree
Showing 12 changed files with 349 additions and 362 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@lrnwebcomponents/simple-tooltip/simple-tooltip";
import { mdiMinus, mdiPlus, mdiWaterPercent } from "@mdi/js";
import { CSSResultGroup, LitElement, PropertyValues, html } from "lit";
import { customElement, property, state } from "lit/decorators";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export const moreInfoControlCircularSliderStyle = css`
font-size: 32px;
}
.info {
margin-top: 12px;
font-size: 14px;
gap: 2px;
--mdc-icon-size: 14px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mdiMinus, mdiPlus } from "@mdi/js";
import { mdiMinus, mdiPlus, mdiWaterPercent } from "@mdi/js";
import { CSSResultGroup, LitElement, PropertyValues, html } from "lit";
import { customElement, property, state } from "lit/decorators";
import { styleMap } from "lit/directives/style-map";
Expand Down Expand Up @@ -100,13 +100,9 @@ export class HaMoreInfoHumidifierHumidity extends LitElement {

return html`
<p class="label">
${action && ["drying", "humidifying"].includes(action)
? this.hass.localize("ui.card.humidifier.target_label", {
action: actionLabel,
})
: action && action !== "off" && action !== "idle"
? actionLabel
: this.hass.localize("ui.card.humidifier.target")}
${action && action !== "off" && action !== "idle"
? actionLabel
: this.hass.localize("ui.card.humidifier.target")}
</p>
`;
}
Expand All @@ -118,7 +114,7 @@ export class HaMoreInfoHumidifierHumidity extends LitElement {

return html`
<p class="label">
${this.hass.localize("ui.card.humidifier.currently")}
<ha-svg-icon .path=${mdiWaterPercent}></ha-svg-icon>
<span>
${this.hass.formatEntityAttributeValue(
this.stateObj,
Expand Down
Loading

0 comments on commit 9163b9c

Please sign in to comment.