Skip to content

Commit 00fcba1

Browse files
authored
Versie 2025.10.3 (#397)
* Fix ZeroDivisionError * Fixed errors when there are no pricedata at 13:00 * Versie 2025.10.3 / 2025.10.3.rc1
1 parent 3bdeca6 commit 00fcba1

File tree

5 files changed

+26
-8
lines changed

5 files changed

+26
-8
lines changed

dao/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog 刀 DAO
22
# Day Ahead Optimizer
3+
# 2025.10.3
4+
This version is similar with 2025.10.3.rc1 in the testing-channel.<br>
5+
Fixes:
6+
- Fixed errors when there are no pricedata at 13:00
7+
- Fixed ZeroDivisionErrors
8+
9+
Know issue:
10+
- The forecast in the reports still nog good working
311
# 2025.10.2
412
This version is similar with 2025.10.2.rc1 in the testing-channel.<br>
513
Fixes:

dao/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: 刀 Day Ahead Optimizer
3-
version: 2025.10.2
3+
version: 2025.10.3
44
slug: day_ahead_opt
55
description: Home Assistant Community Add-ons for day ahead optimizations
66
url: https://github.com/corneel27/day-ahead

dao/prog/day_ahead.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ def calc_optimum(
228228
# prog_data = prog_data.reset_index()
229229
# make sure indexes pair with number of rows
230230
for row in prog_data.itertuples():
231+
if math.isnan(row.da_ex):
232+
break
231233
dtime = row.tijd
232234
hour = dtime.strftime("%H:%M")
233235
uur.append(hour)
@@ -2490,7 +2492,7 @@ def calc_optimum(
24902492
) * hour_fraction[u]
24912493
if ac_to_dc_netto > 0:
24922494
ac_to_dc_eff = dc_from_ac_netto * 100.0 / ac_to_dc_netto
2493-
elif ac_to_dc_netto < 0:
2495+
elif dc_from_ac_netto < 0:
24942496
ac_to_dc_eff = ac_to_dc_netto * 100.0 / dc_from_ac_netto
24952497
else:
24962498
ac_to_dc_eff = "--"
@@ -2504,7 +2506,7 @@ def calc_optimum(
25042506
) * hour_fraction[u]
25052507
if dc_to_bat_netto > 0:
25062508
dc_to_bat_eff = bat_from_dc_netto * 100.0 / dc_to_bat_netto
2507-
elif dc_to_bat_netto < 0:
2509+
elif bat_from_dc_netto < 0:
25082510
dc_to_bat_eff = dc_to_bat_netto * 100.0 / bat_from_dc_netto
25092511
else:
25102512
dc_to_bat_eff = "--"
@@ -3504,7 +3506,7 @@ def calc_optimum(
35043506
axis[0].set_ylabel("kWh")
35053507
ylim = math.ceil(max_y)
35063508
axis[0].set_ylim([-ylim, ylim])
3507-
axis[0].set_xticks(ind, labels=uur_labels)
3509+
axis[0].set_xticks(ind, labels=uur_labels[:len(ind)])
35083510
if self.interval == "1hour":
35093511
ticker_multi = 2
35103512
ticker_offset = 0
@@ -3612,7 +3614,7 @@ def calc_optimum(
36123614
axis[1].legend(loc="best", bbox_to_anchor=(1.05, 1.00))
36133615
axis[1].set_ylabel("kWh")
36143616
axis[1].set_ylim([-ylim, ylim])
3615-
axis[1].set_xticks(ind, labels=uur_labels)
3617+
axis[1].set_xticks(ind, labels=uur_labels[:len(ind)])
36163618
axis[1].xaxis.set_major_locator(
36173619
ticker.MultipleLocator(ticker_multi, offset=ticker_offset)
36183620
)
@@ -3686,7 +3688,7 @@ def calc_optimum(
36863688
# axis[gr_no].legend(loc='best', bbox_to_anchor=(1.30, 1.00))
36873689
axis[gr_no].set_ylabel("kWh")
36883690
axis[gr_no].set_ylim([-ylim, ylim])
3689-
axis[gr_no].set_xticks(ind, labels=uur_labels)
3691+
axis[gr_no].set_xticks(ind, labels=uur_labels[:len(ind)])
36903692
axis[gr_no].xaxis.set_major_locator(
36913693
ticker.MultipleLocator(ticker_multi, offset=ticker_offset)
36923694
)
@@ -3726,7 +3728,7 @@ def calc_optimum(
37263728
ln1 = axis[gr_no].plot(
37273729
ind, soc_t, label="SoC", linestyle=line_styles[0], color="olive"
37283730
)
3729-
axis[gr_no].set_xticks(ind, labels=uur_labels)
3731+
axis[gr_no].set_xticks(ind, labels=uur_labels[:len(ind)])
37303732
axis[gr_no].set_ylabel("% SoC")
37313733
axis[gr_no].set_xlabel("uren van de dag")
37323734
axis[gr_no].xaxis.set_major_locator(

release-testing/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog 刀 DAO
22
# Day Ahead Optimizer
3+
# 2025.10.3.rc1
4+
This version is similar with 2025.10.3 in the stable-channel.<br>
5+
Fixes:
6+
- Fixed errors when there are no pricedata at 13:00
7+
- Fixed ZeroDivisionErrors
8+
9+
Know issue:
10+
- The forecast in the reports still nog good working
311
# 2025.10.2.rc1
412
This version is similar with 2025.10.2 in the stable-channel.<br>
513
Fixes:

release-testing/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: 刀 Day Ahead Optimizer (TESTING)
3-
version: 2025.10.2.rc1
3+
version: 2025.10.3.rc1
44
stage: experimental
55
slug: day_ahead_opt-testing
66
description: Beta version of DAO. Use only for testing!

0 commit comments

Comments
 (0)