v1.8.0 – Stop at Daily Runtime Target
Added
- Stop when daily runtime is reached (
stop_after_runtime) – New per-device option that turns a device off once its accumulated runtime today reaches the configured duration (e.g. pool pump: run 400 minutes, then stop), even at full PV surplus (#2). Restarts stay blocked for the rest of the day — including cheap-grid grants and deadline force-starts; the counter resets at midnight and survives HA restarts.min_on_timeis respected, running programs of startup-detection appliances are never killed mid-cycle, and the manual override switch always wins. Off by default — existing setups keep their behaviour. The runtime field now accepts up to 1440 min and device sensors exposestop_after_runtime/runtime_target_reachedattributes. - Config-flow sensor validation – Sensors picked during setup/options are validated for unit and numeric state (power
W/kW, energyWh/kWh, SOC percentage incl. 0–1-fraction detection) instead of silently misbehaving at runtime. - Troubleshooting section in README – Grid sign convention, battery mode stuck on charging, devices stuck in
waiting, flapping, and more.
Fixed
- Cheap-grid night ping-pong – The
cheap_gridscheduling reason was overwritten withsurplus_availableon turn-on, so the cheap-grid hold no longer applied and devices cycled on/off (~every 20 min) all night onexcess_deficit. Found by the new full-day simulation suite. - Oscillation on unavailable price sensor – Cheap-grid devices are only shed when the price is known expensive; an unavailable sensor holds the current state.
- Shedding power basis – Priority shedding accounts freed power by measured draw (fallback nominal), consistent with the measured deficit and SD preemption.
- Setup retry & config-flow hardening – Transient setup timeouts raise
ConfigEntryNotReady(HA retries), duplicate/empty device names are rejected, price sensor no longer claims a monetary device class, battery SOCNonehandled explicitly.
Changed
- Translation parity –
strings.json,en.json,de.jsonfully in sync. - Test coverage – DeviceManager unit tests, packaging smoke tests, and a tick-level full-day simulation suite for all device types (114 tests).
Full Changelog: v1.7.7...v1.8.0