Skip to content

Commit

Permalink
Merge pull request #53 from 1ntroduc3/patch-2
Browse files Browse the repository at this point in the history
Update light-popup-card.ts
  • Loading branch information
DBuit authored Oct 22, 2020
2 parents 3ae614e + c592af6 commit bdfa938
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/light-popup-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class LightPopupCard extends LitElement {
<input type="range" style="--slider-width: ${brightnessWidth};--slider-height: ${brightnessHeight}; --slider-border-radius: ${borderRadius};${sliderColoredByLight ? '--slider-color:'+color+';':'--slider-color:'+sliderColor+';'}--slider-thumb-color:${sliderThumbColor};--slider-track-color:${sliderTrackColor};" .value="${offStates.includes(stateObj.state) ? 0 : Math.round(stateObj.attributes.brightness/2.55)}" @input=${e => this._previewBrightness(e.target.value)} @change=${e => this._setBrightness(stateObj, e.target.value)}>
</div>
` : html`
<h4>${computeStateDisplay(this.hass.localize, stateObj, this.hass.language)}</h4>
<h4 id="switchValue">${computeStateDisplay(this.hass.localize, stateObj, this.hass.language)}</h4>
<div class="switch-holder" style="--switch-height: ${switchHeight};--switch-width: ${switchWidth};">
<input type="range" style="--switch-width: ${switchWidth};--switch-height: ${switchHeight}; --slider-border-radius: ${borderRadius}; --switch-color: ${switchColor}; --switch-track-color: ${switchTrackColor};" value="0" min="0" max="1" .value="${switchValue}" @change=${() => this._switch(stateObj)}>
</div>
Expand Down

0 comments on commit bdfa938

Please sign in to comment.