Start Hour #11
Replies: 2 comments
-
|
it might be better to do this per device and not globally as I did |
Beta Was this translation helpful? Give feedback.
-
|
Nice — shipped in v1.12.0. I took your own advice and made it per-device rather than global: each device now has a Daily reset hour (0-23, default 0 = midnight) in its config dialog. Set your pool pump to 9 and its runtime counter resets at 09:00, so it runs on solar first during the day and only fills any shortfall from cheap grid overnight — exactly the behaviour you described. Different devices can have different reset hours, and the default (midnight) keeps everyone else unchanged. Thanks for the write-up and the per-device suggestion — credited in the release notes. Give it a spin and let me know how it lines up with your P3 cheap window! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I had Claude add this as my pump was using cheap electric vs solar.
When a device like a pool pump uses
price_mode: cheap_grid, AURUM currentlyresets
runtime_today_sat midnight. This means:runtime_today_s = 0→ condition allowsdevice to start → pump runs 5.5 h on cheap grid (00:00–05:30).
runtime_today_salready at target →pump blocked for the rest of the day.
Desired behaviour: Run on solar first during the day. Only use cheap grid
overnight to fill any shortfall. Reset the daily counter at 09:00 so the
cycle aligns with the solar day.
Changes
const.pyAdd after
CONF_BATTERY_PRIORITY:coordinator.py1. In
__init__, replace:with:
2. In
_async_update_data, replace the midnight reset block:with:
config_flow.pyAdd
day_start_houras an integer option (0-23, default 0) to the globaloptions step. Example schema entry:
How It Works
With
day_start_hour: 9and a pool pump configured asprice_mode: cheap_grid,estimated_runtime: 330(5.5 h),condition_entity: sensor.pool_pump_switch_on_time below 5.5:The key is that midnight does NOT trigger a reset. _last_daily_reset stores
the actual 09:00 datetime, so the P3 window (00:00-08:00) falls within the
current cycle and retains its accumulated solar hours.
Backwards Compatibility
day_start_hourdefaults to 0, so all existing installations continue toreset at midnight with zero config changes required.
Beta Was this translation helpful? Give feedback.
All reactions