HA Modbus Integration
Use this when implementing or refactoring HA custom components that communicate with Modbus devices.
Quick start
- •Pick connection mode (tcp, rtuovertcp, serial); set timeout and message spacing.
- •Always pass the correct unit id (device_id/slave) on every read/write.
- •Batch contiguous reads, lock IO, and tier polling; cache last good data for availability.
- •Encode multi-register writes (float32/uint32) and avoid immediate post-write refresh.
- •Use translation_key + entity.sensor names and stable unique/device ids.