diff --git a/README.md b/README.md index eb7cd5b..4036764 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Lovelace Mini Graph Card A minimalistic sensor with graph lovelace card for [Home Assistant](https://github.com/home-assistant/home-assistant). -The card works with entities from within the **sensor** domain and displays the sensors current state as well as a line graph of the sensor state during the past 24 hours (accuracy may vary). +The card works with entities from within the **sensor** domain and displays the sensors current state as well as a line graph of the sensors state history. ![Preview](https://user-images.githubusercontent.com/457678/48304689-d975fa00-e51d-11e8-9cd6-620a17e3d244.png) @@ -15,8 +15,8 @@ The card works with entities from within the **sensor** domain and displays the ```yaml resources: - - url: /local/mini-graph-card-bundle.js?v=0.0.7 - type: module + - url: /local/mini-graph-card-bundle.js?v=0.0.8 + type: js ``` ### CLI install @@ -26,15 +26,15 @@ The card works with entities from within the **sensor** domain and displays the - Grab `mini-graph-card-bundle.js` ``` - $ wget https://github.com/kalkih/mini-graph-card/releases/download/v0.0.7/mini-graph-card-bundle.js + $ wget https://github.com/kalkih/mini-graph-card/releases/download/v0.0.8/mini-graph-card-bundle.js ``` - 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.0.7 - type: module + - url: /local/mini-graph-card-bundle.js?v=0.0.8 + type: js ``` ### *(Optional)* Add to custom updater @@ -50,7 +50,7 @@ The card works with entities from within the **sensor** domain and displays the ``` ## Updating - **Important:** If you are updating from a version prior to v0.5, make sure you change `- type: js` to `- type: module` in your reference to the card in your `ui-lovelace.ysml`. +**If you have a version older than v0.0.8 installed, please delete the current files and follow the installation instructions again.** 1. Find your `mini-graph-card-bundle.js` file in `config/www` or wherever you ended up storing it. @@ -60,13 +60,12 @@ The card works with entities from within the **sensor** domain and displays the ```yaml resources: - - url: /local/mini-graph-card-bundle.js?v=0.0.7 - type: module + - url: /local/mini-graph-card-bundle.js?v=0.0.8 + type: js ``` *You may need to empty the browsers cache if you have problems loading the updated card.* - ## Using the card ### Options @@ -83,13 +82,15 @@ The card works with entities from within the **sensor** domain and displays the | line_width | number | 5 | v0.0.1 | Set the thickness of the line. | line_color | string | 'var(accent-color)' | v0.0.1 | Set a custom color for the line in the graph. | more_info | boolean | true | v0.0.1 | Set to `false` to disable the "more info" dialog when pressing the card. -| hours_to_show | number | 24 | v0.0.2 | Specify how many hours to show. +| hours_to_show | integer | 24 | v0.0.2 | Specify how many hours the line graph should render. | font_size | number | 100 | v0.0.3 | Adjust the font size of the state value, as percentage of the original size. | line_value_above | number | optional | v0.0.4 | Set a threshold, if current state is above this value, the line color will change to color specified in `line_value_above`. | line_color_above | string | optional | v0.0.4 | Set the line color for `line_value_above` | line_value_below | number | optional | v0.0.4 | Set a threshold, if current state is below this value, the line color will change to color specified in `line_value_below`. | line_color_below | string | optional | v0.0.4 | Set the line color for `line_value_below`. | hide_icon | boolean | optional | v0.0.5 | Set to `true` to hide icon. +| detail | integer | 1 | v0.0.8 | '1' or '2', 1 equals ONE data point per hour, 2 equals SIX data points per hour. +| labels | boolean | false | v0.0.8 | Set to `true` to display min/max labels. ### Example usage @@ -129,7 +130,6 @@ The card works with entities from within the **sensor** domain and displays the - type: "custom:mini-graph-card" entity: sensor.sensor_pressure name: Pressure - accuracy: 8 line_width: 8 ``` @@ -146,7 +146,7 @@ $ git clone https://github.com/kalkih/mini-graph-card.git ```yaml resources: - url: /local/mini-graph-card/mini-graph-card.js - type: module + type: js ``` ### Generate the bundle diff --git a/changelog.md b/changelog.md index 95feb6f..9327a5e 100755 --- a/changelog.md +++ b/changelog.md @@ -1,8 +1,16 @@ +## v0.0.8 +- Major rework of the graph calculation, now taking moving average and timestamps into account +- Added bundle version +- Added `detail` option, to specify the detail level of the graph +- Added `labels` option to display min/max labels +- Removed `accuracy` option in favor for `detail` +- Changed the reported size of the card + ## v0.0.7 - Improved responsive design - Fixed overflow issue when stacking several cards in horizontal-stack #11 - Fixed default font-size when not specified in config - + ## v0.0.6 - Improved handling of unknown/unavailable history entries #8 - Fixed issue where `` error would appear in some scenarios diff --git a/tracker.json b/tracker.json index 7d4f2f8..15dcf28 100755 --- a/tracker.json +++ b/tracker.json @@ -1,14 +1,7 @@ { - "mini-graph-card": { - "updated_at": "2018-11-10", - "version": "0.0.7", - "remote_location": "https://raw.githubusercontent.com/kalkih/mini-graph-card/master/mini-graph-card.js", - "visit_repo": "https://github.com/kalkih/mini-graph-card", - "changelog": "https://github.com/kalkih/mini-graph-card/releases/latest" - }, "mini-graph-card-bundle": { - "updated_at": "2018-11-10", - "version": "0.0.7", + "updated_at": "2018-11-19", + "version": "0.0.8", "remote_location": "https://github.com/kalkih/mini-graph-card/releases/download/v0.0.8/mini-graph-card-bundle.js", "visit_repo": "https://github.com/kalkih/mini-graph-card", "changelog": "https://github.com/kalkih/mini-graph-card/releases/latest"