Skip to content

Commit

Permalink
Update version info 🌟
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkih committed Mar 18, 2019
1 parent d8c35d1 commit 07d4973
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 22 deletions.
46 changes: 28 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ The card works with entities from within the **sensor** domain and displays the

1. Download and copy `mini-graph-card-bundle.js` from the [latest release](https://github.com/kalkih/mini-graph-card/releases/latest) into your `config/www` directory.

2. Add a reference to `mini-graph-card-bundle.js` inside your `ui-lovelace.yaml`.
2. Add a reference to `mini-graph-card-bundle.js` inside your `ui-lovelace.yaml` or at the top of the *raw config editor UI*.

```yaml
resources:
- url: /local/mini-graph-card-bundle.js?v=0.3.0
- url: /local/mini-graph-card-bundle.js?v=0.3.1
type: module
```
Expand All @@ -26,14 +26,14 @@ The card works with entities from within the **sensor** domain and displays the
2. Grab `mini-graph-card-bundle.js`

```
$ wget https://github.com/kalkih/mini-graph-card/releases/download/v0.3.0/mini-graph-card-bundle.js
$ wget https://github.com/kalkih/mini-graph-card/releases/download/v0.3.1/mini-graph-card-bundle.js
```

3. Add a reference to `mini-graph-card-bundle.js` inside your `ui-lovelace.yaml`.

```yaml
resources:
- url: /local/mini-graph-card-bundle.js?v=0.3.0
- url: /local/mini-graph-card-bundle.js?v=0.3.1
type: module
```

Expand All @@ -60,7 +60,7 @@ The card works with entities from within the **sensor** domain and displays the

```yaml
resources:
- url: /local/mini-graph-card-bundle.js?v=0.3.0
- url: /local/mini-graph-card-bundle.js?v=0.3.1
type: module
```

Expand Down Expand Up @@ -90,7 +90,8 @@ The card works with entities from within the **sensor** domain and displays the
| color_thresholds | list | optional | v0.2.3 | Set thresholds for dynamic graph colors, see [Line color object](#line-color-object).
| decimals | integer | optional | v0.0.9 | Specify the exact number of decimals to show for states.
| hour24 | boolean | false | v0.2.1 | Set to `true` to display times in 24-hour format.
| font_size | number | 100 | v0.0.3 | Adjust the font size of the state displayed, as percentage of the original size.
| font_size | number | 100 | v0.0.3 | Adjust the font size of the state, as percentage of the original size.
| font_size_header | number | 14 | v0.3.1 | Adjust the font size of the header, size in pixels.
| align_header | string | `default` | v0.2.0 | Set the alignment of the header, `left`, `right`, `center` or `default`.
| align_icon | string | `right` | v0.2.0 | Set the alignment of the icon, `left`, `right` or `state`.
| align_state | string | `left` | v0.2.0 | Set the alignment of the current state, `left`, `right` or `center`.
Expand All @@ -104,9 +105,11 @@ Providing options are optional, entities can be listed directly, see example bel
|------|:----:|:-------:|:------------|
| entity | string | **required** | Entity id of the sensor.
| name | string | optional | Set a custom display name, defaults to entity's friendly_name.
| show_state | boolean | optional | Display the current state of the sensor.
| color | string | optional | Set a custom color, overrides all other color options including thresholds.
| unit | string | optional | Set a custom unit of measurement, overrides `unit` set in base config.
| show_state | boolean | optional | Display the current state.
| show_indicator | boolean | optional | Display a color indicator next to the state, (only when more than two states are visible).
| state_adaptive_color | boolean | optional | Make the color of the state adapt to the entity color.

```yaml
entities:
Expand All @@ -131,6 +134,8 @@ All options are optional.
| legend | true | `true` / `false` | Display the graph legend (only shown when graph contains multiple entities)
| extrema | false | `true` / `false` | Display max/min information
| labels | hover | `true` / `false` / `hover` | Display Y-axis labels
| name_adaptive_color | false | `true` / `false` | Make the name color adapt with the primary entity color
| icon_adaptive_color | false | `true` / `false` | Make the icon color adapt with the primary entity color

#### Line color object
See [dynamic line color](#dynamic-line-color) for example usage.
Expand Down Expand Up @@ -272,33 +277,38 @@ $ git clone https://github.com/kalkih/mini-graph-card.git
```yaml
resources:
- url: /local/mini-graph-card/mini-graph-card-bundle.js
- url: /local/mini-graph-card/dist/mini-graph-card-bundle.js
type: module
```

### Generate the bundle
### Instructions

*Requires `nodejs` & `npm`*

**Move into the `mini-graph-card` repo, checkout the dev branch & install dependencies.**

```
1. Move into the `mini-graph-card` repo, checkout the *dev* branch & install dependencies.
```console
$ cd mini-graph-card && git checkout dev && npm install
```

**Edit the source, build by running**
```
2. Make changes to the source code

3. Build the source by running
```console
$ npm run build
```

The `mini-graph-card-bundle.js` will be rebuilt and ready.
4. Refresh the browser to see changes

**For convenience, you can have the source build itself on file change by running**
```
*Make sure cache is cleared or disabled*

5. *(Optional)* Watch the source and automatically rebuild on save
```console
$ npm run watch
```

**If you plan to submit a PR, please base it on the .dev` branch**
*The new `mini-graph-card-bundle.js` will be build and ready inside `/dist`.*

**If you plan to submit a PR, please base it on the `dev` branch**

## Getting errors?
Make sure you have `javascript_version: latest` in your `configuration.yaml` under `frontend:`.
Expand Down
15 changes: 15 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## v0.3.1
- **New:** Options `name_adaptive_color`, `icon_adaptive_color` in `show` option object to display the name/icon in the entity color (#67, #50)
- **New:** Option `state_adaptive_color` in entity object, to display the state in the entity color (#67)
- **New:** Option `show_indicator` in entity object, to display a color indicator next to the state (#72)
- **New:** Option `font_size_header` added (#53)
- **New** Added date (day/weekday) to timestamps when timeframe > 24 (#61)
- **New** It's now possible to set `hours_to_show` to float values and values lower than one.
- **Changed** Legend color indicators are now ciruclar instead of rectangular
- **Fixed:** Bar chart now shows correct amount of bars
- **Fixed:** Points should no longer be cut off when at the very bottom of the graph
- **Fixed:** Timestamps for bars
- **Fixed:** Missing paddings between card elements when group option was set to `true`
- **Fixed:** Unwanted overflow when border radius applied
- **Fixed:** Improved compatibility (#64)

## v0.3.0
- **New:** Support for bar charts (#49)
- **New:** Parameter `bar` added to `show` -> `graph`, display graph as a bar chart (#49)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mini-graph-card",
"version": "0.3.0",
"version": "0.3.1",
"description": "A minimalistic and customizable graph card for Home Assistant Lovelace UI",
"keywords": [
"home-assistant",
Expand Down
6 changes: 3 additions & 3 deletions tracker.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"mini-graph-card-bundle": {
"updated_at": "2019-02-18",
"version": "0.3.0",
"remote_location": "https://github.com/kalkih/mini-graph-card/releases/download/v0.3.0/mini-graph-card-bundle.js",
"updated_at": "2019-03-18",
"version": "0.3.1",
"remote_location": "https://github.com/kalkih/mini-graph-card/releases/download/v0.3.1/mini-graph-card-bundle.js",
"visit_repo": "https://github.com/kalkih/mini-graph-card",
"changelog": "https://github.com/kalkih/mini-graph-card/releases/latest"
}
Expand Down

0 comments on commit 07d4973

Please sign in to comment.