Fix co2 grid charge (#22440)
This commit is contained in:
parent
4b5d0762e3
commit
0bbd39333c
1 changed files with 7 additions and 1 deletions
|
|
@ -247,7 +247,7 @@
|
|||
:current-limit="batteryGridChargeLimit"
|
||||
:smart-cost-type="smartCostType"
|
||||
:currency="currency"
|
||||
:tariff="forecast?.grid"
|
||||
:tariff="gridChargeTariff"
|
||||
:possible="gridChargePossible"
|
||||
/>
|
||||
</GenericModal>
|
||||
|
|
@ -315,6 +315,12 @@ export default defineComponent({
|
|||
gridChargePossible() {
|
||||
return this.controllable && this.isModalVisible && this.smartCostAvailable;
|
||||
},
|
||||
gridChargeTariff() {
|
||||
if (this.smartCostType === SMART_COST_TYPE.CO2) {
|
||||
return this.forecast?.co2;
|
||||
}
|
||||
return this.forecast?.grid;
|
||||
},
|
||||
bufferOptions() {
|
||||
const options = [];
|
||||
for (let i = 100; i >= 5; i -= 5) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue