diff --git a/packages/v3/src/css/app.ts b/packages/v3/src/css/app.ts index 60a5df3..f821f90 100644 --- a/packages/v3/src/css/app.ts +++ b/packages/v3/src/css/app.ts @@ -3,7 +3,7 @@ import { css } from "lit"; export default css` .flex-grid-half { display: grid; - grid-template-columns: 600px 2fr; + grid-template-columns: 700px 2fr; } .flex-grid-half.expanded_entity, .flex-grid-half.expanded_logs { diff --git a/packages/v3/src/css/esp-entity-table.ts b/packages/v3/src/css/esp-entity-table.ts index 82a93a6..f0ab116 100644 --- a/packages/v3/src/css/esp-entity-table.ts +++ b/packages/v3/src/css/esp-entity-table.ts @@ -72,7 +72,24 @@ export default css` margin: auto; display: flex; } - + .climate-wrap{ + width: 100%; + margin: 10px 0 10px 0; + } + .climate-row { + width: 100%; + display: inline-flex; + flex-wrap: wrap; + text-align: left; + } + .climate-row > select{ + width: 50%; + } + .climate-row > label{ + align-content: center; + width: 150px; + } + input[type="color"]::-webkit-color-swatch-wrapper { padding: 0 !important; } diff --git a/packages/v3/src/esp-entity-table.ts b/packages/v3/src/esp-entity-table.ts index 4bc224b..d76b1eb 100644 --- a/packages/v3/src/esp-entity-table.ts +++ b/packages/v3/src/esp-entity-table.ts @@ -617,65 +617,73 @@ class ActionRenderer { render_climate() { if (!this.entity) return; - let target_temp_slider, target_temp_label; + let target_temp_slider, target_temp_label, target_temp; + let current_temp = html`
+ +
`; + if ( this.entity.target_temperature_low !== undefined && this.entity.target_temperature_high !== undefined ) { - target_temp_label = html`${this.entity - .target_temperature_low} .. ${this.entity - .target_temperature_high}`; - target_temp_slider = html` - ${this._range( - this.entity, - "set", - "target_temperature_low", - this.entity.target_temperature_low, - this.entity.min_temp, - this.entity.max_temp, - this.entity.step - )} - ${this._range( - this.entity, - "set", - "target_temperature_high", - this.entity.target_temperature_high, - this.entity.min_temp, - this.entity.max_temp, - this.entity.step - )} - `; + target_temp = html` +
+ + ${this._range( + this.entity, + "set", + "target_temperature_low", + this.entity.target_temperature_low, + this.entity.min_temp, + this.entity.max_temp, + this.entity.step + )} +
+
+ + ${this._range( + this.entity, + "set", + "target_temperature_high", + this.entity.target_temperature_high, + this.entity.min_temp, + this.entity.max_temp, + this.entity.step + )} +
`; } else { - target_temp_label = html`${this.entity.target_temperature}`; - target_temp_slider = html` - ${this._range( - this.entity, - "set", - "target_temperature", - this.entity.target_temperature!!, - this.entity.min_temp, - this.entity.max_temp, - this.entity.step - )} - `; + target_temp = html` +
+ + ${this._range( + this.entity, + "set", + "target_temperature", + this.entity.target_temperature!!, + this.entity.min_temp, + this.entity.max_temp, + this.entity.step + )} +
`; } let modes = html``; if ((this.entity.modes ? this.entity.modes.length : 0) > 0) { - modes = html`Mode:
- ${this._select( - this.entity, - "set", - "mode", - this.entity.modes || [], - this.entity.mode || "" - )}`; + modes = html` +
+ + ${this._select( + this.entity, + "set", + "mode", + this.entity.modes || [], + this.entity.mode || "" + )} +
`; } return html` - - ${target_temp_slider} ${modes} +
+ ${current_temp} ${target_temp} ${modes} +
`; } } diff --git a/packages/v3/src/esp-range-slider.ts b/packages/v3/src/esp-range-slider.ts index 66d1a54..29106a0 100644 --- a/packages/v3/src/esp-range-slider.ts +++ b/packages/v3/src/esp-range-slider.ts @@ -186,7 +186,8 @@ export class EspRangeSlider extends LitElement { cssReset, css` :host { - width: 100%; + min-width: 150px; + flex: 1; } input[type=range] { -webkit-appearance: none;