From a63117b68e780deeea86706b5e6dad53c4ec952b Mon Sep 17 00:00:00 2001 From: slipx06 Date: Thu, 17 Aug 2023 17:55:58 +0200 Subject: [PATCH] refactor: fix types --- src/index.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/index.ts b/src/index.ts index 891d407d..5327772c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -918,44 +918,44 @@ export class SunsynkPowerFlowCard extends LitElement { : svg`${parseFloat(stateObj32.state).toFixed(0)} W`} ${config.entities?.aux_load1 ? svg` this.handlePopup(e, config.entities.aux_load1)}> - ${!isNaN(parseFloat(stateObj48.state)) ? parseFloat(stateObj48.state).toFixed(0) : '0'} W + ${!isNaN(parseFloat(stateObj48.state)) ? parseFloat(stateObj48.state).toFixed(0) : '0'} W ` - : svg`${!isNaN(parseFloat(stateObj48.state)) ? parseFloat(stateObj48.state).toFixed(0) : '0'} W`} + : svg`${!isNaN(parseFloat(stateObj48.state)) ? parseFloat(stateObj48.state).toFixed(0) : '0'} W`} ${config.entities?.aux_load2 ? svg` this.handlePopup(e, config.entities.aux_load1)}> - ${!isNaN(parseFloat(stateObj49.state)) ? parseFloat(stateObj49.state).toFixed(0) : '0'} W + ${!isNaN(parseFloat(stateObj49.state)) ? parseFloat(stateObj49.state).toFixed(0) : '0'} W ` - : svg`${!isNaN(parseFloat(stateObj49.state)) ? parseFloat(stateObj49.state).toFixed(0) : '0'} W`} + : svg`${!isNaN(parseFloat(stateObj49.state)) ? parseFloat(stateObj49.state).toFixed(0) : '0'} W`} ${config.entities?.non_essential_load1 ? svg` this.handlePopup(e, config.entities.non_essential_load1)}> - ${!isNaN(parseFloat(stateObj40.state)) ? parseFloat(stateObj40.state).toFixed(0) : '0'} W + ${!isNaN(parseFloat(stateObj40.state)) ? parseFloat(stateObj40.state).toFixed(0) : '0'} W ` - : svg`${!isNaN(parseFloat(stateObj40.state)) ? parseFloat(stateObj40.state).toFixed(0) : '0'} W`} + : svg`${!isNaN(parseFloat(stateObj40.state)) ? parseFloat(stateObj40.state).toFixed(0) : '0'} W`} ${config.entities?.non_essential_load1 ? svg` this.handlePopup(e, config.entities.non_essential_load1)}> - ${!isNaN(parseFloat(stateObj40.state)) ? parseFloat(stateObj40.state).toFixed(0) : '0'} W + ${!isNaN(parseFloat(stateObj40.state)) ? parseFloat(stateObj40.state).toFixed(0) : '0'} W ` - : svg`${!isNaN(parseFloat(stateObj40.state)) ? parseFloat(stateObj40.state).toFixed(0) : '0'} W`} + : svg`${!isNaN(parseFloat(stateObj40.state)) ? parseFloat(stateObj40.state).toFixed(0) : '0'} W`} ${config.entities?.non_essential_load2 ? svg` this.handlePopup(e, config.entities.non_essential_load2)}> - ${!isNaN(parseFloat(stateObj41.state)) ? parseFloat(stateObj41.state).toFixed(0) : '0'} W + ${!isNaN(parseFloat(stateObj41.state)) ? parseFloat(stateObj41.state).toFixed(0) : '0'} W ` - : svg`${!isNaN(parseFloat(stateObj41.state)) ? parseFloat(stateObj41.state).toFixed(0) : '0'} W`} + : svg`${!isNaN(parseFloat(stateObj41.state)) ? parseFloat(stateObj41.state).toFixed(0) : '0'} W`} ${config.entities?.essential_load1 ? svg` this.handlePopup(e, config.entities.essential_load1)}> - ${!isNaN(parseFloat(stateObj42.state)) ? parseFloat(stateObj42.state).toFixed(0) : '0'} W + ${!isNaN(parseFloat(stateObj42.state)) ? parseFloat(stateObj42.state).toFixed(0) : '0'} W ` - : svg`${!isNaN(parseFloat(stateObj42.state)) ? parseFloat(stateObj42.state).toFixed(0) : '0'} W`} + : svg`${!isNaN(parseFloat(stateObj42.state)) ? parseFloat(stateObj42.state).toFixed(0) : '0'} W`} ${config.entities?.essential_load1 ? svg` this.handlePopup(e, config.entities.essential_load1)}> - ${!isNaN(parseFloat(stateObj42.state)) ? parseFloat(stateObj42.state).toFixed(0) : '0'} W + ${!isNaN(parseFloat(stateObj42.state)) ? parseFloat(stateObj42.state).toFixed(0) : '0'} W ` - : svg`${!isNaN(parseFloat(stateObj42.state)) ? parseFloat(stateObj42.state).toFixed(0) : '0'} W`} + : svg`${!isNaN(parseFloat(stateObj42.state)) ? parseFloat(stateObj42.state).toFixed(0) : '0'} W`} ${config.entities?.essential_load2 ? svg` this.handlePopup(e, config.entities.essential_load2)}> - ${!isNaN(parseFloat(stateObj45.state)) ? parseFloat(stateObj45.state).toFixed(0) : '0'} W + ${!isNaN(parseFloat(stateObj45.state)) ? parseFloat(stateObj45.state).toFixed(0) : '0'} W ` - : svg`${!isNaN(parseFloat(stateObj45.state)) ? parseFloat(stateObj45.state).toFixed(0) : '0'} W`} + : svg`${!isNaN(parseFloat(stateObj45.state)) ? parseFloat(stateObj45.state).toFixed(0) : '0'} W`} this.handlePopup(e, config.entities.inverter_voltage_154)}> ${inverter_voltage} V