improvement: Automatically build polling commands basing on the fields

This commit is contained in:
Artem Chepurnyi committed 2024-06-29 16:45:59 +03:00
1 parent 0e5c1a0b44
commit a1e9c180b3
10 files changed
+69 -113

No files matched your search

@@ -25,13 +25,7 @@ class EB3A(ProtocolV1Device):
@property
def polling_commands(self) -> List[ReadHoldingRegisters]:
return super().polling_commands + [
ReadHoldingRegisters(77, 1),
ReadHoldingRegisters(86, 1),
ReadHoldingRegisters(3034, 1),
ReadHoldingRegisters(3060, 1),
ReadHoldingRegisters(3063, 5),
]
return self.struct.get_read_holding_registers()
@property
def writable_ranges(self) -> List[range]: