diff --git a/bluetooth_mesh/application.py b/bluetooth_mesh/application.py index 467b5b1..12086a8 100644 --- a/bluetooth_mesh/application.py +++ b/bluetooth_mesh/application.py @@ -803,20 +803,22 @@ async def join(self): waiting for PB-ADV based provisioner. """ self.logger.info("Join %s", self.uuid) - - self._join_complete = asyncio.Future() + self._join_complete = JoinComplete( + self._join_callback, asyncio.Future() + ) await self.network_interface.join("/", self.uuid) - return await self._join_complete + return await self._join_complete.future async def create_network(self): """ Create a new mesh network. """ self.logger.info("Create %s", self.uuid) - - self._join_complete = asyncio.Future() + self._join_complete = JoinComplete( + self._join_callback, asyncio.Future() + ) await self.network_interface.create_network("/", self.uuid) - return await self._join_complete + return await self._join_complete.future async def cancel(self): """ diff --git a/bluetooth_mesh/models/models.py b/bluetooth_mesh/models/models.py index 65809bc..daf4417 100644 --- a/bluetooth_mesh/models/models.py +++ b/bluetooth_mesh/models/models.py @@ -908,7 +908,7 @@ async def set_publication( ttl=ttl, app_key_index=app_key_index, credential_flag=PublishFriendshipCredentialsFlag.MASTER_SECURITY, - RFU=0, + rfu=0, publish_period=dict( step_resolution=publish_step_resolution, number_of_steps=publish_number_of_steps, @@ -929,7 +929,7 @@ async def set_publication( ttl=ttl, app_key_index=app_key_index, credential_flag=PublishFriendshipCredentialsFlag.MASTER_SECURITY, - RFU=0, + rfu=0, publish_period=dict( step_resolution=publish_step_resolution, number_of_steps=publish_number_of_steps,