updated pack polling

This commit is contained in:
Patrick762 committed 2024-05-31 12:55:46 +02:00
1 parent 6e433e3551
commit b548528085
3 files changed
+44 -22

No files matched your search

@@ -42,6 +42,11 @@ class BluettiDevice:
def writable_ranges(self) -> List[range]:
"""The address ranges that are writable"""
return []
@property
def pack_num_field(self) -> List[ReadHoldingRegisters]:
"""The address 'range' of the pack num"""
return []
def has_field(self, field: str):
return any(f.name == field for f in self.struct.fields)
@@ -56,3 +56,9 @@ class ProtocolV1Device(BluettiDevice):
@property
def writable_ranges(self) -> List[range]:
return [range(3006, 3009)]
@property
def pack_num_field(self) -> List[ReadHoldingRegisters]:
return [
ReadHoldingRegisters(3006, 1),
]