Skip to content

Commit

Permalink
Add a special case for the HUSBZB-1
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Sep 1, 2023
1 parent 721170a commit cd89972
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bellows/ezsp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,16 @@ async def write_config(self, config: dict) -> None:
],
}

# If we are not joined to a network, old FWs crash if we grow the buffer
if self._ezsp_version < 7:
(state,) = await self.networkState()

if state != self.types.EmberNetworkStatus.JOINED_NETWORK:
LOGGER.debug("Skipping growing packet buffer, not on a network")
del ezsp_config[
self.types.EzspConfigId.CONFIG_PACKET_BUFFER_COUNT.name
]

# First, set the values
for cfg in ezsp_values.values():
# XXX: A read failure does not mean the value is not writeable!
Expand Down

0 comments on commit cd89972

Please sign in to comment.