Title: history/period API calls use wrong date (2 days back instead of 1) with days_previous: 1
Predbat version: v8.47.5
Installation type: Home Assistant OS add-on (Standalone Predbat)
Home Assistant Core timezone: Europe/Amsterdam
apps.yaml timezone setting: Europe/Brussels
Description:
Predbat is repeatedly failing to fetch history for all configured sensors
(EcoFlow, P1 meter, Tibber price sensor, etc.) with 404 errors from the
Supervisor history API. On inspection, the requested date in the URL is
consistently 2 days in the past relative to the actual current date,
rather than 1 day (as configured via days_previous: 1).
Example: on 2026-08-08, Predbat requests:
http://supervisor/core/api/history/period/2026-08-06T09:02:04...
Expected: 2026-08-07 (yesterday), not 2026-08-06 (two days ago).
Relevant apps.yaml settings:
timezone: Europe/Brussels
days_previous: 1
days_to_compute: 1
fetch_history: false
set_read_history: false
set_read_history_load: false
• Confirmed all referenced sensors exist and have valid current values
(checked via Developer Tools > States)
• Confirmed disk space is not an issue (17.9GB free of 28.5GB)
• Confirmed Home Assistant Core logs show no Recorder/database errors
around the same timestamps
• Corrected an unrelated regional settings issue (unit system was set to
Fahrenheit/US instead of Celsius/Metric) — restarted Core and Predbat
after this change, but the date offset persisted unchanged
• Confirmed Supervisor addon timezone (Europe/Amsterdam) and apps.yaml
timezone (Europe/Brussels) are both correctly configured for the
Netherlands/Belgium region (UTC+1/+2), so this doesn’t appear to be a
simple timezone mismatch
Question: Is this a known issue with how days_previous is calculated,
possibly related to a timezone/DST offset calculation bug? Happy to
provide the full debug log (predbat_debug.yaml) if useful.
Title: history/period API calls use wrong date (2 days back instead of 1) with days_previous: 1
Predbat version: v8.47.5
Installation type: Home Assistant OS add-on (Standalone Predbat)
Home Assistant Core timezone: Europe/Amsterdam
apps.yaml timezone setting: Europe/Brussels
Description:
Predbat is repeatedly failing to fetch history for all configured sensors
(EcoFlow, P1 meter, Tibber price sensor, etc.) with 404 errors from the
Supervisor history API. On inspection, the requested date in the URL is
consistently 2 days in the past relative to the actual current date,
rather than 1 day (as configured via
days_previous: 1).Example: on 2026-08-08, Predbat requests:
http://supervisor/core/api/history/period/2026-08-06T09:02:04...Expected:
2026-08-07(yesterday), not2026-08-06(two days ago).Relevant apps.yaml settings: