This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,56 @@ | ||
 | ||
 | ||
|
||
## Configuration | ||
|
||
Copy `weather-card-chart.js` from this repository into your `config/www` directory first. | ||
Download and copy `weather-chart-card.js` from the [latest release](https://github.com/Yevgenium/weather-chart-card/releases/latest) into your `config/www` directory. | ||
|
||
Add a reference to the copied file: | ||
Add a reference to the copied file inside your `configuration.yaml` or in the Home Assistant UI: | ||
|
||
[](https://my.home-assistant.io/redirect/lovelace_resources/) | ||
```yaml | ||
# Example Lovelace UI config entry | ||
resources: | ||
- type: module | ||
url: /local/weather-card-chart.js | ||
url: /local/weather-chart-card.js | ||
``` | ||
Then you can add the card to the view: | ||
```yaml | ||
# Example Lovelace UI config entry | ||
- type: 'custom:weather-card-chart' | ||
title: Weather | ||
weather: weather.openweathermap | ||
type: custom:weather-chart-card | ||
weather: weather.home | ||
``` | ||
#### Configuration variables: | ||
| Name | Optional | Description | | ||
| ------- | -------- | -------------------------------------------------------------------------------------------------- | | ||
| type | **No** | Should be `'custom:weather-card-chart'` | | ||
| title | **No** | Card title | | ||
| weather | **No** | An entity_id with the `weather` domain | | ||
| wind | Yes | Entity_id of the wind sensor. Show wind value from sensor instead | | ||
| temp | Yes | Entity_id of the temperature sensor. Show temperature value from sensor instead | | ||
| mode | Yes | Default value: `daily`. Set mode to `hourly` to display hours instead weekdays on the chart | | ||
| Name | Type | Default | Description | | ||
| --------------- | ------- | -------------|--------------------------------------------------------------------------------------------------- | | ||
| type | string | **Required** | Should be `custom:weather-chart-card` | | ||
| weather | string | **Required** | An entity_id with the `weather` domain | | ||
| title | string | none | Card title | | ||
| temp | string | none | Entity_id of the temperature sensor. Show temperature value from sensor instead | | ||
| show_main | boolean | true | Show or hide a section with current weather condition amd temperature | | ||
| show_attributes | boolean | true | Show or hide a section with attributes such as pressure, humidity, wind direction and speed, etc | | ||
| icons | string | none | Path to the location of custom icons in svg format, for example `/local/weather-icons/` | | ||
| icons_size | number | 25 | The size of custom icons in pixels | | ||
|
||
###### What custom icons can I use? | ||
Icons should be in svg format. Icons should have names as shown [here](https://github.com/Yevgenium/weather-chart-card/blob/a9f795f2fd02028bdad9b771d383fa38c5f3148c/src/const.js#L24). Example: | ||
 | ||
|
||
|
||
#### Example usage: | ||
###### Basic | ||
 | ||
```yaml | ||
type: custom:weather-chart-card | ||
weather: weather.home_hourly | ||
``` | ||
###### Chart only | ||
 | ||
```yaml | ||
type: custom:weather-chart-card | ||
weather: weather.openweathermap | ||
show_main: false | ||
show_attributes: false | ||
icons: /local/weather-icons/ | ||
``` |