Skip to content

Commit

Permalink
Fix for filtering (exclude) #74
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwroc committed Jun 8, 2020
1 parent acdbd68 commit 10474f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "battery-state-card",
"version": "1.3.6",
"version": "1.3.7",
"description": "Battery State card for Home Assistant",
"main": "dist/battery-state-card.js",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion src/battery-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ export class BatteryProvider {
battery.is_hidden = is_hidden;
});

toBeRemoved.forEach(i => this.batteries.splice(i, 1));
// we need to reverse otherwise the indexes will be messed up after removing
toBeRemoved.reverse().forEach(i => this.batteries.splice(i, 1));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HomeAssistant } from "./ha-types";

console.info(
"%c BATTERY-STATE-CARD %c 1.3.6",
"%c BATTERY-STATE-CARD %c 1.3.7",
"color: white; background: forestgreen; font-weight: 700;",
"color: forestgreen; background: white; font-weight: 700;",
);
Expand Down

0 comments on commit 10474f9

Please sign in to comment.