nymea-energy-plugin-nymea/energyplugin
Patrick Schurig 69246618ee fix: test forecast uses UTC hour for solar/price lookup
buildWinterForecast was indexing solarW[] and winterPrices[] by slot
position h instead of actual UTC hour. When a forecast starts at 18:00,
h=8 (02:00 AM) was getting solarW[8]=1200W, giving midnight slots a
false solar bonus in RuleBasedStrategy::slotScore(). The strategy
correctly chose those slots, but countSlotsInCheapestN (price-only)
reported them as outside the 6 cheapest hours → test 1 failed.

Fix: index both arrays by slot.start.toUTC().time().hour() so solar
peaks at noon and prices reflect the real time-of-day. All 11 tests pass.

Also includes the INCLUDEPATH += \$\$PWD fix in energyplugin.pri that
makes relative includes work for test builds consuming the .pri.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 06:53:20 +01:00
..
schedulingstrategies feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
spotmarket initial commit 2026-01-11 11:09:23 +01:00
translations initial commit 2026-01-11 11:09:23 +01:00
types feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
energymanagerconfiguration.cpp initial commit 2026-01-11 11:09:23 +01:00
energymanagerconfiguration.h initial commit 2026-01-11 11:09:23 +01:00
energyplugin.pri fix: test forecast uses UTC hour for solar/price lookup 2026-02-24 06:53:20 +01:00
energyplugin.pro initial commit 2026-01-11 11:09:23 +01:00
energypluginnymea.cpp feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
energypluginnymea.h initial commit 2026-01-11 11:09:23 +01:00
energysettings.cpp initial commit 2026-01-11 11:09:23 +01:00
energysettings.h initial commit 2026-01-11 11:09:23 +01:00
evcharger.cpp initial commit 2026-01-11 11:09:23 +01:00
evcharger.h initial commit 2026-01-11 11:09:23 +01:00
nymeaenergyjsonhandler.cpp feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
nymeaenergyjsonhandler.h feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
plugininfo.h initial commit 2026-01-11 11:09:23 +01:00
rootmeter.cpp initial commit 2026-01-11 11:09:23 +01:00
rootmeter.h initial commit 2026-01-11 11:09:23 +01:00
schedulermanager.cpp feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
schedulermanager.h feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
schedulersettings.cpp feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
schedulersettings.h feat: ManualStrategy — community tier scheduling with full manual control 2026-02-24 06:34:31 +01:00
smartchargingmanager.cpp initial commit 2026-01-11 11:09:23 +01:00
smartchargingmanager.h initial commit 2026-01-11 11:09:23 +01:00