v0.3.4
fix: catch BrokenPipeError after Modbus connection loss (v0.3.4)
After the Modbus adapter loses its TCP connection, pymodbus raises a
BrokenPipeError on the next read/write attempt. In all read*_sync and
_write_register_sync helpers the first try-block only caught TypeError,
so BrokenPipeError propagated uncaught through async_add_executor_job,
causing Home Assistant to log "Task exception was never retrieved" for
every entity on every polling cycle.
Fix: add except (BrokenPipeError, ConnectionResetError) to the first
try-block in each sync helper. On catch, client.close() resets the
broken socket so the next polling cycle's client.connect() can
establish a fresh connection automatically.
Affected files: sensor.py, binary_sensor.py, number.py, select.py,
time.py, switch.py
Version bump: manifest.json 0.3.2 → 0.3.4, sw_version 0.3.3 → 0.3.4