Skip to content

Commit

Permalink
Merge pull request #33 from gurbyz/fix-config-changes
Browse files Browse the repository at this point in the history
Release 0.0.16
  • Loading branch information
gurbyz authored Feb 13, 2020
2 parents 111eb4a + 3ebcf17 commit d450c11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
====
## 0.0.16
### Fixes
* Prepare for future card config changes.

## 0.0.15
### Improvements
* Removal of support for Customer Updater.
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": "power-wheel-card",
"version": "0.0.15",
"version": "0.0.16",
"description": "An intuitive way to represent the power and energy that your home is consuming or producing.",
"directories": {
"test": "test"
Expand Down
4 changes: 3 additions & 1 deletion power-wheel-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
*/

const __VERSION = "0.0.15";
const __VERSION = "0.0.16";

const LitElement = Object.getPrototypeOf(customElements.get("hui-view"));
const html = LitElement.prototype.html;
Expand Down Expand Up @@ -540,6 +540,7 @@ class PowerWheelCard extends LitElement {
}

setConfig(config) {
config = Object.assign({}, config);
if (!config.solar_power_entity) {
throw new Error('You need to define a solar_power_entity');
}
Expand Down Expand Up @@ -618,6 +619,7 @@ class PowerWheelCard extends LitElement {
this.autoToggleView = config.initial_auto_toggle_view;
this.sensors = this._getSensors(config);
this.view = config.initial_view;
// todo: remove this second assign
this.config = Object.assign({}, config);
}

Expand Down

0 comments on commit d450c11

Please sign in to comment.