From 9fe2127962c85bf0eae86140be5da5dc82f0c9bf Mon Sep 17 00:00:00 2001 From: tmjo <54450177+tmjo@users.noreply.github.com> Date: Sun, 14 Mar 2021 17:36:18 +0100 Subject: [PATCH] Move offline current limit to Limits --- src/charger-card.js | 14 +++++++------- src/const.js | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/charger-card.js b/src/charger-card.js index d827960..91c6c95 100644 --- a/src/charger-card.js +++ b/src/charger-card.js @@ -516,7 +516,7 @@ class ChargerCard extends LitElement { return html``; } - const { cableLocked, cableLockedPermanently, enableIdleCurrent, isEnabled, smartCharging, updateAvailable, costPerKwh, offlineCircuitCurrent} = this.getEntities(); + const { cableLocked, cableLockedPermanently, enableIdleCurrent, isEnabled, smartCharging, updateAvailable, costPerKwh} = this.getEntities(); let updateAvailableState = this.getEntityState(updateAvailable) || "off"; return html` @@ -532,7 +532,6 @@ class ChargerCard extends LitElement {
${this.renderCollapsibleItems(isEnabled, "Enabled")} ${this.renderCollapsibleItems(enableIdleCurrent, "Idle Current")} - ${this.renderCollapsibleItems(offlineCircuitCurrent, "Offline limit")} ${this.renderCollapsibleItems(cableLockedPermanently, "Permanently Locked")} ${this.renderCollapsibleItems(cableLocked, "Locked")} ${this.renderCollapsibleItems(smartCharging, "Smart Charging")} @@ -584,7 +583,7 @@ class ChargerCard extends LitElement { return html``; } - const { maxChargerCurrent, maxCircuitCurrent, dynamicChargerCurrent, dynamicCircuitCurrent} = this.getEntities(); + const { maxChargerCurrent, maxCircuitCurrent, dynamicChargerCurrent, dynamicCircuitCurrent, offlineCircuitCurrent} = this.getEntities(); return html`
@@ -597,10 +596,11 @@ class ChargerCard extends LitElement {
- ${this.renderCollapsibleDropDownItems(maxChargerCurrent, cconst.SERVICES.chargerMaxCurrent, "Max Charger", undefined, "Max Charger Current", true)} - ${this.renderCollapsibleDropDownItems(dynamicChargerCurrent, cconst.SERVICES.chargerDynCurrent, "Dyn Charger", undefined, "Dyn Charger Current", true)} - ${this.renderCollapsibleDropDownItems(maxCircuitCurrent, cconst.SERVICES.circuitMaxCurrent, "Max Circuit", undefined, "Max Circuit Current", true)} - ${this.renderCollapsibleDropDownItems(dynamicCircuitCurrent, cconst.SERVICES.circuitDynCurrent, "Dyn Circuit", undefined, "Dyn Charger Current", true)} + ${this.renderCollapsibleDropDownItems(maxChargerCurrent, cconst.SERVICES.chargerMaxCurrent, "Max Charger", undefined, "Max Charger Limit", true)} + ${this.renderCollapsibleDropDownItems(dynamicChargerCurrent, cconst.SERVICES.chargerDynCurrent, "Dyn Charger", undefined, "Dyn Charger Limit", true)} + ${this.renderCollapsibleDropDownItems(maxCircuitCurrent, cconst.SERVICES.circuitMaxCurrent, "Max Circuit", undefined, "Max Circuit Limit", true)} + ${this.renderCollapsibleDropDownItems(dynamicCircuitCurrent, cconst.SERVICES.circuitDynCurrent, "Dyn Circuit", undefined, "Dyn Charger Limit", true)} + ${this.renderCollapsibleDropDownItems(offlineCircuitCurrent, cconst.SERVICES.circuitOfflineCurrent, "Off Lim", undefined, "Offline Limit", true)}
diff --git a/src/const.js b/src/const.js index 52fb877..6b86ee8 100644 --- a/src/const.js +++ b/src/const.js @@ -64,6 +64,7 @@ export const SERVICES = { chargerDynCurrent: 'set_charger_dynamic_limit', circuitMaxCurrent: 'set_charger_circuit_max_limit', circuitDynCurrent: 'set_charger_circuit_dynamic_limit', + circuitOfflineCurrent: 'set_charger_circuit_offline_limit', }; import imageGeneric from './img/charger_generic_223x302.png';