Skip to content

Commit

Permalink
Update sensor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyMathiesen authored Oct 15, 2024
1 parent c4d059d commit 201fd1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/solax_modbus/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def splitInBlocks( descriptions, block_size, auto_block_ignore_readerror ):
curblockregs = []
for reg in descriptions:
descr = descriptions[reg]
if (descr.newblock or (not type(descr) is dict)) and ((reg - start) > block_size):
if (not type(descr) is dict) and (descr.newblock or ((reg - start) > block_size)):
if ((end - start) > 0):
_LOGGER.debug(f"Starting new block at 0x{reg:x} ")
if ( (auto_block_ignore_readerror == True) or (auto_block_ignore_readerror == False) ) and not descr.newblock: # automatically created block
Expand Down

0 comments on commit 201fd1f

Please sign in to comment.