SMA-10 round 2: a failed release sends 0 W once, retries at heartbeat pace
When release() fails (False, raises or hangs past RELEASE_BUDGET_S) the unit gets one bounded write(0) through the new Driver.release_fallback() hook (default write(0)), then nothing more, so the inverter's own fallback timer is not reset. The release is retried once per heartbeat, not on every idle write. One error line and one action-log event per failure streak, one line on recovery. Dutch default "terug naar de eigen sturing". DECISIONS says what a unit is left at. test_messages.py: the RELEASE_BUDGET_S data entry is gone again (the line that needed it is gone). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
a1be9c48b3
commit
d26cc573fe
@@ -160,6 +160,14 @@ class Driver:
|
||||
never a release: that is `write(0)`."""
|
||||
return await self.write(0.0)
|
||||
|
||||
async def release_fallback(self) -> bool:
|
||||
"""SMA-10 round 2. What to send, ONCE, when `release()` has failed
|
||||
(False, raised, or hung past the bound), so the unit does not carry its
|
||||
last command while nothing else steers it. Default: `write(0)`. It is
|
||||
not repeated: a repeat would keep resetting the inverter's own fallback
|
||||
timer. A driver for which 0 W is not always a safe hold overrides this."""
|
||||
return await self.write(0.0)
|
||||
|
||||
async def probe(self) -> Probe:
|
||||
"""A read-only look, usable without a Controller (panel, wizard)."""
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user