Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcHagen committed May 28, 2021
1 parent 03556af commit b10ff3a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/weather-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ export class WeatherCard extends LitElement {
${this.getDateString(forecast.datetime)}
</div>
<i class="icon"
style="background: none, url('${this.getWeatherIcon(forecast.condition.toLowerCase(), this.hass.states['sun.sun'].state)}') no-repeat; background-size: contain"></i>
style="background: none, url('${this.getWeatherIcon(
forecast.condition.toLowerCase(),
this.hass.states['sun.sun'].state
)}') no-repeat; background-size: contain"></i>
<div class="highTemp">
${forecast.temperature}${this.getUnit('temperature')}
</div>
Expand Down Expand Up @@ -322,7 +325,10 @@ export class WeatherCard extends LitElement {
</div>
<div class="conditions">
${this.forecast.map(forecast => html`<i class="icon"
style="background: none, url('${this.getWeatherIcon(forecast.condition.toLowerCase(), this.hass.states['sun.sun'].state)}') no-repeat; background-size: contain"></i>`
style="background: none, url('${this.getWeatherIcon(
forecast.condition.toLowerCase(),
this.hass.states['sun.sun'].state
)}') no-repeat; background-size: contain"></i>`
)}
</div>
`;
Expand Down Expand Up @@ -500,7 +506,8 @@ export class WeatherCard extends LitElement {
label: (tooltipItems, data): string => {
const label = data.datasets[tooltipItems.datasetIndex].label || '';
if (data.datasets[2].label === label) {
return label + ': ' + (tooltipItems.yLabel ? (tooltipItems.yLabel + ' ' + this.getUnit('precipitation')) : ('0 ' + this.getUnit('precipitation')));
return label + ': ' + (tooltipItems.yLabel ? (tooltipItems.yLabel + ' ' + this.getUnit(
'precipitation')) : ('0 ' + this.getUnit('precipitation')));
}
return label + ': ' + tooltipItems.yLabel + ' ' + this.getUnit('temperature');
},
Expand Down

0 comments on commit b10ff3a

Please sign in to comment.