Skip to content

Commit

Permalink
fix icon issue and prep for 0.88c
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidFW1960 committed Apr 12, 2021
1 parent 4b55c41 commit f474700
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bom-weather-card.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// #### Add card info to console
console.info(
`%cBOM-WEATHER-CARD\n%cVersion 0.88b `,
`%cBOM-WEATHER-CARD\n%cVersion 0.88c `,
"color: #043ff6; font-weight: bold; background: white",
"color: white; font-weight: bold; background: #043ff6"
);
Expand Down Expand Up @@ -289,8 +289,8 @@ class BOMWeatherCard extends LitElement {

get weatherIcons() {
var iconStyle = (this.config.old_icon ==="hybrid") ? `hybrid` : (this.config.old_icon ==="false") ? `false` : `true`;
var sunny_icon = (iconStyle ==="true") ? `${this.dayOrNight}` : (iconStyle ==="hybrid") ? `${this.dayOrNight}` : `${this.dayOrNight}`;
var clear_icon = (iconStyle ==="true") ? `${this.dayOrNight}` : (iconStyle ==="hybrid") ? `${this.dayOrNight}` : `clear-${this.dayOrNight}`;
var sunny_icon = (iconStyle ==="true") ? `${this.dayOrNight}` : (iconStyle ==="hybrid") ? `sunny-${this.dayOrNight}` : `sunny-${this.dayOrNight}`;
var clear_icon = (iconStyle ==="true") ? `${this.dayOrNight}` : (iconStyle ==="hybrid") ? `sunny-${this.dayOrNight}` : `clear-${this.dayOrNight}`;
var mostly_sunny_icon = (iconStyle ==="true") ? `fair-${this.dayOrNight}` : (iconStyle ==="hybrid") ? `fair-${this.dayOrNight}` : `fair-${this.dayOrNight}`;
var partly_cloudy_icon = (iconStyle ==="true") ? `cloudy-${this.dayOrNight}-3` : (iconStyle ==="hybrid") ? `cloudy-${this.dayOrNight}-3` : `partly-cloudy-${this.dayOrNight}`;
var cloudy_icon = (iconStyle ==="true") ? `cloudy-original` : (iconStyle ==="hybrid") ? `cloudy-original` : `cloudy`;
Expand Down
8 changes: 7 additions & 1 deletion info.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## Latest Changes

This release corrects a bug in the night icon for the sunny condition. It is a breaking change.
This affects you if you use hybrid icons
You need to copy the day.png to sunny-day.png and night.png to sunny-night.png or re-download and extract the icons from the zip file again. (Don't rename the old one as that will break installations using old icons.)
If you care about the reason for this read on:
The reason this happened is because I had to change a substitution in the icon url to use -night instead of just night because someone was using night in their domain name... so last night, I was getting a night icon for a forecast day which shouldn't be happening except night.svg wasn't getting re-written because it was night.svg not including -night.svg...

This release adds new icons for light-rain and showers at night.
Download the weather_icons.zip and unzip it for the new icons.
This is only applicable if you are using the hybrid or new icon set!!!
Expand All @@ -16,7 +22,7 @@ I have also changed the forecast icon to never use the night icon - it will now
Added new slot popforecast so if you display a slot as popforecast it will now show the predicted instead of actual rainfall today
This card will now respect locale formatting (commas instead of decimal points etc)

Also added my illuminance sensor and history graph to display and also a more information card utilising some of the other templates.
Also added my illuminance sensor and history graph to display and a to sunny-day.png and night.png to sunny-night.pnglso a more information card utilising some of the other templates.


Added this card to the card picker in Lovelace
Expand Down
Binary file modified weather_icons.zip
Binary file not shown.

0 comments on commit f474700

Please sign in to comment.