Skip to content

Commit da2804a

Browse files
committed
[TASK] fix scale with grid stacks
1 parent 997e2e0 commit da2804a

File tree

5 files changed

+49
-29
lines changed

5 files changed

+49
-29
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Version - 2.1.0](https://img.shields.io/badge/Version-2.1.0-009688?style=for-the-badge)](https://github.com/KartoffelToby/better-thermostat-ui-card)
1+
[![Version - 2.1.1](https://img.shields.io/badge/Version-2.1.1-009688?style=for-the-badge)](https://github.com/KartoffelToby/better-thermostat-ui-card)
22
[![Discord](https://img.shields.io/discord/925725316540923914.svg?style=for-the-badge)](https://discord.gg/9BUegWTG3K)
33
[![hacs_badge](https://img.shields.io/badge/HACS-Default-41BDF5.svg?style=for-the-badge)](https://github.com/hacs/integration)
44

dist/better-thermostat-ui-card.js

Lines changed: 31 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "better-thermostat-ui-card",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Lovelace better-thermostat-ui",
55
"keywords": [
66
"home-assistant",

src/better-thermostat-ui.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ export class BetterThermostatUi extends LitElement implements LovelaceCard {
223223
padding-top: 1.5em;
224224
box-sizing: border-box;
225225
position: relative;
226+
display: flex;
227+
flex-direction: column;
228+
flex-wrap: nowrap;
229+
align-content: center;
230+
justify-content: center;
231+
align-items: center;
226232
}
227233
228234
bt-ha-outlined-icon-button {
@@ -496,17 +502,19 @@ export class BetterThermostatUi extends LitElement implements LovelaceCard {
496502
--mode-color: var(--energy-non-fossil-color) !important;
497503
}
498504
505+
@container bt-card (max-width: 280px) {
506+
.content {
507+
top: calc(50% - 10px);
508+
}
509+
}
510+
499511
@container bt-card (max-width: 255px) {
500512
#modes {
501513
margin-top: -2em;
502514
}
503515
ha-card {
504516
padding-top: 2em;
505517
}
506-
.content {
507-
width: calc(90% - 40px);
508-
top: calc(50% - 20px);
509-
}
510518
}
511519
`;
512520

@@ -708,7 +716,9 @@ export class BetterThermostatUi extends LitElement implements LovelaceCard {
708716
tabindex="0"
709717
></ha-icon-button>
710718
`}
711-
<div class="name">${this._config?.name}</div>
719+
${this?._config?.name?.length || 0 > 0 ? html`
720+
<div class="name">${this._config?.name}</div>
721+
` : html`<div class="name">&nbsp;</div>`}
712722
${this.lowBattery !== null ? html`
713723
<div class="low_battery">
714724
<ha-icon-button class="alert" .path=${mdiBatteryAlert}>

src/const.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const CARD_VERSION = '2.1.0';
1+
export const CARD_VERSION = '2.1.1';

0 commit comments

Comments
 (0)