diff --git a/tests/test_send_receive.py b/tests/test_send_receive.py index 9490a82..a839ec1 100644 --- a/tests/test_send_receive.py +++ b/tests/test_send_receive.py @@ -97,21 +97,6 @@ async def test_send_packet_nwk_no_ack(app, tx_packet): # noqa: F811 assert req["radius"] == 0 -async def test_send_packet_nwk_aps_encryption(app, tx_packet): # noqa: F811 - tx_packet.tx_options |= zigpy_t.TransmitOptions.APS_Encryption - - with patch_data_request(app) as mock_req: - await app.send_packet(tx_packet) - - assert len(mock_req.mock_calls) == 1 - req = mock_req.mock_calls[0].kwargs - - # The network key security option is replaced by APS encryption - assert req["tx_options"] == ( - t.DeconzTransmitOptions.SECURITY_ENABLED | t.DeconzTransmitOptions.USE_APS_ACKS - ) - - async def test_send_packet_source_route(app, tx_packet): # noqa: F811 tx_packet.source_route = [0xAABB, 0xCCDD] diff --git a/zigpy_deconz/zigbee/application.py b/zigpy_deconz/zigbee/application.py index 686b1ab..55717f7 100644 --- a/zigpy_deconz/zigbee/application.py +++ b/zigpy_deconz/zigbee/application.py @@ -604,12 +604,7 @@ async def send_packet(self, packet): # The APS data request has no alias parameters raise NotImplementedError("The firmware cannot send with an alias") - if zigpy.types.TransmitOptions.APS_Encryption in packet.tx_options: - # APS encryption is performed with the link key, not the network key, so - # the "use NWK key" option must not be set - tx_options = t.DeconzTransmitOptions.SECURITY_ENABLED - else: - tx_options = t.DeconzTransmitOptions.USE_NWK_KEY_SECURITY + tx_options = t.DeconzTransmitOptions.USE_NWK_KEY_SECURITY if ( zigpy.types.TransmitOptions.ACK in packet.tx_options