mdeweerd / zha-toolkit

🧰 Zigbee Home Assistant Toolkit - service for "rare" Zigbee operations using ZHA on Home Assistant
GNU General Public License v3.0
190 stars 26 forks source link

Fix off by one error calculating the maximum next index in binds_get #201

Closed nomis closed 1 year ago

nomis commented 1 year ago

For a device with 16 entries in the binding table and 3 entries per request, the start_indexes should be 0, 3, 6, 9, 12, 15.

The last next_idx will be 15, which is less than the total 16.

mdeweerd commented 1 year ago

Thank you for this fix - this seems good to me, merging it.