Skip to content

Commit 04ade66

Browse files
committed
new graph option
1 parent e936a9b commit 04ade66

File tree

7 files changed

+500
-83
lines changed

7 files changed

+500
-83
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.5.0
2+
- Added graph possibility
3+
- added number of forecast values
4+
15
## 1.2.0
26

37
- Added UI editor

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Lovelace animated weather card
22

33
Originally created for the [old UI](https://community.home-assistant.io/t/custom-ui-weather-state-card-with-a-question/23008) converted by @arsaboo and @ciotlosm to [Lovelace](https://community.home-assistant.io/t/custom-ui-weather-state-card-with-a-question/23008/291) and now converted to Lit to make it even better.
4+
Was merge with [lovelace weather card chart](https://github.com/sgttrs/lovelace-weather-card-chart) to get graph and translation
45

56
This card uses the awesome [animated SVG weather icons by amCharts](https://www.amcharts.com/free-animated-svg-weather-icons/).
67

7-
![Weather Card](https://github.com/bramkragten/custom-ui/blob/master/weather-card/weather-card.gif?raw=true)
8+
![Weather Card](https://raw.githubusercontent.com/bobzer/weather-card/master/weather-card.png)
89

910
Thanks for all picking this card up.
1011

@@ -23,15 +24,15 @@ Or use the version without the editor: [Version without editor](https://raw.gith
2324
Add the following to resources in your lovelace config:
2425

2526
```yaml
26-
- url: https://cdn.jsdelivr.net/gh/bramkragten/weather-card/dist/weather-card.min.js
27+
- url: https://cdn.jsdelivr.net/gh/bobzer/weather-card/dist/weather-card.min.js
2728
type: module
2829
```
2930
3031
# Manual:
3132
32-
1. Download the [weather-card.js](https://raw.githubusercontent.com/bramkragten/weather-card/v1.2.0/dist/weather-card.js) to `/config/www/custom-lovelace/weather-card/`. (or an other folder in `/config/www/`)
33+
1. Download the [weather-card.js](https://raw.githubusercontent.com/bobzer/weather-card/v1.2.0/dist/weather-card.js) to `/config/www/custom-lovelace/weather-card/`. (or an other folder in `/config/www/`)
3334
2. Save, the [amCharts icons](https://www.amcharts.com/free-animated-svg-weather-icons/) (The contents of the folder "animated") under `/config/www/custom-lovelace/weather-card/icons/` (or an other folder in `/config/www/`)
34-
3. If you use Lovelace in storage mode, and want to use the editor, download the [weather-card-editor.js](https://raw.githubusercontent.com/bramkragten/weather-card/v1.2.0/dist/weather-card-editor.js) to `/config/www/custom-lovelace/weather-card/`. (or the folder you used above)
35+
3. If you use Lovelace in storage mode, and want to use the editor, download the [weather-card-editor.js](https://raw.githubusercontent.com/bobzer/weather-card/v1.2.0/dist/weather-card-editor.js) to `/config/www/custom-lovelace/weather-card/`. (or the folder you used above)
3536

3637
Add the following to resources in your lovelace config:
3738

dist/weather-card-editor.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ export class WeatherCardEditor extends LitElement {
5555
return this._config.forecast !== false;
5656
}
5757

58+
get _graph() {
59+
return this._config.graph !== false;
60+
}
61+
62+
get _forecast_max_Column() {
63+
return this._config.forecast_max_Column || 9;
64+
}
65+
66+
get _hide_precipitation() {
67+
return this._config.hide_precipitation === true;
68+
}
69+
5870
render() {
5971
if (!this.hass) {
6072
return html``;
@@ -120,12 +132,33 @@ export class WeatherCardEditor extends LitElement {
120132
@change="${this._valueChanged}"
121133
>Show details</ha-switch
122134
>
135+
<ha-switch
136+
.checked=${this._hide_precipitation}
137+
.configValue="${"hide_precipitation"}"
138+
@change="${this._valueChanged}"
139+
>Hide precipitation</ha-switch
140+
>
123141
<ha-switch
124142
.checked=${this._forecast}
125143
.configValue="${"forecast"}"
126144
@change="${this._valueChanged}"
127145
>Show forecast</ha-switch
128146
>
147+
<ha-switch
148+
.checked=${this._graph}
149+
.configValue="${"graph"}"
150+
@change="${this._valueChanged}"
151+
>Show graph</ha-switch
152+
>
153+
<paper-input
154+
label="forecast max columns (optional)"
155+
type="number"
156+
.value="${this._forecast_max_Column}"
157+
.configValue="${"forecast_max_Column"}"
158+
@value-changed="${this._valueChanged}"
159+
min="2"
160+
max="20"
161+
></paper-input>
129162
</div>
130163
</div>
131164
`;

0 commit comments

Comments
 (0)