Skip to content

Commit

Permalink
Move offline current limit to Limits
Browse files Browse the repository at this point in the history
  • Loading branch information
tmjo committed Mar 14, 2021
1 parent d20fe84 commit 9fe2127
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/charger-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -532,7 +532,6 @@ class ChargerCard extends LitElement {
<div class="content-inner">
${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")}
Expand Down Expand Up @@ -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`
<div class="wrap-collabsible-lim">
Expand All @@ -597,10 +596,11 @@ class ChargerCard extends LitElement {
</label>
<div class="collapsible-content-lim">
<div class="content-inner-lim">
${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)}
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 9fe2127

Please sign in to comment.