Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show wind direction & speed in daily/hourly forecast #148

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion dist/weather-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,18 @@ class WeatherCard extends LitElement {
</div>
`
: ""}

<div class="wind">
<span class="wind-direction-arrow" style="transform: rotate(${daily.wind_bearing}deg)">
<ha-icon icon="mdi:arrow-down-thin"></ha-icon>
</span>
<span class="windspeed">
${Math.round(daily.wind_speed)}<span class="unit">
${this.getUnit("length")}/h
</span>
</span>
</div>

</div>
`
)}
Expand Down Expand Up @@ -493,7 +505,7 @@ class WeatherCard extends LitElement {
color: var(--secondary-text-color);
}

.precipitation {
.wind, .precipitation {
color: var(--primary-text-color);
font-weight: 300;
}
Expand Down Expand Up @@ -529,6 +541,14 @@ class WeatherCard extends LitElement {
word-wrap: break-word;
width: 30%;
}

.windspeed {
white-space: nowrap;
}

.wind-direction-arrow {
display: inline-block;
}
`;
}
}
Expand Down