Skip to content

Commit

Permalink
fix: missing dynamic line width closes #266
Browse files Browse the repository at this point in the history
  • Loading branch information
slipx06 committed Feb 25, 2024
1 parent b48782f commit 0fe2bca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/sunsynk-power-flow-card.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sunsynk-power-flow-card",
"version": "4.16.1",
"version": "4.16.2",
"description": "A customizable Home Assistant card to emulate the Sunsynk System flow that's displayed on the Inverter screen.",
"main": "sunsynk-power-flow-card.js",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ export class SunsynkPowerFlowCard extends LitElement {
let loadLineWidth = !config.load.max_power ? 1 : this.dynamicLineWidth(Math.abs(essential), (config.load.max_power || Math.abs(essential)), max_linewidth);
let auxLineWidth = !config.load.max_power ? 1 : this.dynamicLineWidth(Math.abs(aux_power), (config.load.max_power || Math.abs(aux_power)), max_linewidth);
let gridLineWidth = !config.grid.max_power ? 1 : this.dynamicLineWidth(Math.abs(total_grid_power), (config.grid.max_power || Math.abs(total_grid_power)), max_linewidth);
let grid169LineWidth = !config.grid.max_power ? 1 : this.dynamicLineWidth(Math.abs(grid_power_round), (config.grid.max_power || Math.abs(grid_power_round)), max_linewidth);
let nonessLineWidth = !config.grid.max_power ? 1 : this.dynamicLineWidth(Math.abs(nonessential), (config.grid.max_power || Math.abs(nonessential)), max_linewidth);
let solarLineWidth = !config.solar.max_power ? 1 : this.dynamicLineWidth(totalsolar, (config.solar.max_power || totalsolar), max_linewidth);

Expand Down Expand Up @@ -1645,8 +1646,8 @@ export class SunsynkPowerFlowCard extends LitElement {
<path id="aux-line2" d="M 200 162 L 200 57 Q 200 47 210 47 L 237 47" fill="none"
class="${!show_aux ? 'st12' : ''}" stroke="${aux_colour}" stroke-width="1"
stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 215.15 187 L 224.58 187 Q 234 187 234 187.5 L 234 188" fill="none"
stroke="${grid_colour}" stroke-width="1" stroke-miterlimit="10"
<path d="M215 187 234 187" fill="none"
stroke="${grid_colour}" stroke-width="${grid169LineWidth}" stroke-miterlimit="10"
pointer-events="stroke" display="${!config.show_grid ? 'none' : ''}"/>
<path d="${config.inverter.three_phase ? 'M 180.15 223 L 180.15 235' : 'M 180.15 212 L 180.15 235'}"
fill="none" stroke="${inverter_colour}" stroke-width="1" stroke-miterlimit="10"
Expand Down

0 comments on commit 0fe2bca

Please sign in to comment.