diff --git a/package.json b/package.json index 87687a4..3d5284a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "power-flow-card-plus", - "version": "0.1.6", + "version": "0.1.6.2", "description": "A power flow card for Home Assistant", "keywords": [ "home-assistant", diff --git a/src/power-flow-card-plus.ts b/src/power-flow-card-plus.ts index 342dc8a..b909e4f 100644 --- a/src/power-flow-card-plus.ts +++ b/src/power-flow-card-plus.ts @@ -554,7 +554,6 @@ export class PowerFlowCardPlus extends LitElement { } if (solar.state.toHome !== null && solar.state.toHome < 0) { - solar.state.toHome = 0; // What we returned to the grid and what went in to the battery is more // than produced, so we have used grid energy to fill the battery or // returned battery energy to the grid @@ -565,7 +564,8 @@ export class PowerFlowCardPlus extends LitElement { grid.state.toBattery = grid.state.fromGrid; } } - } else if (battery.state.toBattery && battery.state.toBattery > 0) { + solar.state.toHome = 0; + } else if (!solar.has && battery.state.toBattery && battery.state.toBattery > 0) { grid.state.toBattery = battery.state.toBattery; } diff --git a/src/ui-editor/schema/_schema-all.ts b/src/ui-editor/schema/_schema-all.ts index 73fc847..27324dc 100644 --- a/src/ui-editor/schema/_schema-all.ts +++ b/src/ui-editor/schema/_schema-all.ts @@ -23,6 +23,8 @@ export const cardConfigStruct = assign( theme: optional(string()), dashboard_link: optional(string()), dashboard_link_label: optional(string()), + second_dashboard_link: optional(string()), + second_dashboard_link_label: optional(string()), inverted_entities: optional(any()), w_decimals: optional(integer()), kw_decimals: optional(integer()),