Skip to content

Commit

Permalink
fix: hide non essential load extra data when show non essential is false
Browse files Browse the repository at this point in the history
  • Loading branch information
slipx06 committed Jan 13, 2025
1 parent 36e3d37 commit 94acd61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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": "6.4.2",
"version": "6.4.3",
"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
6 changes: 3 additions & 3 deletions src/cards/full-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ export const fullCard = (config: sunsynkPowerFlowCardConfig, inverterImg: string
</a>
<a href="#" @click=${(e) => Utils.handlePopup(e, config.entities.non_essential_load3_extra)}>
<text id="non_ess_load2_value_extra" x="300" y="305"
display="${config.entities?.non_essential_load3_extra && data.nonessentialLoads === 3 && data.stateNonEssentialLoad3Extra.isValid() && config.show_grid && config.wide ? '' : 'none'}"
display="${config.entities?.non_essential_load3_extra && data.nonessentialLoads === 3 && data.stateNonEssentialLoad3Extra.isValid() && config.show_grid && config.wide && data.showNonessential ? '' : 'none'}"
class="st3 right-align" fill="${data.dynamicColourNonEssentialLoad3}">
${data.stateNonEssentialLoad3Extra.toNum(1)}
${data.stateNonEssentialLoad3Extra?.getUOM()}
Expand Down Expand Up @@ -1796,15 +1796,15 @@ export const fullCard = (config: sunsynkPowerFlowCardConfig, inverterImg: string
</a>
<a href="#" @click=${(e) => Utils.handlePopup(e, config.entities.non_essential_load1_extra)}>
<text id="non_ess_load1_value_extra" x="335" y="305"
display="${config.entities?.non_essential_load1_extra && [1, 2, 3].includes(data.nonessentialLoads) && data.stateNonEssentialLoad1Extra.isValid() && config.show_grid ? '' : 'none'}"
display="${config.entities?.non_essential_load1_extra && [1, 2, 3].includes(data.nonessentialLoads) && data.stateNonEssentialLoad1Extra.isValid() && config.show_grid && data.showNonessential ? '' : 'none'}"
class="st3 right-align" fill="${data.dynamicColourNonEssentialLoad1}">
${data.stateNonEssentialLoad1Extra.toNum(1)}
${data.stateNonEssentialLoad1Extra?.getUOM()}
</text>
</a>
<a href="#" @click=${(e) => Utils.handlePopup(e, config.entities.non_essential_load2_extra)}>
<text id="non_ess_load2_value_extra" x="342" y="305"
display="${config.entities?.non_essential_load2_extra && [2, 3].includes(data.nonessentialLoads) && data.stateNonEssentialLoad2Extra.isValid() && config.show_grid ? '' : 'none'}"
display="${config.entities?.non_essential_load2_extra && [2, 3].includes(data.nonessentialLoads) && data.stateNonEssentialLoad2Extra.isValid() && config.show_grid && data.showNonessential ? '' : 'none'}"
class="st3 left-align" fill="${data.dynamicColourNonEssentialLoad2}">
${data.stateNonEssentialLoad2Extra.toNum(1)}
${data.stateNonEssentialLoad2Extra?.getUOM()}
Expand Down

0 comments on commit 94acd61

Please sign in to comment.