3737import bellows .multicast
3838import bellows .types as t
3939from bellows .zigbee import repairs
40- from bellows .zigbee .device import EZSPEndpoint
40+ from bellows .zigbee .device import EZSPEndpoint , EZSPGroupEndpoint
4141import bellows .zigbee .util as util
4242
4343APS_ACK_TIMEOUT = 120
@@ -205,14 +205,14 @@ async def start_network(self):
205205 ezsp .add_callback (self .ezsp_callback_handler )
206206 self .controller_event .set ()
207207
208- custom_features = await self ._ezsp .get_supported_custom_features ()
208+ custom_features = await self ._ezsp .get_supported_firmware_features ()
209209 LOGGER .debug ("Supported custom firmware features: %r" , custom_features )
210210
211211 if FirmwareFeatures .MEMBER_OF_ALL_GROUPS in custom_features :
212212 # If the firmware passes through all incoming group messages, do nothing
213- endpoint_cls = zigpy .endpoint .Endpoint
214- else :
215213 endpoint_cls = EZSPEndpoint
214+ else :
215+ endpoint_cls = EZSPGroupEndpoint
216216
217217 ezsp_device = zigpy .device .Device (
218218 application = self ,
@@ -224,7 +224,7 @@ async def start_network(self):
224224 # The coordinator device does not respond to attribute reads so we have to
225225 # divine the internal NCP state.
226226 for zdo_desc in self ._created_device_endpoints :
227- ep = endpoint_cls (ezsp_device , zdo_desc .endpoint , zdo_desc )
227+ ep = endpoint_cls . from_descriptor (ezsp_device , zdo_desc .endpoint , zdo_desc )
228228 ezsp_device .endpoints [zdo_desc .endpoint ] = ep
229229 ezsp_device .model = ep .model
230230 ezsp_device .manufacturer = ep .manufacturer
0 commit comments