Repository: XKNX/xknx
Pull request #920 (2022-04-16 21:43:13)

Remove relative imports from different packages
<!--
  You are awesome! Thanks for contributing to our project!
  Please, DO NOT DELETE ANY TEXT from this template!.
-->
## Description
<!--
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
-->


Fixes # (issue)

## Type of change
<!--
Please tick the applicable options.
NOTE: Ticking multiple options most likely indicates
that your change is to big and it is suggested to split it into several smaller PRs.
-->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## Checklist:

- [ ] I have performed a self-review of my own code
- [ ] The documentation has been adjusted accordingly
- [ ] The changes generate no new warnings
- [ ] Tests have been added that prove the fix is effective or that the feature works
- [ ] The changes are documented in the changelog
- [ ] The Homeassistant plugin has been adjusted in case of new config options


codecov[bot]: # [Codecov](https://codecov.io/gh/XKNX/xknx/pull/920?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) Report
> Merging [#920](https://codecov.io/gh/XKNX/xknx/pull/920?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) (98b47e8) into [main](https://codecov.io/gh/XKNX/xknx/commit/f58a62019964d6a769ffb053d5329bebdfc77c47?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) (f58a620) will **decrease** coverage by `0.00%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/XKNX/xknx/pull/920/graphs/tree.svg?width=650&height=150&src=pr&token=irWbIygS84&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX)](https://codecov.io/gh/XKNX/xknx/pull/920?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX)

```diff
@@            Coverage Diff             @@
##             main     #920      +/-   ##
==========================================
- Coverage   95.62%   95.62%   -0.01%     
==========================================
  Files         130      130              
  Lines        7810     7809       -1     
==========================================
- Hits         7468     7467       -1     
  Misses        342      342              
```


| [Impacted Files](https://codecov.io/gh/XKNX/xknx/pull/920?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) | Coverage Δ | |
|---|---|---|
| [xknx/exceptions/\_\_init\_\_.py](https://codecov.io/gh/XKNX/xknx/pull/920/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9leGNlcHRpb25zL19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | |
| [xknx/io/knxip\_interface.py](https://codecov.io/gh/XKNX/xknx/pull/920/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9pby9rbnhpcF9pbnRlcmZhY2UucHk=) | `76.47% <100.00%> (-0.16%)` | :arrow_down: |
| [xknx/secure/keyring.py](https://codecov.io/gh/XKNX/xknx/pull/920/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9zZWN1cmUva2V5cmluZy5weQ==) | `99.07% <100.00%> (ø)` | |


Patch:
diff --git a/changelog.md b/changelog.md
index 4e2799e6..b80c9db3 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,13 @@
 # Changelog
 
+## Unreleased changes
+
+### Internal
+
+- Include base class in `DPTBase.parse_transcoder()` lookup
+- Move `levels` instance attribute form `GroupAddress` to `address_format` class variable
+- Remove xknx form every class in the knxip package: CEMIFrame, KNXIPFrame and KNXIPBody (and subclasses)
+
 ## 0.20.3 Threading fixes 2022-04-15
 
 ### Devices
diff --git a/xknx/dpt/dpt.py b/xknx/dpt/dpt.py
index fbe69124..3e211dbb 100644
--- a/xknx/dpt/dpt.py
+++ b/xknx/dpt/dpt.py
@@ -86,6 +86,13 @@ class DPTBase(ABC):
             if not isabstract(subclass):
                 yield subclass
 
+    @classmethod
+    def dpt_class_tree(cls: T) -> Iterator[T]:
+        """Yield class, all subclasses and their subclasses that are not abstract."""
+        if not isabstract(cls):
+            yield cls
+        yield from cls.__recursive_subclasses__()
+
     @classmethod
     def has_distinct_dpt_numbers(cls) -> bool:
         """Return True if dpt numbers are defined (not inherited)."""
@@ -101,7 +108,7 @@ class DPTBase(ABC):
         cls: T, dpt_main: int, dpt_sub: int | None = None
     ) -> T | None:
         """Return Class reference of DPTBase subclass with matching DPT number."""
-        for dpt in cls.__recursive_subclasses__():
+        for dpt in cls.dpt_class_tree():
             if dpt.has_distinct_dpt_numbers():
                 if dpt_main == dpt.dpt_main_number and dpt_sub == dpt.dpt_sub_number:
                     return dpt
@@ -110,7 +117,7 @@ class DPTBase(ABC):
     @classmethod
     def transcoder_by_value_type(cls: T, value_type: str) -> T | None:
         """Return Class reference of DPTBase subclass with matching value_type."""
-        for dpt in cls.__recursive_subclasses__():
+        for dpt in cls.dpt_class_tree():
             if dpt.has_distinct_value_type():
                 if value_type == dpt.value_type:
                     return dpt
diff --git a/xknx/exceptions/__init__.py b/xknx/exceptions/__init__.py
index 42f0106f..ae1e9f70 100644
--- a/xknx/exceptions/__init__.py
+++ b/xknx/exceptions/__init__.py
@@ -8,7 +8,11 @@ from .exception import (
     CouldNotParseTelegram,
     DeviceIllegalValue,
     IncompleteKNXIPFrame,
+    InterfaceWithUserIdNotFound,
+    InvalidSecureConfiguration,
+    InvalidSignature,
     KNXSecureValidationError,
+    SecureException,
     UnsupportedCEMIMessage,
     XKNXException,
 )
@@ -21,7 +25,11 @@ __all__ = [
     "CouldNotParseTelegram",
     "DeviceIllegalValue",
     "IncompleteKNXIPFrame",
+    "InterfaceWithUserIdNotFound",
+    "InvalidSecureConfiguration",
+    "InvalidSignature",
     "KNXSecureValidationError",
+    "SecureException",
     "UnsupportedCEMIMessage",
     "XKNXException",
 ]
diff --git a/xknx/io/gateway_scanner.py b/xknx/io/gateway_scanner.py
index 55b510e4..7a31adcc 100644
--- a/xknx/io/gateway_scanner.py
+++ b/xknx/io/gateway_scanner.py
@@ -246,12 +246,10 @@ class GatewayScanner:
             ip_addr=self.xknx.multicast_group, port=self.xknx.multicast_port
         )
 
-        search_request: KNXIPBody = SearchRequest(
-            self.xknx, discovery_endpoint=discovery_endpoint
-        )
+        search_request: KNXIPBody = SearchRequest(discovery_endpoint=discovery_endpoint)
         if search_request_type == KNXIPServiceType.SEARCH_REQUEST_EXTENDED:
             search_request = SearchRequestExtended(
-                self.xknx, discovery_endpoint=discovery_endpoint
+                discovery_endpoint=discovery_endpoint
             )
         udp_transport.send(KNXIPFrame.init_from_body(search_request))
 
diff --git a/xknx/io/knxip_interface.py b/xknx/io/knxip_interface.py
index d9a2fb83..1529ade4 100644
--- a/xknx/io/knxip_interface.py
+++ b/xknx/io/knxip_interface.py
@@ -13,13 +13,14 @@ import logging
 import threading
 from typing import TYPE_CHECKING, Awaitable, TypeVar
 
-from xknx.exceptions import CommunicationError, XKNXException
-
-from ..exceptions.exception import (
+from xknx.exceptions import (
+    CommunicationError,
     InterfaceWithUserIdNotFound,
     InvalidSecureConfiguration,
+    XKNXException,
 )
-from ..secure import Keyring, load_key_ring
+from xknx.secure import Keyring, load_key_ring
+
 from .connection import ConnectionConfig, ConnectionType
 from .gateway_scanner import GatewayDescriptor, GatewayScanFilter, GatewayScanner
 from .routing import Routing
diff --git a/xknx/io/request_response/authenticate.py b/xknx/io/request_response/authenticate.py
index 9dac86f5..f260d55b 100644
--- a/xknx/io/request_response/authenticate.py
+++ b/xknx/io/request_response/authenticate.py
@@ -32,7 +32,6 @@ class Authenticate(RequestResponse):
         """Create KNX/IP Frame object to be sent to device."""
         return KNXIPFrame.init_from_body(
             SessionAuthenticate(
-                self.xknx,
                 user_id=self.user_id,
                 message_authentication_code=self.message_authentication_code,
             )
diff --git a/xknx/io/request_response/connect.py b/xknx/io/request_response/connect.py
index d0bc7727..9d39fc08 100644
--- a/xknx/io/request_response/connect.py
+++ b/xknx/io/request_response/connect.py
@@ -33,7 +33,6 @@ class Connect(RequestResponse):
         """Create KNX/IP Frame object to be sent to device."""
         # use the same HPAI for control_endpoint and data_endpoint
         connect_request = ConnectRequest(
-            self.xknx,
             request_type=ConnectRequestType.TUNNEL_CONNECTION,
             control_endpoint=self.local_hpai,
             data_endpoint=self.local_hpai,
diff --git a/xknx/io/request_response/connectionstate.py b/xknx/io/request_response/connectionstate.py
index e8e4ac6c..5a335bad 100644
--- a/xknx/io/request_response/connectionstate.py
+++ b/xknx/io/request_response/connectionstate.py
@@ -36,7 +36,6 @@ class ConnectionState(RequestResponse):
     def create_knxipframe(self) -> KNXIPFrame:
         """Create KNX/IP Frame object to be sent to device."""
         connectionstate_request = ConnectionStateRequest(
-            self.xknx,
             communication_channel_id=self.communication_channel_id,
             control_endpoint=self.local_hpai,
         )
diff --git a/xknx/io/request_response/disconnect.py b/xknx/io/request_response/disconnect.py
index cf8f7653..e8ae1e0c 100644
--- a/xknx/io/request_response/disconnect.py
+++ b/xknx/io/request_response/disconnect.py
@@ -30,7 +30,6 @@ class Disconnect(RequestResponse):
     def create_knxipframe(self) -> KNXIPFrame:
         """Create KNX/IP Frame object to be sent to device."""
         disconnect_request = DisconnectRequest(
-            self.xknx,
             communication_channel_id=self.communication_channel_id,
             control_endpoint=self.local_hpai,
         )
diff --git a/xknx/io/request_response/session.py b/xknx/io/request_response/session.py
index f8e8f4a4..1bfb03b4 100644
--- a/xknx/io/request_response/session.py
+++ b/xknx/io/request_response/session.py
@@ -30,10 +30,7 @@ class Session(RequestResponse):
     def create_knxipframe(self) -> KNXIPFrame:
         """Create KNX/IP Frame object to be sent to device."""
         return KNXIPFrame.init_from_body(
-            SessionRequest(
-                self.xknx,
-                ecdh_client_public_key=self.ecdh_client_public_key,
-            )
+            SessionRequest(ecdh_client_public_key=self.ecdh_client_public_key)
         )
 
     def on_success_hook(self, knxipframe: KNXIPFrame) -> None:
diff --git a/xknx/io/request_response/tunnelling.py b/xknx/io/request_response/tunnelling.py
index dea74d5a..dd3f7b84 100644
--- a/xknx/io/request_response/tunnelling.py
+++ b/xknx/io/request_response/tunnelling.py
@@ -51,13 +51,11 @@ class Tunnelling(RequestResponse):
     def create_knxipframe(self) -> KNXIPFrame:
         """Create KNX/IP Frame object to be sent to device."""
         cemi = CEMIFrame.init_from_telegram(
-            self.xknx,
             telegram=self.telegram,
             code=CEMIMessageCode.L_DATA_REQ,
             src_addr=self.src_address,
         )
         tunnelling_request = TunnellingRequest(
-            self.xknx,
             communication_channel_id=self.communication_channel_id,
             sequence_counter=self.sequence_counter,
             cemi=cemi,
diff --git a/xknx/io/routing.py b/xknx/io/routing.py
index 1ff463cd..487546a6 100644
--- a/xknx/io/routing.py
+++ b/xknx/io/routing.py
@@ -78,12 +78,11 @@ class Routing(Interface):
     async def send_telegram(self, telegram: "Telegram") -> None:
         """Send Telegram to routing connected device."""
         cemi = CEMIFrame.init_from_telegram(
-            self.xknx,
             telegram=telegram,
             code=CEMIMessageCode.L_DATA_IND,
             src_addr=self.xknx.own_address,
         )
-        routing_indication = RoutingIndication(self.xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         await self.send_knxipframe(KNXIPFrame.init_from_body(routing_indication))
 
     async def send_knxipframe(self, knxipframe: KNXIPFrame) -> None:
diff --git a/xknx/io/secure_session.py b/xknx/io/secure_session.py
index 13613522..489b0774 100644
--- a/xknx/io/secure_session.py
+++ b/xknx/io/secure_session.py
@@ -190,10 +190,7 @@ class SecureSession(TCPTransport):
         if self.transport and self.initialized:
             self.send(
                 KNXIPFrame.init_from_body(
-                    SessionStatus(
-                        self.xknx,
-                        status=SecureSessionStatusCode.STATUS_CLOSE,
-                    )
+                    SessionStatus(status=SecureSessionStatusCode.STATUS_CLOSE)
                 )
             )
         self.stop_keepalive_task()
@@ -271,7 +268,7 @@ class SecureSession(TCPTransport):
                 "Verification of message authentication code failed"
             )
 
-        knxipframe = KNXIPFrame(self.xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(dec_frame)
         return knxipframe
 
@@ -280,10 +277,7 @@ class SecureSession(TCPTransport):
         await asyncio.sleep(SESSION_KEEPALIVE_RATE)
         self.send(
             KNXIPFrame.init_from_body(
-                SessionStatus(
-                    self.xknx,
-                    status=SecureSessionStatusCode.STATUS_KEEPALIVE,
-                )
+                SessionStatus(status=SecureSessionStatusCode.STATUS_KEEPALIVE)
             )
         )
 
@@ -333,7 +327,6 @@ class SecureSession(TCPTransport):
         )
         return KNXIPFrame.init_from_body(
             SecureWrapper(
-                self.xknx,
                 secure_session_id=self.session_id,
                 sequence_information=sequence_information,
                 serial_number=XKNX_SERIAL_NUMBER,
diff --git a/xknx/io/self_description.py b/xknx/io/self_description.py
index 78e22c6d..9b44786e 100644
--- a/xknx/io/self_description.py
+++ b/xknx/io/self_description.py
@@ -75,10 +75,7 @@ class DescriptionQuery:
 
     def create_knxipframe(self) -> KNXIPFrame:
         """Create KNX/IP Frame object to be sent to device."""
-        description_request = DescriptionRequest(
-            self.xknx,
-            control_endpoint=self.local_hpai,
-        )
+        description_request = DescriptionRequest(control_endpoint=self.local_hpai)
         return KNXIPFrame.init_from_body(description_request)
 
     async def start(self) -> None:
diff --git a/xknx/io/transport/tcp_transport.py b/xknx/io/transport/tcp_transport.py
index e8d5ffa9..d2df6e21 100644
--- a/xknx/io/transport/tcp_transport.py
+++ b/xknx/io/transport/tcp_transport.py
@@ -77,7 +77,7 @@ class TCPTransport(KNXIPTransport):
         if not raw:
             return
         try:
-            knxipframe = KNXIPFrame(self.xknx)
+            knxipframe = KNXIPFrame()
             frame_length = knxipframe.from_knx(raw)
         except IncompleteKNXIPFrame:
             self._buffer = raw
diff --git a/xknx/io/transport/udp_transport.py b/xknx/io/transport/udp_transport.py
index 493e5d90..3232d44a 100644
--- a/xknx/io/transport/udp_transport.py
+++ b/xknx/io/transport/udp_transport.py
@@ -87,7 +87,7 @@ class UDPTransport(KNXIPTransport):
         """Parse and process KNXIP frame. Callback for having received an UDP packet."""
         if raw:
             try:
-                knxipframe = KNXIPFrame(self.xknx)
+                knxipframe = KNXIPFrame()
                 knxipframe.from_knx(raw)
             except CouldNotParseKNXIP as couldnotparseknxip:
                 knx_logger.debug(
diff --git a/xknx/io/tunnel.py b/xknx/io/tunnel.py
index 881e09ee..1ced9796 100644
--- a/xknx/io/tunnel.py
+++ b/xknx/io/tunnel.py
@@ -361,7 +361,6 @@ class _Tunnel(Interface):
         # If we do we close our communication_channel before reconnection.
         if disconnect_request.communication_channel_id == self.communication_channel:
             disconnect_response = DisconnectResponse(
-                self.xknx,
                 communication_channel_id=self.communication_channel,
             )
             self.transport.send(KNXIPFrame.init_from_body(disconnect_response))
@@ -494,7 +493,6 @@ class UDPTunnel(_Tunnel):
     ) -> None:
         """Send tunnelling ACK after tunnelling request received."""
         ack = TunnellingAck(
-            self.xknx,
             communication_channel_id=communication_channel_id,
             sequence_counter=sequence_counter,
         )
@@ -547,13 +545,11 @@ class TCPTunnel(_Tunnel):
                 "Sending telegram failed. No active communication channel."
             )
         cemi = CEMIFrame.init_from_telegram(
-            self.xknx,
             telegram=telegram,
             code=CEMIMessageCode.L_DATA_REQ,
             src_addr=self._src_address,
         )
         tunnelling_request = TunnellingRequest(
-            self.xknx,
             communication_channel_id=self.communication_channel,
             sequence_counter=self.sequence_number,
             cemi=cemi,
diff --git a/xknx/knxip/body.py b/xknx/knxip/body.py
index ec3ce111..4f056992 100644
--- a/xknx/knxip/body.py
+++ b/xknx/knxip/body.py
@@ -3,14 +3,11 @@ from __future__ import annotations
 
 from abc import ABC, abstractmethod
 import logging
-from typing import TYPE_CHECKING, ClassVar, cast
+from typing import ClassVar, cast
 
 from .error_code import ErrorCode
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 logger = logging.getLogger("xknx.log")
 
 
@@ -19,10 +16,6 @@ class KNXIPBody(ABC):
 
     SERVICE_TYPE: ClassVar[KNXIPServiceType] = cast(KNXIPServiceType, None)
 
-    def __init__(self, xknx: XKNX):
-        """Initialize KNXIPBody object."""
-        self.xknx = xknx
-
     @abstractmethod
     def calculated_length(self) -> int:
         """Get length of KNX/IP body."""
diff --git a/xknx/knxip/cemi_frame.py b/xknx/knxip/cemi_frame.py
index 8ad7996f..1d86231e 100644
--- a/xknx/knxip/cemi_frame.py
+++ b/xknx/knxip/cemi_frame.py
@@ -13,24 +13,18 @@ Documentation within:
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import ConversionError, CouldNotParseKNXIP, UnsupportedCEMIMessage
 from xknx.telegram import GroupAddress, IndividualAddress, Telegram
 from xknx.telegram.apci import APCI
 
 from .knxip_enum import CEMIFlags, CEMIMessageCode
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class CEMIFrame:
     """Representation of a CEMI Frame."""
 
     def __init__(
         self,
-        xknx: XKNX,
         code: CEMIMessageCode = CEMIMessageCode.L_DATA_IND,
         flags: int = 0,
         src_addr: IndividualAddress = IndividualAddress(None),
@@ -39,7 +33,6 @@ class CEMIFrame:
         payload: APCI | None = None,
     ):
         """Initialize CEMIFrame object."""
-        self.xknx = xknx
         self.code = code
         self.flags = flags
         self.src_addr = src_addr
@@ -49,13 +42,12 @@ class CEMIFrame:
 
     @staticmethod
     def init_from_telegram(
-        xknx: XKNX,
         telegram: Telegram,
         code: CEMIMessageCode = CEMIMessageCode.L_DATA_IND,
         src_addr: IndividualAddress = IndividualAddress(None),
     ) -> CEMIFrame:
         """Return CEMIFrame from a Telegram."""
-        cemi = CEMIFrame(xknx, code=code, src_addr=src_addr)
+        cemi = CEMIFrame(code=code, src_addr=src_addr)
         # dst_addr, payload and cmd are set by telegram.setter - mpdu_len not needed for outgoing telegram
         cemi.telegram = telegram
         return cemi
@@ -147,9 +139,7 @@ class CEMIFrame:
         self.src_addr = IndividualAddress((cemi[4 + addil], cemi[5 + addil]))
 
         if self.flags & CEMIFlags.DESTINATION_GROUP_ADDRESS:
-            self.dst_addr = GroupAddress(
-                (cemi[6 + addil], cemi[7 + addil]), levels=self.xknx.address_format
-            )
+            self.dst_addr = GroupAddress((cemi[6 + addil], cemi[7 + addil]))
         else:
             self.dst_addr = IndividualAddress((cemi[6 + addil], cemi[7 + addil]))
 
diff --git a/xknx/knxip/connect_request.py b/xknx/knxip/connect_request.py
index 39db6f15..a430f82d 100644
--- a/xknx/knxip/connect_request.py
+++ b/xknx/knxip/connect_request.py
@@ -5,17 +5,12 @@ Connect requests are used to start a new tunnel connection on a KNX/IP device.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBody
 from .hpai import HPAI
 from .knxip_enum import ConnectRequestType, KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class ConnectRequest(KNXIPBody):
     """Representation of a KNX Connect Request."""
@@ -25,13 +20,11 @@ class ConnectRequest(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         request_type: ConnectRequestType = ConnectRequestType.TUNNEL_CONNECTION,
         control_endpoint: HPAI = HPAI(),
         data_endpoint: HPAI = HPAI(),
     ):
         """Initialize ConnectRequest object."""
-        super().__init__(xknx)
         self.request_type = request_type
         self.control_endpoint = control_endpoint
         self.data_endpoint = data_endpoint
diff --git a/xknx/knxip/connect_response.py b/xknx/knxip/connect_response.py
index a54ddc7b..f87de90a 100644
--- a/xknx/knxip/connect_response.py
+++ b/xknx/knxip/connect_response.py
@@ -7,8 +7,6 @@ assigns a communication channel and an individual address for the client.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBodyResponse
@@ -16,9 +14,6 @@ from .error_code import ErrorCode
 from .hpai import HPAI
 from .knxip_enum import ConnectRequestType, KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class ConnectResponse(KNXIPBodyResponse):
     """Representation of a KNX Connect Response."""
@@ -28,7 +23,6 @@ class ConnectResponse(KNXIPBodyResponse):
 
     def __init__(
         self,
-        xknx: XKNX,
         communication_channel: int = 0,
         status_code: ErrorCode = ErrorCode.E_NO_ERROR,
         request_type: ConnectRequestType = ConnectRequestType.TUNNEL_CONNECTION,
@@ -36,8 +30,6 @@ class ConnectResponse(KNXIPBodyResponse):
         identifier: int = 0,
     ):
         """Initialize ConnectResponse class."""
-        super().__init__(xknx)
-
         self.communication_channel = communication_channel
         self.status_code = status_code
         self.request_type = request_type
diff --git a/xknx/knxip/connectionstate_request.py b/xknx/knxip/connectionstate_request.py
index d92fac8b..273398a1 100644
--- a/xknx/knxip/connectionstate_request.py
+++ b/xknx/knxip/connectionstate_request.py
@@ -5,17 +5,12 @@ Connectionstate requests are used to determine if a tunnel connection is still a
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBody
 from .hpai import HPAI
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class ConnectionStateRequest(KNXIPBody):
     """Representation of a KNX Connection State Request."""
@@ -24,12 +19,10 @@ class ConnectionStateRequest(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         communication_channel_id: int = 1,
         control_endpoint: HPAI = HPAI(),
     ):
         """Initialize ConnectionStateRequest object."""
-        super().__init__(xknx)
         self.communication_channel_id = communication_channel_id
         self.control_endpoint = control_endpoint
 
diff --git a/xknx/knxip/connectionstate_response.py b/xknx/knxip/connectionstate_response.py
index bfe57aa1..44388dc9 100644
--- a/xknx/knxip/connectionstate_response.py
+++ b/xknx/knxip/connectionstate_response.py
@@ -6,17 +6,12 @@ With a connectionstate response the receiving party acknowledges the valid proce
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBodyResponse
 from .error_code import ErrorCode
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class ConnectionStateResponse(KNXIPBodyResponse):
     """Representation of a KNX Connection State Response."""
@@ -26,12 +21,10 @@ class ConnectionStateResponse(KNXIPBodyResponse):
 
     def __init__(
         self,
-        xknx: XKNX,
         communication_channel_id: int = 1,
         status_code: ErrorCode = ErrorCode.E_NO_ERROR,
     ):
         """Initialize ConnectionStateResponse object."""
-        super().__init__(xknx)
         self.communication_channel_id = communication_channel_id
         self.status_code = status_code
 
diff --git a/xknx/knxip/description_request.py b/xknx/knxip/description_request.py
index c61d6a28..cd7d0b41 100644
--- a/xknx/knxip/description_request.py
+++ b/xknx/knxip/description_request.py
@@ -6,24 +6,18 @@ of the KNXnet/IP Server to obtain a self-description of the KNXnet/IP Server dev
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from .body import KNXIPBody
 from .hpai import HPAI
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class DescriptionRequest(KNXIPBody):
     """Representation of a KNX Descriptoin Request."""
 
     SERVICE_TYPE = KNXIPServiceType.DESCRIPTION_REQUEST
 
-    def __init__(self, xknx: XKNX, control_endpoint: HPAI = HPAI()):
+    def __init__(self, control_endpoint: HPAI = HPAI()):
         """Initialize SearchRequest object."""
-        super().__init__(xknx)
         self.control_endpoint = control_endpoint
 
     def calculated_length(self) -> int:
diff --git a/xknx/knxip/description_response.py b/xknx/knxip/description_response.py
index 7fe5c68f..6708adfd 100644
--- a/xknx/knxip/description_response.py
+++ b/xknx/knxip/description_response.py
@@ -9,24 +9,18 @@ by the KNXnet/IP Server in response to the KNXnet/IP Clients DESCRIPTION_REQUEST
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from .body import KNXIPBody
 from .dib import DIB, DIBDeviceInformation
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class DescriptionResponse(KNXIPBody):
     """Representation of a KNX Description Response."""
 
     SERVICE_TYPE = KNXIPServiceType.DESCRIPTION_RESPONSE
 
-    def __init__(self, xknx: XKNX):
+    def __init__(self) -> None:
         """Initialize SearchResponse object."""
-        super().__init__(xknx)
         self.dibs: list[DIB] = []
 
     def calculated_length(self) -> int:
diff --git a/xknx/knxip/disconnect_request.py b/xknx/knxip/disconnect_request.py
index c3566cc0..f4de0bf3 100644
--- a/xknx/knxip/disconnect_request.py
+++ b/xknx/knxip/disconnect_request.py
@@ -5,17 +5,12 @@ Disconnect requests are used to disconnect a tunnel from a KNX/IP device.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBody
 from .hpai import HPAI
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class DisconnectRequest(KNXIPBody):
     """Representation of a KNX Disconnect Request."""
@@ -24,13 +19,10 @@ class DisconnectRequest(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         communication_channel_id: int = 1,
         control_endpoint: HPAI = HPAI(),
     ):
         """Initialize DisconnectRequest object."""
-        super().__init__(xknx)
-
         self.communication_channel_id = communication_channel_id
         self.control_endpoint = control_endpoint
 
diff --git a/xknx/knxip/disconnect_response.py b/xknx/knxip/disconnect_response.py
index 4b02b1c0..e04ccfe0 100644
--- a/xknx/knxip/disconnect_response.py
+++ b/xknx/knxip/disconnect_response.py
@@ -6,17 +6,12 @@ With a Disconnect Response the receiving party acknowledges the valid processing
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBodyResponse
 from .error_code import ErrorCode
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class DisconnectResponse(KNXIPBodyResponse):
     """Representation of a KNX Disconnect Response."""
@@ -26,13 +21,10 @@ class DisconnectResponse(KNXIPBodyResponse):
 
     def __init__(
         self,
-        xknx: XKNX,
         communication_channel_id: int = 1,
         status_code: ErrorCode = ErrorCode.E_NO_ERROR,
     ):
         """Initialize DisconnectResponse object."""
-        super().__init__(xknx)
-
         self.communication_channel_id = communication_channel_id
         self.status_code = status_code
 
diff --git a/xknx/knxip/knxip.py b/xknx/knxip/knxip.py
index 7b7d8534..74fd68d8 100644
--- a/xknx/knxip/knxip.py
+++ b/xknx/knxip/knxip.py
@@ -6,8 +6,6 @@ Depending on the service_type_ident different types of body classes are instanci
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import CouldNotParseKNXIP, IncompleteKNXIPFrame
 
 from .body import KNXIPBody
@@ -34,16 +32,12 @@ from .session_status import SessionStatus
 from .tunnelling_ack import TunnellingAck
 from .tunnelling_request import TunnellingRequest
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class KNXIPFrame:
     """Class for KNX/IP Frames."""
 
-    def __init__(self, xknx: XKNX):
+    def __init__(self) -> None:
         """Initialize object."""
-        self.xknx = xknx
         self.header = KNXIPHeader()
         self.body: KNXIPBody | None = None
 
@@ -54,48 +48,48 @@ class KNXIPFrame:
         body: KNXIPBody
         # Core
         if service_type_ident == KNXIPServiceType.SEARCH_REQUEST:
-            body = SearchRequest(self.xknx)
+            body = SearchRequest()
         elif service_type_ident == KNXIPServiceType.SEARCH_REQUEST_EXTENDED:
-            body = SearchRequestExtended(self.xknx)
+            body = SearchRequestExtended()
         elif service_type_ident == KNXIPServiceType.SEARCH_RESPONSE:
-            body = SearchResponse(self.xknx)
+            body = SearchResponse()
         elif service_type_ident == KNXIPServiceType.SEARCH_RESPONSE_EXTENDED:
-            body = SearchResponseExtended(self.xknx)
+            body = SearchResponseExtended()
         elif service_type_ident == KNXIPServiceType.DESCRIPTION_REQUEST:
-            body = DescriptionRequest(self.xknx)
+            body = DescriptionRequest()
         elif service_type_ident == KNXIPServiceType.DESCRIPTION_RESPONSE:
-            body = DescriptionResponse(self.xknx)
+            body = DescriptionResponse()
         elif service_type_ident == KNXIPServiceType.CONNECT_REQUEST:
-            body = ConnectRequest(self.xknx)
+            body = ConnectRequest()
         elif service_type_ident == KNXIPServiceType.CONNECT_RESPONSE:
-            body = ConnectResponse(self.xknx)
+            body = ConnectResponse()
         elif service_type_ident == KNXIPServiceType.CONNECTIONSTATE_REQUEST:
-            body = ConnectionStateRequest(self.xknx)
+            body = ConnectionStateRequest()
         elif service_type_ident == KNXIPServiceType.CONNECTIONSTATE_RESPONSE:
-            body = ConnectionStateResponse(self.xknx)
+            body = ConnectionStateResponse()
         elif service_type_ident == KNXIPServiceType.DISCONNECT_REQUEST:
-            body = DisconnectRequest(self.xknx)
+            body = DisconnectRequest()
         elif service_type_ident == KNXIPServiceType.DISCONNECT_RESPONSE:
-            body = DisconnectResponse(self.xknx)
+            body = DisconnectResponse()
         # Tunneling
         elif service_type_ident == KNXIPServiceType.TUNNELLING_REQUEST:
-            body = TunnellingRequest(self.xknx)
+            body = TunnellingRequest()
         elif service_type_ident == KNXIPServiceType.TUNNELLING_ACK:
-            body = TunnellingAck(self.xknx)
+            body = TunnellingAck()
         # Routing
         elif service_type_ident == KNXIPServiceType.ROUTING_INDICATION:
-            body = RoutingIndication(self.xknx)
+            body = RoutingIndication()
         # Secure
         elif service_type_ident == KNXIPServiceType.SECURE_WRAPPER:
-            body = SecureWrapper(self.xknx)
+            body = SecureWrapper()
         elif service_type_ident == KNXIPServiceType.SESSION_AUTHENTICATE:
-            body = SessionAuthenticate(self.xknx)
+            body = SessionAuthenticate()
         elif service_type_ident == KNXIPServiceType.SESSION_REQUEST:
-            body = SessionRequest(self.xknx)
+            body = SessionRequest()
         elif service_type_ident == KNXIPServiceType.SESSION_RESPONSE:
-            body = SessionResponse(self.xknx)
+            body = SessionResponse()
         elif service_type_ident == KNXIPServiceType.SESSION_STATUS:
-            body = SessionStatus(self.xknx)
+            body = SessionStatus()
         else:
             raise CouldNotParseKNXIP(
                 f"KNXIPServiceType not implemented: {service_type_ident.name}"
@@ -106,7 +100,7 @@ class KNXIPFrame:
     @staticmethod
     def init_from_body(knxip_body: KNXIPBody) -> KNXIPFrame:
         """Return KNXIPFrame from KNXIPBody."""
-        knxipframe = KNXIPFrame(knxip_body.xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.header.service_type_ident = knxip_body.__class__.SERVICE_TYPE
         knxipframe.body = knxip_body
         knxipframe.header.set_length(knxip_body)
diff --git a/xknx/knxip/routing_indication.py b/xknx/knxip/routing_indication.py
index 45405941..3c3978b8 100644
--- a/xknx/knxip/routing_indication.py
+++ b/xknx/knxip/routing_indication.py
@@ -6,7 +6,6 @@ Routing indications are used to transport CEMI Messages.
 from __future__ import annotations
 
 import logging
-from typing import TYPE_CHECKING
 
 from xknx.exceptions import CouldNotParseKNXIP, UnsupportedCEMIMessage
 
@@ -14,8 +13,6 @@ from .body import KNXIPBody
 from .cemi_frame import CEMIFrame
 from .knxip_enum import CEMIMessageCode, KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
 logger = logging.getLogger("xknx.log")
 
 
@@ -24,13 +21,10 @@ class RoutingIndication(KNXIPBody):
 
     SERVICE_TYPE = KNXIPServiceType.ROUTING_INDICATION
 
-    def __init__(self, xknx: XKNX, cemi: CEMIFrame | None = None):
+    def __init__(self, cemi: CEMIFrame | None = None):
         """Initialize SearchRequest object."""
-        super().__init__(xknx)
         self.cemi: CEMIFrame | None = (
-            cemi
-            if cemi is not None
-            else CEMIFrame(xknx, code=CEMIMessageCode.L_DATA_IND)
+            cemi if cemi is not None else CEMIFrame(code=CEMIMessageCode.L_DATA_IND)
         )
 
     def calculated_length(self) -> int:
diff --git a/xknx/knxip/search_request.py b/xknx/knxip/search_request.py
index 6e64c1ab..96d31ec2 100644
--- a/xknx/knxip/search_request.py
+++ b/xknx/knxip/search_request.py
@@ -5,29 +5,19 @@ Search Requests are used to search for KNX/IP devices within the network.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from .body import KNXIPBody
 from .hpai import HPAI
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class SearchRequest(KNXIPBody):
     """Representation of a KNX Search Request."""
 
     SERVICE_TYPE = KNXIPServiceType.SEARCH_REQUEST
 
-    def __init__(self, xknx: XKNX, discovery_endpoint: HPAI | None = None):
+    def __init__(self, discovery_endpoint: HPAI = HPAI()):
         """Initialize SearchRequest object."""
-        super().__init__(xknx)
-        self.discovery_endpoint = (
-            discovery_endpoint
-            if discovery_endpoint is not None
-            else HPAI(ip_addr=xknx.multicast_group, port=xknx.multicast_port)
-        )
+        self.discovery_endpoint = discovery_endpoint
 
     def calculated_length(self) -> int:
         """Get length of KNX/IP body."""
diff --git a/xknx/knxip/search_request_extended.py b/xknx/knxip/search_request_extended.py
index fa880753..c31095f0 100644
--- a/xknx/knxip/search_request_extended.py
+++ b/xknx/knxip/search_request_extended.py
@@ -7,16 +7,11 @@ See AN184 in version 03 from the KNX specifications.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from .body import KNXIPBody
 from .hpai import HPAI
 from .knxip_enum import KNXIPServiceType
 from .srp import SRP
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class SearchRequestExtended(KNXIPBody):
     """Representation of a KNX Search Request Extended."""
@@ -25,18 +20,12 @@ class SearchRequestExtended(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
+        discovery_endpoint: HPAI = HPAI(),
         srps: list[SRP] | None = None,
-        discovery_endpoint: HPAI | None = None,
     ):
         """Initialize SearchRequestExtended object."""
-        super().__init__(xknx)
+        self.discovery_endpoint = discovery_endpoint
         self.srps = srps or []
-        self.discovery_endpoint = (
-            discovery_endpoint
-            if discovery_endpoint is not None
-            else HPAI(ip_addr=xknx.multicast_group, port=xknx.multicast_port)
-        )
 
     def calculated_length(self) -> int:
         """Get length of KNX/IP body."""
diff --git a/xknx/knxip/search_response.py b/xknx/knxip/search_response.py
index 19f5ef5b..4fd12cd1 100644
--- a/xknx/knxip/search_response.py
+++ b/xknx/knxip/search_response.py
@@ -8,25 +8,19 @@ a search response and one device supporting multiple KNX connections may send mu
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from .body import KNXIPBody
 from .dib import DIB, DIBDeviceInformation
 from .hpai import HPAI
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class SearchResponse(KNXIPBody):
     """Representation of a KNX Search Response."""
 
     SERVICE_TYPE = KNXIPServiceType.SEARCH_RESPONSE
 
-    def __init__(self, xknx: XKNX, control_endpoint: HPAI = HPAI()):
+    def __init__(self, control_endpoint: HPAI = HPAI()):
         """Initialize SearchResponse object."""
-        super().__init__(xknx)
         self.control_endpoint = control_endpoint
         self.dibs: list[DIB] = []
 
diff --git a/xknx/knxip/search_response_extended.py b/xknx/knxip/search_response_extended.py
index 5612283d..8def453f 100644
--- a/xknx/knxip/search_response_extended.py
+++ b/xknx/knxip/search_response_extended.py
@@ -11,24 +11,19 @@ the server shall only reply to those requests if it can fulfill the requirements
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from .hpai import HPAI
 from .knxip_enum import KNXIPServiceType
 from .search_response import SearchResponse
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class SearchResponseExtended(SearchResponse):
     """Representation of a KNX Search Extended."""
 
     SERVICE_TYPE = KNXIPServiceType.SEARCH_RESPONSE_EXTENDED
 
-    def __init__(self, xknx: XKNX, control_endpoint: HPAI = HPAI()):
+    def __init__(self, control_endpoint: HPAI = HPAI()):
         """Initialize SearchResponse object."""
-        super().__init__(xknx, control_endpoint)
+        super().__init__(control_endpoint)
 
     def __str__(self) -> str:
         """Return object as readable string."""
diff --git a/xknx/knxip/secure_wrapper.py b/xknx/knxip/secure_wrapper.py
index 574a08e8..e2c570f3 100644
--- a/xknx/knxip/secure_wrapper.py
+++ b/xknx/knxip/secure_wrapper.py
@@ -8,16 +8,13 @@ for ensuring data integrity and freshness.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING, Final
+from typing import Final
 
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBody
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 # 2 octets secure session identifier
 # 6 octets sequence information
 # 6 octets KNX serial number
@@ -42,7 +39,6 @@ class SecureWrapper(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         secure_session_id: int = 0,
         sequence_information: bytes = bytes(6),
         serial_number: bytes = bytes(6),
@@ -51,7 +47,6 @@ class SecureWrapper(KNXIPBody):
         message_authentication_code: bytes = bytes(16),
     ):
         """Initialize SecureWrapper object."""
-        super().__init__(xknx)
         self.secure_session_id = secure_session_id
         self.sequence_information = sequence_information
         self.serial_number = serial_number
diff --git a/xknx/knxip/session_authenticate.py b/xknx/knxip/session_authenticate.py
index b5850d7e..a3dd70a2 100644
--- a/xknx/knxip/session_authenticate.py
+++ b/xknx/knxip/session_authenticate.py
@@ -7,16 +7,13 @@ to authenticate the user against the server device.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING, Final
+from typing import Final
 
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBody
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class SessionAuthenticate(KNXIPBody):
     """Representation of a KNX Session Authenticate."""
@@ -26,12 +23,10 @@ class SessionAuthenticate(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         user_id: int = 0x02,
         message_authentication_code: bytes = bytes(16),
     ):
         """Initialize SessionAuthenticate object."""
-        super().__init__(xknx)
         # 00h: Reserved, shall not be used
         # 01h: Management level access
         # 02h – 7Fh: User level access
diff --git a/xknx/knxip/session_request.py b/xknx/knxip/session_request.py
index 3f3cea13..e84cd704 100644
--- a/xknx/knxip/session_request.py
+++ b/xknx/knxip/session_request.py
@@ -6,7 +6,7 @@ handshake for a new secure communication session.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING, Final
+from typing import Final
 
 from xknx.exceptions import CouldNotParseKNXIP
 
@@ -14,9 +14,6 @@ from .body import KNXIPBody
 from .hpai import HPAI
 from .knxip_enum import HostProtocol, KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class SessionRequest(KNXIPBody):
     """Representation of a KNX Session Request."""
@@ -27,12 +24,10 @@ class SessionRequest(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         control_endpoint: HPAI = HPAI(protocol=HostProtocol.IPV4_TCP),
         ecdh_client_public_key: bytes = bytes(32),
     ):
         """Initialize SessionRequest object."""
-        super().__init__(xknx)
         self.control_endpoint = control_endpoint
         self.ecdh_client_public_key = ecdh_client_public_key
 
diff --git a/xknx/knxip/session_response.py b/xknx/knxip/session_response.py
index f4666b86..39d02149 100644
--- a/xknx/knxip/session_response.py
+++ b/xknx/knxip/session_response.py
@@ -6,16 +6,13 @@ client's control endpoint in response to a received secure session request frame
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING, Final
+from typing import Final
 
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBody
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class SessionResponse(KNXIPBody):
     """Representation of a KNX Session Response."""
@@ -28,13 +25,11 @@ class SessionResponse(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         secure_session_id: int = 0,
         ecdh_server_public_key: bytes = bytes(32),
         message_authentication_code: bytes = bytes(16),
     ):
         """Initialize SessionResponse object."""
-        super().__init__(xknx)
         self.ecdh_server_public_key = ecdh_server_public_key
         # secure session identifier 0 shall in general be reserved for
         # multicast data and shall not be used for unicast connections
diff --git a/xknx/knxip/session_status.py b/xknx/knxip/session_status.py
index 4a83190d..3dc56448 100644
--- a/xknx/knxip/session_status.py
+++ b/xknx/knxip/session_status.py
@@ -7,16 +7,13 @@ secure session handshake to indicate an error condition or status information.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING, Final
+from typing import Final
 
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBody
 from .knxip_enum import KNXIPServiceType, SecureSessionStatusCode
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class SessionStatus(KNXIPBody):
     """Representation of a KNX Session Status."""
@@ -26,11 +23,9 @@ class SessionStatus(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         status: SecureSessionStatusCode = SecureSessionStatusCode.STATUS_KEEPALIVE,
     ):
         """Initialize SessionStatus object."""
-        super().__init__(xknx)
         self.status = status
 
     def calculated_length(self) -> int:
diff --git a/xknx/knxip/srp.py b/xknx/knxip/srp.py
index f4f9cd9b..68ed6f05 100644
--- a/xknx/knxip/srp.py
+++ b/xknx/knxip/srp.py
@@ -9,7 +9,8 @@ is satisfied.
 """
 from __future__ import annotations
 
-from ..exceptions import ConversionError, CouldNotParseKNXIP
+from xknx.exceptions import ConversionError, CouldNotParseKNXIP
+
 from .knxip_enum import DIBServiceFamily, DIBTypeCode, SearchRequestParameterType
 
 
diff --git a/xknx/knxip/tunnelling_ack.py b/xknx/knxip/tunnelling_ack.py
index 80da22a8..f31432e3 100644
--- a/xknx/knxip/tunnelling_ack.py
+++ b/xknx/knxip/tunnelling_ack.py
@@ -6,17 +6,12 @@ With a Tunnelling ACK the receiving party acknowledges the valid processing of t
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
-
 from xknx.exceptions import CouldNotParseKNXIP
 
 from .body import KNXIPBodyResponse
 from .error_code import ErrorCode
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 
 class TunnellingAck(KNXIPBodyResponse):
     """Representation of a KNX Tunnelling Ack."""
@@ -24,11 +19,8 @@ class TunnellingAck(KNXIPBodyResponse):
     SERVICE_TYPE = KNXIPServiceType.TUNNELLING_ACK
     BODY_LENGTH = 4
 
-    def __init__(
-        self, xknx: XKNX, communication_channel_id: int = 1, sequence_counter: int = 0
-    ):
+    def __init__(self, communication_channel_id: int = 1, sequence_counter: int = 0):
         """Initialize TunnellingAck object."""
-        super().__init__(xknx)
         self.communication_channel_id = communication_channel_id
         self.sequence_counter = sequence_counter
         self.status_code = ErrorCode.E_NO_ERROR
diff --git a/xknx/knxip/tunnelling_request.py b/xknx/knxip/tunnelling_request.py
index fc956954..0742dedf 100644
--- a/xknx/knxip/tunnelling_request.py
+++ b/xknx/knxip/tunnelling_request.py
@@ -6,7 +6,6 @@ Tunnelling requests are used to transmit a KNX telegram within an existing KNX t
 from __future__ import annotations
 
 import logging
-from typing import TYPE_CHECKING
 
 from xknx.exceptions import CouldNotParseKNXIP, UnsupportedCEMIMessage
 
@@ -14,9 +13,6 @@ from .body import KNXIPBody
 from .cemi_frame import CEMIFrame, CEMIMessageCode
 from .knxip_enum import KNXIPServiceType
 
-if TYPE_CHECKING:
-    from xknx.xknx import XKNX
-
 logger = logging.getLogger("xknx.log")
 
 
@@ -28,20 +24,15 @@ class TunnellingRequest(KNXIPBody):
 
     def __init__(
         self,
-        xknx: XKNX,
         communication_channel_id: int = 1,
         sequence_counter: int = 0,
         cemi: CEMIFrame | None = None,
     ):
         """Initialize TunnellingRequest object."""
-        super().__init__(xknx)
-
         self.communication_channel_id = communication_channel_id
         self.sequence_counter = sequence_counter
         self.cemi: CEMIFrame | None = (
-            cemi
-            if cemi is not None
-            else CEMIFrame(xknx, code=CEMIMessageCode.L_DATA_REQ)
+            cemi if cemi is not None else CEMIFrame(code=CEMIMessageCode.L_DATA_REQ)
         )
 
     def calculated_length(self) -> int:
diff --git a/xknx/secure/keyring.py b/xknx/secure/keyring.py
index 171864d2..69cb4658 100644
--- a/xknx/secure/keyring.py
+++ b/xknx/secure/keyring.py
@@ -17,9 +17,9 @@ from cryptography.hazmat.primitives import hashes
 from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
 from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
 
+from xknx.exceptions.exception import InvalidSignature
 from xknx.telegram import GroupAddress, IndividualAddress
 
-from ..exceptions.exception import InvalidSignature
 from .util import sha256_hash
 
 
diff --git a/xknx/telegram/address.py b/xknx/telegram/address.py
index 56d7b43f..604495bd 100644
--- a/xknx/telegram/address.py
+++ b/xknx/telegram/address.py
@@ -18,7 +18,7 @@ from __future__ import annotations
 from abc import ABC
 from enum import Enum
 from re import compile as re_compile
-from typing import Optional, Union
+from typing import ClassVar, Optional, Union
 
 from xknx.exceptions import CouldNotParseAddress
 
@@ -197,6 +197,9 @@ class GroupAddressType(Enum):
 class GroupAddress(BaseAddress):
     """Class for handling KNX group addresses."""
 
+    # overridden by XKNX class on initialization to have consistent global string representation
+    address_format: ClassVar[GroupAddressType] = GroupAddressType.LONG
+
     MAX_MAIN = 31
     MAX_MIDDLE = 7
     MAX_SUB_LONG = 255
@@ -207,14 +210,9 @@ class GroupAddress(BaseAddress):
         r"^(?P<main>\d{1,2})(/(?P<middle>\d{1,2}))?/(?P<sub>\d{1,4})$"
     )
 
-    def __init__(
-        self,
-        address: GroupAddressableType,
-        levels: GroupAddressType = GroupAddressType.LONG,
-    ) -> None:
+    def __init__(self, address: GroupAddressableType) -> None:
         """Initialize GroupAddress class."""
         super().__init__()
-        self.levels = levels
 
         if isinstance(address, GroupAddress):
             self.raw = address.raw
@@ -279,7 +277,7 @@ class GroupAddress(BaseAddress):
         """
         return (
             (self.raw >> 11) & self.MAX_MAIN
-            if self.levels != GroupAddressType.FREE
+            if self.address_format != GroupAddressType.FREE
             else None
         )
 
@@ -293,7 +291,7 @@ class GroupAddress(BaseAddress):
         """
         return (
             (self.raw >> 8) & self.MAX_MIDDLE
-            if self.levels == GroupAddressType.LONG
+            if self.address_format == GroupAddressType.LONG
             else None
         )
 
@@ -304,9 +302,9 @@ class GroupAddress(BaseAddress):
 
         Works with any `GroupAddressType`, as we always have sub groups.
         """
-        if self.levels == GroupAddressType.SHORT:
+        if self.address_format == GroupAddressType.SHORT:
             return self.raw & self.MAX_SUB_SHORT
-        if self.levels == GroupAddressType.LONG:
+        if self.address_format == GroupAddressType.LONG:
             return self.raw & self.MAX_SUB_LONG
         return self.raw
 
@@ -316,9 +314,9 @@ class GroupAddress(BaseAddress):
 
         Honors the used `GroupAddressType` of this group.
         """
-        if self.levels == GroupAddressType.LONG:
+        if self.address_format == GroupAddressType.LONG:
             return f"{self.main}/{self.middle}/{self.sub}"
-        if self.levels == GroupAddressType.SHORT:
+        if self.address_format == GroupAddressType.SHORT:
             return f"{self.main}/{self.sub}"
         return f"{self.sub}"
 
diff --git a/xknx/telegram/address_filter.py b/xknx/telegram/address_filter.py
index 7b9c8614..683e0597 100644
--- a/xknx/telegram/address_filter.py
+++ b/xknx/telegram/address_filter.py
@@ -78,7 +78,7 @@ class AddressFilter:
     def _match_level3(self, address: GroupAddress) -> bool:
         if address.main is None or address.middle is None:
             raise ConnectionError(
-                f"Match level 3 incompatible with address level {address.levels}"
+                f"Match level 3 incompatible with address level {GroupAddress.address_format}"
             )
         return bool(
             self.level_filters[0].match(address.main)
@@ -89,7 +89,7 @@ class AddressFilter:
     def _match_level2(self, address: GroupAddress) -> bool:
         if address.main is None:
             raise ConnectionError(
-                f"Match level 2 incompatible with address level {address.levels}"
+                f"Match level 2 incompatible with address level {GroupAddress.address_format}"
             )
         return bool(
             self.level_filters[0].match(address.main)
diff --git a/xknx/xknx.py b/xknx/xknx.py
index ffb1f05c..0c0caa09 100644
--- a/xknx/xknx.py
+++ b/xknx/xknx.py
@@ -25,7 +25,7 @@ from xknx.io import (
     KNXIPInterface,
     knx_interface_factory,
 )
-from xknx.telegram import GroupAddressType, IndividualAddress, Telegram
+from xknx.telegram import GroupAddress, GroupAddressType, IndividualAddress, Telegram
 
 from .__version__ import __version__ as VERSION
 
@@ -64,7 +64,6 @@ class XKNX:
         self.task_registry = TaskRegistry(self)
         self.knxip_interface: KNXIPInterface | None = None
         self.started = asyncio.Event()
-        self.address_format = address_format
         self.own_address = IndividualAddress(own_address)
         self.rate_limit = rate_limit
         self.multicast_group = multicast_group
@@ -74,6 +73,7 @@ class XKNX:
         self.version = VERSION
         self.current_address = IndividualAddress(0)
 
+        GroupAddress.address_format = address_format  # for global string representation
         if log_directory is not None:
             self.setup_logging(log_directory)
 


Test patch:
diff --git a/test/dpt_tests/dpt_test.py b/test/dpt_tests/dpt_test.py
index bd4c868f..dc200277 100644
--- a/test/dpt_tests/dpt_test.py
+++ b/test/dpt_tests/dpt_test.py
@@ -89,13 +89,18 @@ class TestDPTBase:
     """Test class for transcoder base object."""
 
     def test_dpt_abstract_subclasses_ignored(self):
-        """Test if abstract base classes are ignored by __recursive_subclasses__."""
-        for dpt in DPTBase.__recursive_subclasses__():
-            assert dpt is not DPTNumeric
+        """Test if abstract base classes are ignored by dpt_class_tree and __recursive_subclasses__."""
+        for dpt in DPTBase.dpt_class_tree():
+            assert dpt not in (DPTBase, DPTNumeric)
+
+    @pytest.mark.parametrize("dpt_class", [DPTString, DPT2ByteFloat])
+    def test_dpt_non_abstract_baseclass_included(self, dpt_class):
+        """Test if non-abstract base classes is included by dpt_class_tree."""
+        assert dpt_class in dpt_class.dpt_class_tree()
 
     def test_dpt_subclasses_definition_types(self):
         """Test value_type and dpt_*_number values for correct type in subclasses of DPTBase."""
-        for dpt in DPTBase.__recursive_subclasses__():
+        for dpt in DPTBase.dpt_class_tree():
             if dpt.value_type is not None:
                 assert isinstance(
                     dpt.value_type, str
@@ -112,7 +117,7 @@ class TestDPTBase:
     def test_dpt_subclasses_no_duplicate_value_types(self):
         """Test for duplicate value_type values in subclasses of DPTBase."""
         value_types = []
-        for dpt in DPTBase.__recursive_subclasses__():
+        for dpt in DPTBase.dpt_class_tree():
             if dpt.value_type is not None:
                 value_types.append(dpt.value_type)
         assert len(value_types) == len(set(value_types))
@@ -120,7 +125,7 @@ class TestDPTBase:
     def test_dpt_subclasses_no_duplicate_dpt_number(self):
         """Test for duplicate value_type values in subclasses of DPTBase."""
         dpt_tuples = []
-        for dpt in DPTBase.__recursive_subclasses__():
+        for dpt in DPTBase.dpt_class_tree():
             if dpt.dpt_main_number is not None and dpt.dpt_sub_number is not None:
                 dpt_tuples.append((dpt.dpt_main_number, dpt.dpt_sub_number))
         assert len(dpt_tuples) == len(set(dpt_tuples))
@@ -157,7 +162,7 @@ class TestDPTBase:
 class TestDPTNumeric:
     """Test class for numeric transcoder base object."""
 
-    @pytest.mark.parametrize("dpt_class", DPTNumeric.__recursive_subclasses__())
+    @pytest.mark.parametrize("dpt_class", DPTNumeric.dpt_class_tree())
     def test_values(self, dpt_class):
         """Test boundary values are set for numeric definitions (because mypy doesn't)."""
 
diff --git a/test/io_tests/gateway_scanner_test.py b/test/io_tests/gateway_scanner_test.py
index 7d659477..b56623c4 100644
--- a/test/io_tests/gateway_scanner_test.py
+++ b/test/io_tests/gateway_scanner_test.py
@@ -153,7 +153,7 @@ class TestGatewayScanner:
         """Test function of gateway scanner."""
         xknx = XKNX()
         gateway_scanner = GatewayScanner(xknx)
-        test_search_response = fake_router_search_response(xknx)
+        test_search_response = fake_router_search_response()
         udp_transport_mock = create_autospec(UDPTransport)
         udp_transport_mock.local_addr = ("192.168.42.50", 0)
         udp_transport_mock.getsockname.return_value = ("192.168.42.50", 0)
@@ -263,9 +263,9 @@ class TestGatewayScanner:
         assert test_scan == []
 
 
-def fake_router_search_response(xknx: XKNX) -> KNXIPFrame:
+def fake_router_search_response() -> KNXIPFrame:
     """Return the KNXIPFrame of a KNX/IP Router with a SearchResponse body."""
-    frame_body = SearchResponse(xknx)
+    frame_body = SearchResponse()
     frame_body.control_endpoint = HPAI(ip_addr="192.168.42.10", port=3671)
 
     device_information = DIBDeviceInformation()
diff --git a/test/io_tests/request_response_tests/authenticate_test.py b/test/io_tests/request_response_tests/authenticate_test.py
index d1a0ccf6..6794c00a 100644
--- a/test/io_tests/request_response_tests/authenticate_test.py
+++ b/test/io_tests/request_response_tests/authenticate_test.py
@@ -35,7 +35,6 @@ class TestAuthenticate:
         # Expected KNX/IP-Frame:
         exp_knxipframe = KNXIPFrame.init_from_body(
             SessionAuthenticate(
-                xknx,
                 user_id=user_id,
                 message_authentication_code=mac,
             )
@@ -45,7 +44,7 @@ class TestAuthenticate:
         transport_mock.send.assert_called_with(exp_knxipframe)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_REQUEST)
         with patch("logging.Logger.warning") as mock_warning:
             authenticate.response_rec_callback(wrong_knxipframe, HPAI(), None)
@@ -53,7 +52,7 @@ class TestAuthenticate:
             assert authenticate.success is False
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.SESSION_STATUS)
         res_knxipframe.body.status = (
             SecureSessionStatusCode.STATUS_AUTHENTICATION_SUCCESS
diff --git a/test/io_tests/request_response_tests/connect_test.py b/test/io_tests/request_response_tests/connect_test.py
index 2aa195df..5f98a730 100644
--- a/test/io_tests/request_response_tests/connect_test.py
+++ b/test/io_tests/request_response_tests/connect_test.py
@@ -31,7 +31,6 @@ class TestConnect:
         # Expected KNX/IP-Frame:
         exp_knxipframe = KNXIPFrame.init_from_body(
             ConnectRequest(
-                xknx,
                 request_type=ConnectRequestType.TUNNEL_CONNECTION,
                 control_endpoint=local_hpai,
                 data_endpoint=local_hpai,
@@ -46,14 +45,14 @@ class TestConnect:
             mock_udp_send.assert_called_with(exp_knxipframe)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_REQUEST)
         with patch("logging.Logger.warning") as mock_warning:
             connect.response_rec_callback(wrong_knxipframe, HPAI(), None)
             mock_warning.assert_called_with("Could not understand knxipframe")
 
         # Response KNX/IP-Frame with error:
-        err_knxipframe = KNXIPFrame(xknx)
+        err_knxipframe = KNXIPFrame()
         err_knxipframe.init(KNXIPServiceType.CONNECT_RESPONSE)
         err_knxipframe.body.status_code = ErrorCode.E_CONNECTION_ID
         with patch("logging.Logger.debug") as mock_warning:
@@ -66,7 +65,7 @@ class TestConnect:
             )
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.CONNECT_RESPONSE)
         res_knxipframe.body.communication_channel = 23
         res_knxipframe.body.identifier = 7
@@ -87,7 +86,7 @@ class TestConnect:
 
         # Expected KNX/IP-Frame:
         exp_knxipframe = KNXIPFrame.init_from_body(
-            ConnectRequest(xknx, request_type=ConnectRequestType.TUNNEL_CONNECTION)
+            ConnectRequest(request_type=ConnectRequestType.TUNNEL_CONNECTION)
         )
         with patch("xknx.io.transport.UDPTransport.send") as mock_udp_send, patch(
             "xknx.io.transport.UDPTransport.getsockname"
@@ -97,14 +96,14 @@ class TestConnect:
             mock_udp_send.assert_called_with(exp_knxipframe)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_REQUEST)
         with patch("logging.Logger.warning") as mock_warning:
             connect.response_rec_callback(wrong_knxipframe, HPAI(), None)
             mock_warning.assert_called_with("Could not understand knxipframe")
 
         # Response KNX/IP-Frame with error:
-        err_knxipframe = KNXIPFrame(xknx)
+        err_knxipframe = KNXIPFrame()
         err_knxipframe.init(KNXIPServiceType.CONNECT_RESPONSE)
         err_knxipframe.body.status_code = ErrorCode.E_CONNECTION_ID
         with patch("logging.Logger.debug") as mock_warning:
@@ -117,7 +116,7 @@ class TestConnect:
             )
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.CONNECT_RESPONSE)
         res_knxipframe.body.communication_channel = 23
         res_knxipframe.body.identifier = 7
diff --git a/test/io_tests/request_response_tests/connectionstate_test.py b/test/io_tests/request_response_tests/connectionstate_test.py
index 0dec9444..84cb5408 100644
--- a/test/io_tests/request_response_tests/connectionstate_test.py
+++ b/test/io_tests/request_response_tests/connectionstate_test.py
@@ -34,7 +34,6 @@ class TestConnectionState:
         # Expected KNX/IP-Frame:
         exp_knxipframe = KNXIPFrame.init_from_body(
             ConnectionStateRequest(
-                xknx,
                 communication_channel_id=communication_channel_id,
                 control_endpoint=local_hpai,
             )
@@ -47,14 +46,14 @@ class TestConnectionState:
             mock_udp_send.assert_called_with(exp_knxipframe)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_REQUEST)
         with patch("logging.Logger.warning") as mock_warning:
             connectionstate.response_rec_callback(wrong_knxipframe, HPAI(), None)
             mock_warning.assert_called_with("Could not understand knxipframe")
 
         # Response KNX/IP-Frame with error:
-        err_knxipframe = KNXIPFrame(xknx)
+        err_knxipframe = KNXIPFrame()
         err_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_RESPONSE)
         err_knxipframe.body.status_code = ErrorCode.E_CONNECTION_ID
         with patch("logging.Logger.debug") as mock_warning:
@@ -67,7 +66,7 @@ class TestConnectionState:
             )
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_RESPONSE)
         connectionstate.response_rec_callback(res_knxipframe, HPAI(), None)
         assert connectionstate.success
@@ -89,7 +88,6 @@ class TestConnectionState:
         # Expected KNX/IP-Frame:
         exp_knxipframe = KNXIPFrame.init_from_body(
             ConnectionStateRequest(
-                xknx,
                 communication_channel_id=communication_channel_id,
             )
         )
@@ -101,14 +99,14 @@ class TestConnectionState:
             mock_udp_send.assert_called_with(exp_knxipframe)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_REQUEST)
         with patch("logging.Logger.warning") as mock_warning:
             connectionstate.response_rec_callback(wrong_knxipframe, HPAI(), None)
             mock_warning.assert_called_with("Could not understand knxipframe")
 
         # Response KNX/IP-Frame with error:
-        err_knxipframe = KNXIPFrame(xknx)
+        err_knxipframe = KNXIPFrame()
         err_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_RESPONSE)
         err_knxipframe.body.status_code = ErrorCode.E_CONNECTION_ID
         with patch("logging.Logger.debug") as mock_warning:
@@ -121,7 +119,7 @@ class TestConnectionState:
             )
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_RESPONSE)
         connectionstate.response_rec_callback(res_knxipframe, HPAI(), None)
         assert connectionstate.success
diff --git a/test/io_tests/request_response_tests/disconnect_test.py b/test/io_tests/request_response_tests/disconnect_test.py
index 778cac45..860bb6b5 100644
--- a/test/io_tests/request_response_tests/disconnect_test.py
+++ b/test/io_tests/request_response_tests/disconnect_test.py
@@ -34,7 +34,6 @@ class TestDisconnect:
         # Expected KNX/IP-Frame:
         exp_knxipframe = KNXIPFrame.init_from_body(
             DisconnectRequest(
-                xknx,
                 communication_channel_id=communication_channel_id,
                 control_endpoint=local_hpai,
             )
@@ -47,14 +46,14 @@ class TestDisconnect:
             mock_udp_send.assert_called_with(exp_knxipframe)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.DISCONNECT_REQUEST)
         with patch("logging.Logger.warning") as mock_warning:
             disconnect.response_rec_callback(wrong_knxipframe, HPAI(), None)
             mock_warning.assert_called_with("Could not understand knxipframe")
 
         # Response KNX/IP-Frame with error:
-        err_knxipframe = KNXIPFrame(xknx)
+        err_knxipframe = KNXIPFrame()
         err_knxipframe.init(KNXIPServiceType.DISCONNECT_RESPONSE)
         err_knxipframe.body.status_code = ErrorCode.E_CONNECTION_ID
         with patch("logging.Logger.debug") as mock_warning:
@@ -67,7 +66,7 @@ class TestDisconnect:
             )
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.DISCONNECT_RESPONSE)
         disconnect.response_rec_callback(res_knxipframe, HPAI(), None)
         assert disconnect.success
@@ -89,7 +88,6 @@ class TestDisconnect:
         # Expected KNX/IP-Frame:
         exp_knxipframe = KNXIPFrame.init_from_body(
             DisconnectRequest(
-                xknx,
                 communication_channel_id=communication_channel_id,
             )
         )
@@ -101,14 +99,14 @@ class TestDisconnect:
             mock_udp_send.assert_called_with(exp_knxipframe)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.DISCONNECT_REQUEST)
         with patch("logging.Logger.warning") as mock_warning:
             disconnect.response_rec_callback(wrong_knxipframe, HPAI(), None)
             mock_warning.assert_called_with("Could not understand knxipframe")
 
         # Response KNX/IP-Frame with error:
-        err_knxipframe = KNXIPFrame(xknx)
+        err_knxipframe = KNXIPFrame()
         err_knxipframe.init(KNXIPServiceType.DISCONNECT_RESPONSE)
         err_knxipframe.body.status_code = ErrorCode.E_CONNECTION_ID
         with patch("logging.Logger.debug") as mock_warning:
@@ -121,7 +119,7 @@ class TestDisconnect:
             )
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.DISCONNECT_RESPONSE)
         disconnect.response_rec_callback(res_knxipframe, HPAI(), None)
         assert disconnect.success
diff --git a/test/io_tests/request_response_tests/session_test.py b/test/io_tests/request_response_tests/session_test.py
index c241b448..8f8a4eb7 100644
--- a/test/io_tests/request_response_tests/session_test.py
+++ b/test/io_tests/request_response_tests/session_test.py
@@ -31,17 +31,14 @@ class TestSession:
 
         # Expected KNX/IP-Frame:
         exp_knxipframe = KNXIPFrame.init_from_body(
-            SessionRequest(
-                xknx,
-                ecdh_client_public_key=ecdh_public_key,
-            )
+            SessionRequest(ecdh_client_public_key=ecdh_public_key)
         )
 
         await session.start()
         transport_mock.send.assert_called_with(exp_knxipframe)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.SESSION_STATUS)
         with patch("logging.Logger.warning") as mock_warning:
             session.response_rec_callback(wrong_knxipframe, HPAI(), None)
@@ -49,7 +46,7 @@ class TestSession:
             assert session.success is False
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.SESSION_RESPONSE)
         res_knxipframe.body.secure_session_id = 5
         session.response_rec_callback(res_knxipframe, HPAI(), None)
diff --git a/test/io_tests/request_response_tests/tunnelling_test.py b/test/io_tests/request_response_tests/tunnelling_test.py
index ae723ad2..2120f785 100644
--- a/test/io_tests/request_response_tests/tunnelling_test.py
+++ b/test/io_tests/request_response_tests/tunnelling_test.py
@@ -48,7 +48,6 @@ class TestTunnelling:
 
         # Expected KNX/IP-Frame:
         tunnelling_request = TunnellingRequest(
-            xknx,
             communication_channel_id=communication_channel_id,
             sequence_counter=sequence_counter,
         )
@@ -63,14 +62,14 @@ class TestTunnelling:
             mock_udp_send.assert_called_with(exp_knxipframe, addr=data_endpoint)
 
         # Response KNX/IP-Frame with wrong type
-        wrong_knxipframe = KNXIPFrame(xknx)
+        wrong_knxipframe = KNXIPFrame()
         wrong_knxipframe.init(KNXIPServiceType.CONNECTIONSTATE_REQUEST)
         with patch("logging.Logger.warning") as mock_warning:
             tunnelling.response_rec_callback(wrong_knxipframe, HPAI(), None)
             mock_warning.assert_called_with("Could not understand knxipframe")
 
         # Response KNX/IP-Frame with error:
-        err_knxipframe = KNXIPFrame(xknx)
+        err_knxipframe = KNXIPFrame()
         err_knxipframe.init(KNXIPServiceType.TUNNELLING_ACK)
         err_knxipframe.body.status_code = ErrorCode.E_CONNECTION_ID
         with patch("logging.Logger.debug") as mock_warning:
@@ -83,7 +82,7 @@ class TestTunnelling:
             )
 
         # Correct Response KNX/IP-Frame:
-        res_knxipframe = KNXIPFrame(xknx)
+        res_knxipframe = KNXIPFrame()
         res_knxipframe.init(KNXIPServiceType.TUNNELLING_ACK)
         tunnelling.response_rec_callback(res_knxipframe, HPAI(), None)
         assert tunnelling.success
diff --git a/test/io_tests/secure_session_test.py b/test/io_tests/secure_session_test.py
index c0533d06..12b54ba4 100644
--- a/test/io_tests/secure_session_test.py
+++ b/test/io_tests/secure_session_test.py
@@ -91,7 +91,7 @@ class TestSecureSession:
         mock_super_connect.assert_called_once()
         # outgoing
         session_request_frame = KNXIPFrame.init_from_body(
-            SessionRequest(self.xknx, ecdh_client_public_key=self.mock_public_key)
+            SessionRequest(ecdh_client_public_key=self.mock_public_key)
         )
         mock_super_send.assert_called_once_with(
             session_request_frame, None  # None for addr in TCP transport
@@ -100,7 +100,6 @@ class TestSecureSession:
         # incoming
         session_response_frame = KNXIPFrame.init_from_body(
             SessionResponse(
-                self.xknx,
                 secure_session_id=1,
                 ecdh_server_public_key=self.mock_server_public_key,
                 message_authentication_code=bytes.fromhex(
@@ -113,7 +112,6 @@ class TestSecureSession:
         # outgoing
         encrypted_authenticate_frame = KNXIPFrame.init_from_body(
             SecureWrapper(
-                self.xknx,
                 secure_session_id=self.mock_session_id,
                 sequence_information=bytes.fromhex("00 00 00 00 00 00"),
                 serial_number=self.mock_serial_number,
@@ -135,7 +133,6 @@ class TestSecureSession:
         # incoming
         encrypted_session_status_frame = KNXIPFrame.init_from_body(
             SecureWrapper(
-                self.xknx,
                 secure_session_id=self.mock_session_id,
                 sequence_information=bytes.fromhex("00 00 00 00 00 00"),
                 serial_number=bytes.fromhex("00 fa aa aa aa aa"),
@@ -156,7 +153,7 @@ class TestSecureSession:
 
         # handle incoming SessionStatus (unencrypted for sake of simplicity)
         session_status_close_frame = KNXIPFrame.init_from_body(
-            SessionStatus(self.xknx, status=SecureSessionStatusCode.STATUS_CLOSE)
+            SessionStatus(status=SecureSessionStatusCode.STATUS_CLOSE)
         )
         with patch.object(self.session, "transport") as mock_transport:
             self.session.handle_knxipframe(
@@ -183,7 +180,6 @@ class TestSecureSession:
         """Test for raising when an encrypted Frame arrives at an uninitialized Session."""
         secure_wrapper_frame = KNXIPFrame.init_from_body(
             SecureWrapper(
-                self.xknx,
                 secure_session_id=self.mock_session_id,
                 sequence_information=bytes.fromhex("00 00 00 00 00 00"),
                 serial_number=bytes.fromhex("00 fa aa aa aa aa"),
@@ -218,7 +214,6 @@ class TestSecureSession:
         await time_travel(0)
         session_response_frame = KNXIPFrame.init_from_body(
             SessionResponse(
-                self.xknx,
                 secure_session_id=1,
                 ecdh_server_public_key=self.mock_server_public_key,
                 message_authentication_code=bytes.fromhex(
@@ -231,7 +226,6 @@ class TestSecureSession:
         callback_mock.reset_mock()
         encrypted_session_status_frame = KNXIPFrame.init_from_body(
             SecureWrapper(
-                self.xknx,
                 secure_session_id=self.mock_session_id,
                 sequence_information=bytes.fromhex("00 00 00 00 00 00"),
                 serial_number=bytes.fromhex("00 fa aa aa aa aa"),
@@ -261,7 +255,6 @@ class TestSecureSession:
         # (which is invalid brecause the sequence_information is changed)
         wrong_session_status_frame = KNXIPFrame.init_from_body(
             SecureWrapper(
-                self.xknx,
                 secure_session_id=self.mock_session_id,
                 sequence_information=bytes.fromhex("00 00 00 00 00 01"),
                 serial_number=bytes.fromhex("00 fa aa aa aa aa"),
@@ -296,7 +289,6 @@ class TestSecureSession:
         await time_travel(0)
         session_response_frame = KNXIPFrame.init_from_body(
             SessionResponse(
-                self.xknx,
                 secure_session_id=1,
                 ecdh_server_public_key=self.mock_server_public_key,
                 message_authentication_code=bytes.fromhex(
@@ -332,7 +324,6 @@ class TestSecureSession:
         mock_super_send.reset_mock()
         invalid_session_response_frame = KNXIPFrame.init_from_body(
             SessionResponse(
-                self.xknx,
                 secure_session_id=1,
                 ecdh_server_public_key=self.mock_server_public_key,
                 message_authentication_code=bytes.fromhex(
@@ -347,7 +338,6 @@ class TestSecureSession:
         # outgoing
         encrypted_authenticate_frame = KNXIPFrame.init_from_body(
             SecureWrapper(
-                self.xknx,
                 secure_session_id=self.mock_session_id,
                 sequence_information=bytes.fromhex("00 00 00 00 00 00"),
                 serial_number=self.mock_serial_number,
@@ -368,7 +358,6 @@ class TestSecureSession:
         # incoming
         encrypted_session_status_frame = KNXIPFrame.init_from_body(
             SecureWrapper(
-                self.xknx,
                 secure_session_id=self.mock_session_id,
                 sequence_information=bytes.fromhex("00 00 00 00 00 00"),
                 serial_number=bytes.fromhex("00 fa aa aa aa aa"),
@@ -403,7 +392,6 @@ class TestSecureSession:
         await time_travel(0)
         session_response_frame = KNXIPFrame.init_from_body(
             SessionResponse(
-                self.xknx,
                 secure_session_id=1,
                 ecdh_server_public_key=self.mock_server_public_key,
                 message_authentication_code=bytes.fromhex(
diff --git a/test/io_tests/self_description_test.py b/test/io_tests/self_description_test.py
index 0db4ecf6..4f0e0538 100644
--- a/test/io_tests/self_description_test.py
+++ b/test/io_tests/self_description_test.py
@@ -23,7 +23,7 @@ class TestSelfDescription:
         transport_mocked.send = Mock()
 
         description_request = KNXIPFrame.init_from_body(
-            DescriptionRequest(xknx, control_endpoint=HPAI(*local_addr))
+            DescriptionRequest(control_endpoint=HPAI(*local_addr))
         )
         description_response_raw = bytes.fromhex(
             "06 10 02 04 00 48 36 01 02 00 10 00 00 00 00"
diff --git a/test/io_tests/transport_tests/ip_transport_test.py b/test/io_tests/transport_tests/ip_transport_test.py
index e6a74338..e382f790 100644
--- a/test/io_tests/transport_tests/ip_transport_test.py
+++ b/test/io_tests/transport_tests/ip_transport_test.py
@@ -11,7 +11,6 @@ class TestKNXIPTransport:
     @patch.multiple(KNXIPTransport, __abstractmethods__=set())
     def test_callback(self):
         """Test if callback is called correctly."""
-        xknx = Mock()
         transport = KNXIPTransport()
         transport.callbacks = []
         callback_mock = Mock()
@@ -21,14 +20,14 @@ class TestKNXIPTransport:
         )
         assert len(transport.callbacks) == 1
         # Handle KNX/IP frame with different service type
-        wrong_service_type_frame = KNXIPFrame(xknx)
+        wrong_service_type_frame = KNXIPFrame()
         wrong_service_type_frame.header.service_type_ident = (
             KNXIPServiceType.CONNECTIONSTATE_REQUEST
         )
         transport.handle_knxipframe(wrong_service_type_frame, HPAI())
         callback_mock.assert_not_called()
         # Handle KNX/IP frame with correct service type
-        correct_service_type_frame = KNXIPFrame(xknx)
+        correct_service_type_frame = KNXIPFrame()
         correct_service_type_frame.header.service_type_ident = (
             KNXIPServiceType.CONNECTIONSTATE_RESPONSE
         )
diff --git a/test/io_tests/tunnel_test.py b/test/io_tests/tunnel_test.py
index 2694bc14..e6a085b7 100644
--- a/test/io_tests/tunnel_test.py
+++ b/test/io_tests/tunnel_test.py
@@ -52,7 +52,7 @@ class TestUDPTunnel:
         # LDataInd GroupValueWrite from 1.1.22 to to 5/1/22 with DPT9 payload 0C 3F
         # communication_channel_id: 0x02   sequence_counter: 0x21
         raw = bytes.fromhex("0610 0420 0017 04 02 21 00 2900bcd011162916030080 0c 3f")
-        _cemi = CEMIFrame(self.xknx)
+        _cemi = CEMIFrame()
         _cemi.from_knx(raw[10:])
         telegram = _cemi.telegram
         telegram.direction = TelegramDirection.INCOMING
@@ -91,16 +91,13 @@ class TestUDPTunnel:
         self.tunnel.communication_channel = 1
 
         test_telegram = Telegram(payload=GroupValueWrite(DPTArray((1,))))
-        test_ack = KNXIPFrame.init_from_body(
-            TunnellingAck(self.xknx, sequence_counter=23)
-        )
+        test_ack = KNXIPFrame.init_from_body(TunnellingAck(sequence_counter=23))
         confirmation = KNXIPFrame.init_from_body(
             TunnellingRequest(
-                self.xknx,
                 communication_channel_id=1,
                 sequence_counter=23,
                 cemi=CEMIFrame.init_from_telegram(
-                    self.xknx, test_telegram, code=CEMIMessageCode.L_DATA_CON
+                    test_telegram, code=CEMIMessageCode.L_DATA_CON
                 ),
             )
         )
@@ -141,7 +138,6 @@ class TestUDPTunnel:
 
         # Connect
         connect_request = ConnectRequest(
-            self.xknx,
             control_endpoint=local_endpoint,
             data_endpoint=local_endpoint,
         )
@@ -154,7 +150,6 @@ class TestUDPTunnel:
 
         connect_response_frame = KNXIPFrame.init_from_body(
             ConnectResponse(
-                self.xknx,
                 communication_channel=23,
                 data_endpoint=gateway_data_endpoint,
                 identifier=7,
@@ -170,11 +165,9 @@ class TestUDPTunnel:
         test_telegram = Telegram(payload=GroupValueWrite(DPTArray((1,))))
         test_telegram_frame = KNXIPFrame.init_from_body(
             TunnellingRequest(
-                self.xknx,
                 communication_channel_id=23,
                 sequence_counter=0,
                 cemi=CEMIFrame.init_from_telegram(
-                    self.xknx,
                     test_telegram,
                     code=CEMIMessageCode.L_DATA_REQ,
                     src_addr=IndividualAddress(7),
@@ -191,7 +184,8 @@ class TestUDPTunnel:
         # Disconnect
         self.tunnel.transport.send.reset_mock()
         disconnect_request = DisconnectRequest(
-            self.xknx, communication_channel_id=23, control_endpoint=local_endpoint
+            communication_channel_id=23,
+            control_endpoint=local_endpoint,
         )
         disconnect_frame = KNXIPFrame.init_from_body(disconnect_request)
 
@@ -200,10 +194,7 @@ class TestUDPTunnel:
         self.tunnel.transport.send.assert_called_once_with(disconnect_frame)
 
         disconnect_response_frame = KNXIPFrame.init_from_body(
-            DisconnectResponse(
-                self.xknx,
-                communication_channel_id=23,
-            )
+            DisconnectResponse(communication_channel_id=23)
         )
         self.tunnel.transport.handle_knxipframe(disconnect_response_frame, remote_addr)
         await disconnection_task
@@ -217,9 +208,9 @@ class TestUDPTunnel:
         self.tunnel.transport.getsockname = Mock(return_value=local_addr)
 
         description_request = KNXIPFrame.init_from_body(
-            DescriptionRequest(self.xknx, control_endpoint=self.tunnel.local_hpai)
+            DescriptionRequest(control_endpoint=self.tunnel.local_hpai)
         )
-        description_response = KNXIPFrame.init_from_body(DescriptionResponse(self.xknx))
+        description_response = KNXIPFrame.init_from_body(DescriptionResponse())
 
         task = asyncio.create_task(self.tunnel.request_description())
         await time_travel(0)
diff --git a/test/knxip_tests/body_test.py b/test/knxip_tests/body_test.py
index 52ecd613..441dd5d0 100644
--- a/test/knxip_tests/body_test.py
+++ b/test/knxip_tests/body_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP Body base class."""
 from unittest.mock import patch
 
-from xknx import XKNX
 from xknx.knxip import KNXIPBody, KNXIPBodyResponse
 
 
@@ -11,14 +10,12 @@ class TestKNXIPBody:
     @patch.multiple(KNXIPBody, __abstractmethods__=set())
     def test_body_attributes(self):
         """Test attributes of KNXIPBody base class."""
-        xknx = XKNX()
-        body = KNXIPBody(xknx)
+        body = KNXIPBody()
         assert hasattr(body, "SERVICE_TYPE")
 
     @patch.multiple(KNXIPBodyResponse, __abstractmethods__=set())
     def test_response_attributes(self):
         """Test attributes of KNXIPBodyResponse base class."""
-        xknx = XKNX()
-        response = KNXIPBodyResponse(xknx)
+        response = KNXIPBodyResponse()
         assert hasattr(response, "SERVICE_TYPE")
         assert hasattr(response, "status_code")
diff --git a/test/knxip_tests/cemi_frame_test.py b/test/knxip_tests/cemi_frame_test.py
index 1793ee95..2408353b 100644
--- a/test/knxip_tests/cemi_frame_test.py
+++ b/test/knxip_tests/cemi_frame_test.py
@@ -1,7 +1,5 @@
 """Tests for the CEMIFrame object."""
-from unittest.mock import MagicMock
-
-from pytest import fixture, raises
+from pytest import raises
 
 from xknx.dpt import DPTBinary
 from xknx.exceptions import ConversionError, CouldNotParseKNXIP, UnsupportedCEMIMessage
@@ -31,15 +29,9 @@ def get_data(code, adil, flags, src, dst, mpdu_len, tpci_apci, payload):
     )
 
 
-@fixture(name="frame")
-def fixture_frame():
-    """Fixture to get a simple mocked frame."""
-    xknx = MagicMock()
-    return CEMIFrame(xknx)
-
-
-def test_valid_command(frame):
+def test_valid_command():
     """Test for valid frame parsing."""
+    frame = CEMIFrame()
     packet_len = frame.from_knx(get_data(0x29, 0, 0, 0, 0, 1, 0, []))
     assert frame.code == CEMIMessageCode.L_DATA_IND
     assert frame.flags == 0
@@ -50,20 +42,23 @@ def test_valid_command(frame):
     assert packet_len == 11
 
 
-def test_invalid_tpci_apci(frame):
+def test_invalid_tpci_apci():
     """Test for invalid APCIService."""
+    frame = CEMIFrame()
     with raises(UnsupportedCEMIMessage, match=r".*APCI not supported: .*"):
         frame.from_knx_data_link_layer(get_data(0x29, 0, 0, 0, 0, 1, 0xFFC0, []))
 
 
-def test_invalid_apdu_len(frame):
+def test_invalid_apdu_len():
     """Test for invalid apdu len."""
+    frame = CEMIFrame()
     with raises(CouldNotParseKNXIP, match=r".*APDU LEN should be .*"):
         frame.from_knx(get_data(0x29, 0, 0, 0, 0, 2, 0, []))
 
 
-def test_invalid_src_addr(frame):
+def test_invalid_src_addr():
     """Test for invalid src addr."""
+    frame = CEMIFrame()
     frame.code = CEMIMessageCode.L_DATA_IND
     frame.flags = 0
     frame.mpdu_len = 1
@@ -75,8 +70,9 @@ def test_invalid_src_addr(frame):
         frame.to_knx()
 
 
-def test_invalid_dst_addr(frame):
+def test_invalid_dst_addr():
     """Test for invalid dst addr."""
+    frame = CEMIFrame()
     frame.code = CEMIMessageCode.L_DATA_IND
     frame.flags = 0
     frame.mpdu_len = 1
@@ -88,8 +84,9 @@ def test_invalid_dst_addr(frame):
         frame.to_knx()
 
 
-def test_invalid_payload(frame):
+def test_invalid_payload():
     """Test for having wrong payload set."""
+    frame = CEMIFrame()
     frame.code = CEMIMessageCode.L_DATA_IND
     frame.flags = 0
     frame.mpdu_len = 1
@@ -104,42 +101,48 @@ def test_invalid_payload(frame):
         frame.to_knx()
 
 
-def test_from_knx_with_not_handleable_cemi(frame):
+def test_from_knx_with_not_handleable_cemi():
     """Test for having unhandlebale cemi set."""
+    frame = CEMIFrame()
     with raises(UnsupportedCEMIMessage, match=r".*CEMIMessageCode not implemented:.*"):
         frame.from_knx(get_data(0x30, 0, 0, 0, 0, 2, 0, []))
 
 
-def test_from_knx_with_not_implemented_cemi(frame):
+def test_from_knx_with_not_implemented_cemi():
     """Test for having not implemented CEMI set."""
+    frame = CEMIFrame()
     with raises(UnsupportedCEMIMessage, match=r".*Could not handle CEMIMessageCode:.*"):
         frame.from_knx(
             get_data(CEMIMessageCode.L_BUSMON_IND.value, 0, 0, 0, 0, 2, 0, [])
         )
 
 
-def test_invalid_invalid_len(frame):
+def test_invalid_invalid_len():
     """Test for invalid cemi len."""
+    frame = CEMIFrame()
     with raises(UnsupportedCEMIMessage, match=r".*CEMI too small.*"):
         frame.from_knx_data_link_layer(get_data(0x29, 0, 0, 0, 0, 2, 0, [])[:5])
 
 
-def test_from_knx_group_address(frame):
+def test_from_knx_group_address():
     """Test conversion for a cemi with a group address as destination."""
+    frame = CEMIFrame()
     frame.from_knx(get_data(0x29, 0, 0x80, 0, 0, 1, 0, []))
 
     assert frame.dst_addr == GroupAddress(0)
 
 
-def test_from_knx_individual_address(frame):
+def test_from_knx_individual_address():
     """Test conversion for a cemi with a individual address as destination."""
+    frame = CEMIFrame()
     frame.from_knx(get_data(0x29, 0, 0x00, 0, 0, 1, 0, []))
 
     assert frame.dst_addr == IndividualAddress(0)
 
 
-def test_telegram_group_address(frame):
+def test_telegram_group_address():
     """Test telegram conversion flags with a group address."""
+    frame = CEMIFrame()
     frame.telegram = Telegram(destination_address=GroupAddress(0))
 
     assert (
@@ -147,8 +150,9 @@ def test_telegram_group_address(frame):
     ) == CEMIFlags.DESTINATION_GROUP_ADDRESS
 
 
-def test_telegram_individual_address(frame):
+def test_telegram_individual_address():
     """Test telegram conversion flags with a individual address."""
+    frame = CEMIFrame()
     frame.telegram = Telegram(destination_address=IndividualAddress(0))
 
     assert (
@@ -156,7 +160,8 @@ def test_telegram_individual_address(frame):
     ) == CEMIFlags.DESTINATION_INDIVIDUAL_ADDRESS
 
 
-def test_telegram_unsupported_address(frame):
+def test_telegram_unsupported_address():
     """Test telegram conversion flags with an unsupported address."""
+    frame = CEMIFrame()
     with raises(TypeError):
         frame.telegram = Telegram(destination_address=object())
diff --git a/test/knxip_tests/connect_request_test.py b/test/knxip_tests/connect_request_test.py
index e3a13828..7505ccf9 100644
--- a/test/knxip_tests/connect_request_test.py
+++ b/test/knxip_tests/connect_request_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP ConnectRequests."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import HPAI, ConnectRequest, ConnectRequestType, KNXIPFrame
 
@@ -15,8 +14,7 @@ class TestKNXIPConnectRequest:
             "06 10 02 05 00 1A 08 01 C0 A8 2A 01 84 95 08 01"
             "C0 A8 2A 01 CC A9 04 04 02 00"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, ConnectRequest)
@@ -27,7 +25,6 @@ class TestKNXIPConnectRequest:
         assert knxipframe.body.data_endpoint == HPAI(ip_addr="192.168.42.1", port=52393)
 
         connect_request = ConnectRequest(
-            xknx,
             request_type=ConnectRequestType.TUNNEL_CONNECTION,
             control_endpoint=HPAI(ip_addr="192.168.42.1", port=33941),
             data_endpoint=HPAI(ip_addr="192.168.42.1", port=52393),
@@ -42,8 +39,7 @@ class TestKNXIPConnectRequest:
             "06 10 02 05 00 1A 08 01 C0 A8 2A 01 84 95 08 01"
             "C0 A8 2A 01 CC A9 02 04 02 00"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
 
@@ -53,7 +49,6 @@ class TestKNXIPConnectRequest:
             "06 10 02 05 00 1A 08 01 C0 A8 2A 01 84 95 08 01"
             "C0 A8 2A 01 CC A9 04 04 02"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
diff --git a/test/knxip_tests/connect_response_test.py b/test/knxip_tests/connect_response_test.py
index e2cf9971..7c2323eb 100644
--- a/test/knxip_tests/connect_response_test.py
+++ b/test/knxip_tests/connect_response_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP ConnectResponses."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import HPAI, ConnectRequestType, ConnectResponse, ErrorCode, KNXIPFrame
 
@@ -14,8 +13,7 @@ class TestKNXIPConnectResponse:
         raw = bytes.fromhex(
             "06 10 02 06 00 14 01 00 08 01 C0 A8 2A 0A 0E 57 04 04 11 FF"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         assert isinstance(knxipframe.body, ConnectResponse)
         assert knxipframe.body.communication_channel == 1
@@ -25,7 +23,6 @@ class TestKNXIPConnectResponse:
         assert knxipframe.body.identifier == 4607
 
         connect_response = ConnectResponse(
-            xknx,
             communication_channel=1,
             status_code=ErrorCode.E_NO_ERROR,
             request_type=ConnectRequestType.TUNNEL_CONNECTION,
@@ -41,16 +38,14 @@ class TestKNXIPConnectResponse:
         raw = bytes.fromhex(
             "06 10 02 06 00 14 01 00 08 01 C0 A8 2A 0A 0E 57 03 04 11 FF"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
 
     def test_from_knx_wrong_crd2(self):
         """Test parsing and streaming wrong ConnectRequest (wrong CRD length)."""
         raw = bytes.fromhex("06 10 02 06 00 14 01 00 08 01 C0 A8 2A 0A 0E 57 04 04")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
 
@@ -63,15 +58,13 @@ class TestKNXIPConnectResponse:
         raw = bytes.fromhex(
             "06 10 02 06 00 14 C0 24 08 01 0A 01 00 29 0E 57 04 04 00 00"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         assert isinstance(knxipframe.body, ConnectResponse)
         assert knxipframe.body.status_code == ErrorCode.E_NO_MORE_CONNECTIONS
         assert knxipframe.body.communication_channel == 192
 
         connect_response = ConnectResponse(
-            xknx,
             communication_channel=192,
             status_code=ErrorCode.E_NO_MORE_CONNECTIONS,
             request_type=ConnectRequestType.TUNNEL_CONNECTION,
@@ -91,8 +84,7 @@ class TestKNXIPConnectResponse:
         raw = bytes.fromhex(
             "06 10 02 06 00 14 00 24 08 01 C0 A8 01 01 0E 57 00 00 00 00"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         assert isinstance(knxipframe.body, ConnectResponse)
         assert knxipframe.body.status_code == ErrorCode.E_NO_MORE_CONNECTIONS
@@ -107,8 +99,7 @@ class TestKNXIPConnectResponse:
         HPAI and CRD all zero. This was received from MDT device (2020).
         """
         raw = bytes.fromhex("06 10 02 06 00 08 00 24 00 00 00 00 00 00 00 00 00 00")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         assert isinstance(knxipframe.body, ConnectResponse)
         assert knxipframe.body.status_code == ErrorCode.E_NO_MORE_CONNECTIONS
diff --git a/test/knxip_tests/connectionstate_request_test.py b/test/knxip_tests/connectionstate_request_test.py
index 04b07f50..886861ac 100644
--- a/test/knxip_tests/connectionstate_request_test.py
+++ b/test/knxip_tests/connectionstate_request_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP ConnectionStateRequests."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import HPAI, ConnectionStateRequest, KNXIPFrame
 
@@ -12,8 +11,7 @@ class TestKNXIPConnectionStateRequest:
     def test_connection_state_request(self):
         """Test parsing and streaming connection state request KNX/IP packet."""
         raw = bytes.fromhex("06 10 02 07 00 10 15 00 08 01 C0 A8 C8 0C C3 B4")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, ConnectionStateRequest)
@@ -24,7 +22,6 @@ class TestKNXIPConnectionStateRequest:
         )
 
         connectionstate_request = ConnectionStateRequest(
-            xknx,
             communication_channel_id=21,
             control_endpoint=HPAI(ip_addr="192.168.200.12", port=50100),
         )
@@ -35,7 +32,6 @@ class TestKNXIPConnectionStateRequest:
     def test_from_knx_wrong_info(self):
         """Test parsing and streaming wrong ConnectionStateRequest."""
         raw = bytes((0x06, 0x10, 0x02, 0x07, 0x00, 0x010))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
diff --git a/test/knxip_tests/connectionstate_response_test.py b/test/knxip_tests/connectionstate_response_test.py
index 0007d5b7..b1dc1fc0 100644
--- a/test/knxip_tests/connectionstate_response_test.py
+++ b/test/knxip_tests/connectionstate_response_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP ConnectionStateResponses."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import ConnectionStateResponse, ErrorCode, KNXIPFrame
 
@@ -12,8 +11,7 @@ class TestKNXIPConnectionStateResponse:
     def test_disconnect_response(self):
         """Test parsing and streaming connection state response KNX/IP packet."""
         raw = bytes((0x06, 0x10, 0x02, 0x08, 0x00, 0x08, 0x15, 0x21))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, ConnectionStateResponse)
@@ -22,7 +20,8 @@ class TestKNXIPConnectionStateResponse:
         assert knxipframe.body.status_code == ErrorCode.E_CONNECTION_ID
 
         connectionstate_response = ConnectionStateResponse(
-            xknx, communication_channel_id=21, status_code=ErrorCode.E_CONNECTION_ID
+            communication_channel_id=21,
+            status_code=ErrorCode.E_CONNECTION_ID,
         )
         knxipframe2 = KNXIPFrame.init_from_body(connectionstate_response)
 
@@ -31,7 +30,6 @@ class TestKNXIPConnectionStateResponse:
     def test_from_knx_wrong_header(self):
         """Test parsing and streaming wrong ConnectionStateResponse (wrong header length)."""
         raw = bytes((0x06, 0x10, 0x02, 0x08, 0x00, 0x08, 0x15))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
diff --git a/test/knxip_tests/description_request_test.py b/test/knxip_tests/description_request_test.py
index 72e029e4..798171a2 100644
--- a/test/knxip_tests/description_request_test.py
+++ b/test/knxip_tests/description_request_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP DescriptionRequest objects."""
-from xknx import XKNX
 from xknx.knxip import HPAI, DescriptionRequest, KNXIPFrame
 
 
@@ -9,17 +8,14 @@ class TestKNXIPDescriptionRequest:
     def test_description_request(self):
         """Test parsing and streaming DescriptionRequest KNX/IP packet."""
         raw = bytes.fromhex("06 10 02 03 00 0E 08 01 7F 00 00 02 0E 57")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, DescriptionRequest)
         assert knxipframe.body.control_endpoint == HPAI(ip_addr="127.0.0.2", port=3671)
 
         knxipframe2 = KNXIPFrame.init_from_body(
-            DescriptionRequest(
-                xknx, control_endpoint=HPAI(ip_addr="127.0.0.2", port=3671)
-            )
+            DescriptionRequest(control_endpoint=HPAI(ip_addr="127.0.0.2", port=3671))
         )
 
         assert knxipframe2.to_knx() == raw
diff --git a/test/knxip_tests/description_response_test.py b/test/knxip_tests/description_response_test.py
index 6cbd177a..8e00bf8e 100644
--- a/test/knxip_tests/description_response_test.py
+++ b/test/knxip_tests/description_response_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP DescriptionResponse objects."""
-from xknx import XKNX
 from xknx.knxip import (
     DescriptionResponse,
     DIBDeviceInformation,
@@ -21,8 +20,7 @@ class TestKNXIPDescriptionResponse:
             "00 00 00 00 00 00 00 00 00 00 00 00 0c 02 02 02"
             "03 02 04 02 05 02 07 01",
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         assert knxipframe.from_knx(raw) == 72
         assert knxipframe.to_knx() == raw
 
@@ -45,7 +43,7 @@ class TestKNXIPDescriptionResponse:
         )
         assert not knxipframe.body.dibs[1].supports(DIBServiceFamily.OBJECT_SERVER)
 
-        description_response = DescriptionResponse(xknx)
+        description_response = DescriptionResponse()
         description_response.dibs.append(knxipframe.body.dibs[0])
         description_response.dibs.append(knxipframe.body.dibs[1])
         knxipframe2 = KNXIPFrame.init_from_body(description_response)
@@ -54,6 +52,5 @@ class TestKNXIPDescriptionResponse:
 
     def test_unknown_device_name(self):
         """Test device_name if no DIBDeviceInformation is present."""
-        xknx = XKNX()
-        description_response = DescriptionResponse(xknx)
+        description_response = DescriptionResponse()
         assert description_response.device_name == "UNKNOWN"
diff --git a/test/knxip_tests/disconnect_request_test.py b/test/knxip_tests/disconnect_request_test.py
index 1d298a51..a5d51c12 100644
--- a/test/knxip_tests/disconnect_request_test.py
+++ b/test/knxip_tests/disconnect_request_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP DisconnectRequest objects."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import HPAI, DisconnectRequest, KNXIPFrame
 
@@ -12,8 +11,7 @@ class TestKNXIPDisconnectRequest:
     def test_disconnect_request(self):
         """Test parsing and streaming DisconnectRequest KNX/IP packet."""
         raw = bytes.fromhex("06 10 02 09 00 10 15 00 08 01 C0 A8 C8 0C C3 B4")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, DisconnectRequest)
@@ -24,7 +22,6 @@ class TestKNXIPDisconnectRequest:
         )
 
         disconnect_request = DisconnectRequest(
-            xknx,
             communication_channel_id=21,
             control_endpoint=HPAI(ip_addr="192.168.200.12", port=50100),
         )
@@ -35,7 +32,6 @@ class TestKNXIPDisconnectRequest:
     def test_from_knx_wrong_length(self):
         """Test parsing and streaming wrong DisconnectRequest."""
         raw = bytes((0x06, 0x10, 0x02, 0x09, 0x00, 0x10))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
diff --git a/test/knxip_tests/disconnect_response_test.py b/test/knxip_tests/disconnect_response_test.py
index e712ea1b..fb47c4aa 100644
--- a/test/knxip_tests/disconnect_response_test.py
+++ b/test/knxip_tests/disconnect_response_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP DisconnectResponse objects."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import DisconnectResponse, ErrorCode, KNXIPFrame
 
@@ -12,8 +11,7 @@ class TestKNXIPDisconnectResponse:
     def test_disconnect_response(self):
         """Test parsing and streaming DisconnectResponse KNX/IP packet."""
         raw = bytes((0x06, 0x10, 0x02, 0x0A, 0x00, 0x08, 0x15, 0x25))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, DisconnectResponse)
@@ -22,7 +20,6 @@ class TestKNXIPDisconnectResponse:
         assert knxipframe.body.status_code == ErrorCode.E_NO_MORE_UNIQUE_CONNECTIONS
 
         disconnect_response = DisconnectResponse(
-            xknx,
             communication_channel_id=21,
             status_code=ErrorCode.E_NO_MORE_UNIQUE_CONNECTIONS,
         )
@@ -33,7 +30,6 @@ class TestKNXIPDisconnectResponse:
     def test_from_knx_wrong_length(self):
         """Test parsing and streaming wrong DisconnectResponse."""
         raw = bytes((0x06, 0x10, 0x02, 0x0A, 0x00, 0x08, 0x15))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
diff --git a/test/knxip_tests/header_test.py b/test/knxip_tests/header_test.py
index 333a5f12..1ae23949 100644
--- a/test/knxip_tests/header_test.py
+++ b/test/knxip_tests/header_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP TunnellingAck objects."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import DisconnectRequest, KNXIPHeader, KNXIPServiceType
 
@@ -23,9 +22,8 @@ class TestKNXIPHeader:
 
     def test_set_length(self):
         """Test setting length."""
-        xknx = XKNX()
         header = KNXIPHeader()
-        header.set_length(DisconnectRequest(xknx))
+        header.set_length(DisconnectRequest())
         # 6 (header) + 2 + 8 (HPAI length)
         assert header.total_length == 16
 
diff --git a/test/knxip_tests/knxip_test.py b/test/knxip_tests/knxip_test.py
index bba427c6..c20ce49c 100644
--- a/test/knxip_tests/knxip_test.py
+++ b/test/knxip_tests/knxip_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP base class."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP, IncompleteKNXIPFrame
 from xknx.knxip import KNXIPFrame
 from xknx.knxip.knxip_enum import KNXIPServiceType
@@ -12,8 +11,7 @@ class TestKNXIPFrame:
 
     def test_wrong_init(self):
         """Testing init method with wrong service_type_ident."""
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(AttributeError):
             knxipframe.init(23)
 
@@ -23,8 +21,7 @@ class TestKNXIPFrame:
 
     def test_double_frame(self):
         """Test parsing KNX/IP frame from streaming data containing two frames."""
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         raw = bytes.fromhex(
             "06 10 04 20 00 15 04 02 51 00 29 00 bc e0 10 fa"
             "09 2d 01 00 80"
@@ -37,14 +34,12 @@ class TestKNXIPFrame:
     def test_parsing_too_short_knxip(self):
         """Test parsing and streaming connection state request KNX/IP packet."""
         raw = bytes.fromhex("06 10 02 07 00 10 15 00 08 01 C0 A8 C8 0C C3")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(IncompleteKNXIPFrame):
             knxipframe.from_knx(raw)
 
     def test_to_knx_no_body(self):
         """Test to_knx method without body raises exception."""
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.to_knx()
diff --git a/test/knxip_tests/routing_indication_test.py b/test/knxip_tests/routing_indication_test.py
index faa4ef6f..609d880b 100644
--- a/test/knxip_tests/routing_indication_test.py
+++ b/test/knxip_tests/routing_indication_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP RountingIndication objects."""
 import time
 
-from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary, DPTTemperature, DPTTime
 from xknx.knxip import CEMIFrame, KNXIPFrame, KNXIPServiceType, RoutingIndication
 from xknx.telegram import GroupAddress, IndividualAddress, Telegram
@@ -14,8 +13,7 @@ class TestKNXIPRountingIndication:
     def test_from_knx(self):
         """Test parsing and streaming CEMIFrame KNX/IP packet (payload=0xf0)."""
         raw = bytes.fromhex("06 10 05 30 00 12 29 00 bc d0 12 02 01 51 02 00 40 f0")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, RoutingIndication)
@@ -30,9 +28,7 @@ class TestKNXIPRountingIndication:
     def test_from_knx_to_knx(self):
         """Test parsing and streaming CEMIFrame KNX/IP."""
         raw = bytes.fromhex("06 10 05 30 00 12 29 00 bc d0 12 02 01 51 02 00 40 f0")
-        xknx = XKNX()
-
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert knxipframe.header.to_knx() == raw[0:6]
@@ -41,18 +37,16 @@ class TestKNXIPRountingIndication:
 
     def test_telegram_set(self):
         """Test parsing and streaming CEMIFrame KNX/IP packet with DPTArray/DPTTime as payload."""
-        xknx = XKNX()
-
         telegram = Telegram(
             destination_address=GroupAddress(337),
             payload=GroupValueWrite(
                 DPTArray(DPTTime().to_knx(time.strptime("13:23:42", "%H:%M:%S")))
             ),
         )
-        cemi = CEMIFrame(xknx, src_addr=IndividualAddress("1.2.2"))
+        cemi = CEMIFrame(src_addr=IndividualAddress("1.2.2"))
         cemi.telegram = telegram
         cemi.set_hops(5)
-        routing_indication = RoutingIndication(xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         knxipframe = KNXIPFrame.init_from_body(routing_indication)
 
         raw = bytes.fromhex(
@@ -66,8 +60,7 @@ class TestKNXIPRountingIndication:
     def test_telegram_get(self):
         """Test parsing and streaming CEMIFrame KNX/IP packet, group read."""
         raw = bytes.fromhex("06 10 05 30 00 12 29 00 bc d0 12 02 01 51 02 00 40 f0")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         telegram = knxipframe.body.cemi.telegram
@@ -89,8 +82,7 @@ class TestKNXIPRountingIndication:
         """Test parsing and streaming CEMIFrame KNX/IP packet, switch on light in my kitchen."""
         # Switch on Kitchen-L1
         raw = bytes.fromhex("06 10 05 30 00 11 29 00 bc d0 ff f9 01 49 01 00 81")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         telegram = knxipframe.body.cemi.telegram
         assert telegram == Telegram(
@@ -99,10 +91,10 @@ class TestKNXIPRountingIndication:
             source_address=IndividualAddress("15.15.249"),
         )
 
-        cemi = CEMIFrame(xknx, src_addr=IndividualAddress("15.15.249"))
+        cemi = CEMIFrame(src_addr=IndividualAddress("15.15.249"))
         cemi.telegram = telegram
         cemi.set_hops(5)
-        routing_indication = RoutingIndication(xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         knxipframe2 = KNXIPFrame.init_from_body(routing_indication)
 
         assert knxipframe2.header.to_knx() == raw[0:6]
@@ -113,8 +105,7 @@ class TestKNXIPRountingIndication:
         """Test parsing and streaming CEMIFrame KNX/IP packet, switch off light in my kitchen."""
         # Switch off Kitchen-L1
         raw = bytes.fromhex("06 10 05 30 00 11 29 00 bc d0 ff f9 01 49 01 00 80")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         telegram = knxipframe.body.cemi.telegram
         assert telegram == Telegram(
@@ -123,10 +114,10 @@ class TestKNXIPRountingIndication:
             source_address=IndividualAddress("15.15.249"),
         )
 
-        cemi = CEMIFrame(xknx, src_addr=IndividualAddress("15.15.249"))
+        cemi = CEMIFrame(src_addr=IndividualAddress("15.15.249"))
         cemi.telegram = telegram
         cemi.set_hops(5)
-        routing_indication = RoutingIndication(xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         knxipframe2 = KNXIPFrame.init_from_body(routing_indication)
 
         assert knxipframe2.header.to_knx() == raw[0:6]
@@ -137,8 +128,7 @@ class TestKNXIPRountingIndication:
         """Test parsing and streaming CEMIFrame KNX/IP packet, dimm light in my kitchen."""
         # Dimm Kitchen L1 to 0x65
         raw = bytes.fromhex("06 10 05 30 00 12 29 00 bc d0 ff f9 01 4b 02 00 80 65")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         telegram = knxipframe.body.cemi.telegram
         assert telegram == Telegram(
@@ -147,10 +137,10 @@ class TestKNXIPRountingIndication:
             source_address=IndividualAddress("15.15.249"),
         )
 
-        cemi = CEMIFrame(xknx, src_addr=IndividualAddress("15.15.249"))
+        cemi = CEMIFrame(src_addr=IndividualAddress("15.15.249"))
         cemi.telegram = telegram
         cemi.set_hops(5)
-        routing_indication = RoutingIndication(xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         knxipframe2 = KNXIPFrame.init_from_body(routing_indication)
 
         assert knxipframe2.header.to_knx() == raw[0:6]
@@ -161,8 +151,7 @@ class TestKNXIPRountingIndication:
         """Test parsing and streaming CEMIFrame KNX/IP packet, setting value of thermostat."""
         # Incoming Temperature from thermostat
         raw = bytes.fromhex("06 10 05 30 00 13 29 00 bc d0 14 02 08 01 03 00 80 07 c1")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         telegram = knxipframe.body.cemi.telegram
         assert telegram == Telegram(
@@ -171,10 +160,10 @@ class TestKNXIPRountingIndication:
             source_address=IndividualAddress("1.4.2"),
         )
 
-        cemi = CEMIFrame(xknx, src_addr=IndividualAddress("1.4.2"))
+        cemi = CEMIFrame(src_addr=IndividualAddress("1.4.2"))
         cemi.telegram = telegram
         cemi.set_hops(5)
-        routing_indication = RoutingIndication(xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         knxipframe2 = KNXIPFrame.init_from_body(routing_indication)
 
         assert knxipframe2.header.to_knx() == raw[0:6]
@@ -185,8 +174,7 @@ class TestKNXIPRountingIndication:
         """Test parsing and streaming CEMIFrame KNX/IP packet, group read."""
         # State request
         raw = bytes.fromhex("06 10 05 30 00 11 29 00 bc d0 ff f9 01 b8 01 00 00")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         telegram = knxipframe.body.cemi.telegram
         assert telegram == Telegram(
@@ -195,10 +183,10 @@ class TestKNXIPRountingIndication:
             source_address=IndividualAddress("15.15.249"),
         )
 
-        cemi = CEMIFrame(xknx, src_addr=IndividualAddress("15.15.249"))
+        cemi = CEMIFrame(src_addr=IndividualAddress("15.15.249"))
         cemi.telegram = telegram
         cemi.set_hops(5)
-        routing_indication = RoutingIndication(xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         knxipframe2 = KNXIPFrame.init_from_body(routing_indication)
 
         assert knxipframe2.header.to_knx() == raw[0:6]
@@ -209,8 +197,7 @@ class TestKNXIPRountingIndication:
         """Test parsing and streaming CEMIFrame KNX/IP packet, group response."""
         # Incoming state
         raw = bytes.fromhex("06 10 05 30 00 11 29 00 bc d0 13 01 01 88 01 00 41")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
         telegram = knxipframe.body.cemi.telegram
         assert telegram == Telegram(
@@ -219,10 +206,10 @@ class TestKNXIPRountingIndication:
             source_address=IndividualAddress("1.3.1"),
         )
 
-        cemi = CEMIFrame(xknx, src_addr=IndividualAddress("1.3.1"))
+        cemi = CEMIFrame(src_addr=IndividualAddress("1.3.1"))
         cemi.telegram = telegram
         cemi.set_hops(5)
-        routing_indication = RoutingIndication(xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         knxipframe2 = KNXIPFrame.init_from_body(routing_indication)
 
         assert knxipframe2.header.to_knx() == raw[0:6]
@@ -236,26 +223,24 @@ class TestKNXIPRountingIndication:
             payload=GroupValueWrite(DPTBinary(DPTBinary.APCI_MAX_VALUE)),
             source_address=IndividualAddress("1.3.1"),
         )
-        xknx = XKNX()
 
-        cemi = CEMIFrame(xknx, src_addr=IndividualAddress("1.3.1"))
+        cemi = CEMIFrame(src_addr=IndividualAddress("1.3.1"))
         cemi.telegram = telegram
         cemi.set_hops(5)
-        routing_indication = RoutingIndication(xknx, cemi=cemi)
+        routing_indication = RoutingIndication(cemi=cemi)
         knxipframe = KNXIPFrame.init_from_body(routing_indication)
 
         raw = bytes.fromhex("06 10 05 30 00 11 29 00 bc d0 13 01 01 51 01 00 bf")
 
         assert knxipframe.to_knx() == raw
 
-        knxipframe2 = KNXIPFrame(xknx)
+        knxipframe2 = KNXIPFrame()
         knxipframe2.init(KNXIPServiceType.ROUTING_INDICATION)
         knxipframe2.from_knx(knxipframe.to_knx())
         assert knxipframe2.body.cemi.telegram == telegram
 
     def test_from_knx_invalid_cemi(self):
         """Test parsing and streaming CEMIFrame KNX/IP packet with unsupported CEMICode."""
-        xknx = XKNX()
-        routing_indication = RoutingIndication(xknx)
+        routing_indication = RoutingIndication()
         raw = bytes([43, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0])
         assert routing_indication.from_knx(raw) == 11
diff --git a/test/knxip_tests/search_request_extended_test.py b/test/knxip_tests/search_request_extended_test.py
index 59b3287c..e76e0161 100644
--- a/test/knxip_tests/search_request_extended_test.py
+++ b/test/knxip_tests/search_request_extended_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SearchRequest Extended objects."""
-from xknx import XKNX
 from xknx.knxip import HPAI, KNXIPFrame, SearchRequestExtended
 from xknx.knxip.srp import SRP
 
@@ -10,8 +9,7 @@ class TestKNXIPSearchRequestExtended:
     def test_search_request_extended(self):
         """Test parsing and streaming SearchRequest Extended KNX/IP packet."""
         raw = bytes.fromhex("06 10 02 0b 00 0e 08 01 e0 00 17 0C 0E 57")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SearchRequestExtended)
@@ -21,7 +19,7 @@ class TestKNXIPSearchRequestExtended:
 
         knxipframe2 = KNXIPFrame.init_from_body(
             SearchRequestExtended(
-                xknx, discovery_endpoint=HPAI(ip_addr="224.0.23.12", port=3671)
+                discovery_endpoint=HPAI(ip_addr="224.0.23.12", port=3671)
             )
         )
 
@@ -30,8 +28,7 @@ class TestKNXIPSearchRequestExtended:
     def test_search_request_extended_srp(self):
         """Test parsing and streaming SearchRequest Extended with SRPs KNX/IP packet."""
         raw = bytes.fromhex("06 10 02 0b 00 10 08 01 e0 00 17 0c 0e 57 02 81")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SearchRequestExtended)
@@ -43,9 +40,8 @@ class TestKNXIPSearchRequestExtended:
 
         knxipframe2 = KNXIPFrame.init_from_body(
             SearchRequestExtended(
-                xknx,
-                srps=[SRP.with_programming_mode()],
                 discovery_endpoint=HPAI(ip_addr="224.0.23.12", port=3671),
+                srps=[SRP.with_programming_mode()],
             )
         )
 
@@ -56,8 +52,7 @@ class TestKNXIPSearchRequestExtended:
         raw = bytes.fromhex(
             "06 10 02 0b 00 18 08 01 e0 00 17 0c 0e 57 02 81 08 82 01 02 03 04 05 06"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SearchRequestExtended)
@@ -72,12 +67,11 @@ class TestKNXIPSearchRequestExtended:
 
         knxipframe2 = KNXIPFrame.init_from_body(
             SearchRequestExtended(
-                xknx,
+                discovery_endpoint=HPAI(ip_addr="224.0.23.12", port=3671),
                 srps=[
                     SRP.with_programming_mode(),
                     SRP.with_mac_address(bytes([1, 2, 3, 4, 5, 6])),
                 ],
-                discovery_endpoint=HPAI(ip_addr="224.0.23.12", port=3671),
             )
         )
 
diff --git a/test/knxip_tests/search_request_test.py b/test/knxip_tests/search_request_test.py
index 169dd5ac..74da66bc 100644
--- a/test/knxip_tests/search_request_test.py
+++ b/test/knxip_tests/search_request_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SearchRequest objects."""
-from xknx import XKNX
 from xknx.knxip import HPAI, KNXIPFrame, SearchRequest
 
 
@@ -9,8 +8,7 @@ class TestKNXIPSearchRequest:
     def test_search_request(self):
         """Test parsing and streaming SearchRequest KNX/IP packet."""
         raw = bytes.fromhex("06 10 02 01 00 0E 08 01 E0 00 17 0C 0E 57")
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SearchRequest)
@@ -19,9 +17,7 @@ class TestKNXIPSearchRequest:
         )
 
         knxipframe2 = KNXIPFrame.init_from_body(
-            SearchRequest(
-                xknx, discovery_endpoint=HPAI(ip_addr="224.0.23.12", port=3671)
-            )
+            SearchRequest(discovery_endpoint=HPAI(ip_addr="224.0.23.12", port=3671))
         )
 
         assert knxipframe2.to_knx() == raw
diff --git a/test/knxip_tests/search_response_extended_test.py b/test/knxip_tests/search_response_extended_test.py
index 7ca8352b..ed45111a 100644
--- a/test/knxip_tests/search_response_extended_test.py
+++ b/test/knxip_tests/search_response_extended_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SearchResponseExtended objects."""
-from xknx import XKNX
 from xknx.knxip import (
     HPAI,
     DIBDeviceInformation,
@@ -22,8 +21,7 @@ class TestKNXIPSearchResponseExtended:
             "50 2D 52 6F 75 74 65 72 00 00 00 00 00 00 00 00"
             "00 00 00 00 0C 02 02 01 03 02 04 01 05 01 07 01"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         assert knxipframe.from_knx(raw) == 80
         assert knxipframe.to_knx() == raw
 
@@ -41,7 +39,7 @@ class TestKNXIPSearchResponseExtended:
         assert not knxipframe.body.dibs[1].supports(DIBServiceFamily.OBJECT_SERVER)
 
         search_response = SearchResponseExtended(
-            xknx, control_endpoint=HPAI(ip_addr="192.168.42.10", port=3671)
+            control_endpoint=HPAI(ip_addr="192.168.42.10", port=3671)
         )
         search_response.dibs.append(knxipframe.body.dibs[0])
         search_response.dibs.append(knxipframe.body.dibs[1])
@@ -51,6 +49,5 @@ class TestKNXIPSearchResponseExtended:
 
     def test_unknown_device_name(self):
         """Test device_name if no DIBDeviceInformation is present."""
-        xknx = XKNX()
-        search_response = SearchResponseExtended(xknx)
+        search_response = SearchResponseExtended()
         assert search_response.device_name == "UNKNOWN"
diff --git a/test/knxip_tests/search_response_test.py b/test/knxip_tests/search_response_test.py
index 06f65846..c3c766ab 100644
--- a/test/knxip_tests/search_response_test.py
+++ b/test/knxip_tests/search_response_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SearchResponse objects."""
-from xknx import XKNX
 from xknx.knxip import (
     HPAI,
     DIBDeviceInformation,
@@ -22,8 +21,7 @@ class TestKNXIPSearchResponse:
             "50 2D 52 6F 75 74 65 72 00 00 00 00 00 00 00 00"
             "00 00 00 00 0C 02 02 01 03 02 04 01 05 01 07 01"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         assert knxipframe.from_knx(raw) == 80
         assert knxipframe.to_knx() == raw
 
@@ -41,7 +39,7 @@ class TestKNXIPSearchResponse:
         assert not knxipframe.body.dibs[1].supports(DIBServiceFamily.OBJECT_SERVER)
 
         search_response = SearchResponse(
-            xknx, control_endpoint=HPAI(ip_addr="192.168.42.10", port=3671)
+            control_endpoint=HPAI(ip_addr="192.168.42.10", port=3671)
         )
         search_response.dibs.append(knxipframe.body.dibs[0])
         search_response.dibs.append(knxipframe.body.dibs[1])
@@ -51,6 +49,5 @@ class TestKNXIPSearchResponse:
 
     def test_unknown_device_name(self):
         """Test device_name if no DIBDeviceInformation is present."""
-        xknx = XKNX()
-        search_response = SearchResponse(xknx)
+        search_response = SearchResponse()
         assert search_response.device_name == "UNKNOWN"
diff --git a/test/knxip_tests/secure_wrapper_test.py b/test/knxip_tests/secure_wrapper_test.py
index 43f1b0c7..98569a44 100644
--- a/test/knxip_tests/secure_wrapper_test.py
+++ b/test/knxip_tests/secure_wrapper_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SecureWrapper objects."""
-from xknx import XKNX
 from xknx.knxip import KNXIPFrame, SecureWrapper
 
 
@@ -30,8 +29,7 @@ class TestKNXIPSecureWrapper:
             + encrypted_data
             + message_authentication_code
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SecureWrapper)
@@ -47,7 +45,6 @@ class TestKNXIPSecureWrapper:
         assert knxipframe.to_knx() == raw
 
         secure_wrapper = SecureWrapper(
-            xknx,
             secure_session_id=1,
             sequence_information=sequence_number,
             serial_number=knx_serial_number,
diff --git a/test/knxip_tests/session_authenticate_test.py b/test/knxip_tests/session_authenticate_test.py
index 93689cb1..183631ad 100644
--- a/test/knxip_tests/session_authenticate_test.py
+++ b/test/knxip_tests/session_authenticate_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SessionAuthenticate objects."""
-from xknx import XKNX
 from xknx.knxip import KNXIPFrame, SessionAuthenticate
 
 
@@ -16,8 +15,7 @@ class TestKNXIPSessionAuthenticate:
             bytes.fromhex("06 10 09 53 00 18" "00 01")  # KNXnet/IP header  # User ID
             + message_authentication_code
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SessionAuthenticate)
@@ -29,7 +27,6 @@ class TestKNXIPSessionAuthenticate:
         assert knxipframe.to_knx() == raw
 
         session_authenticate = SessionAuthenticate(
-            xknx,
             user_id=1,
             message_authentication_code=message_authentication_code,
         )
diff --git a/test/knxip_tests/session_request_test.py b/test/knxip_tests/session_request_test.py
index b4d042a2..2241ea3a 100644
--- a/test/knxip_tests/session_request_test.py
+++ b/test/knxip_tests/session_request_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SessionRequest objects."""
-from xknx import XKNX
 from xknx.knxip import HPAI, KNXIPFrame, SessionRequest
 from xknx.knxip.knxip_enum import HostProtocol
 
@@ -22,8 +21,7 @@ class TestKNXIPSessionRequest:
             )
             + public_key
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SessionRequest)
@@ -32,7 +30,7 @@ class TestKNXIPSessionRequest:
 
         assert knxipframe.to_knx() == raw
 
-        session_request = SessionRequest(xknx, ecdh_client_public_key=public_key)
+        session_request = SessionRequest(ecdh_client_public_key=public_key)
         knxipframe2 = KNXIPFrame.init_from_body(session_request)
 
         assert knxipframe2.to_knx() == raw
diff --git a/test/knxip_tests/session_response_test.py b/test/knxip_tests/session_response_test.py
index c07dc421..a0571da6 100644
--- a/test/knxip_tests/session_response_test.py
+++ b/test/knxip_tests/session_response_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SessionResponse objects."""
-from xknx import XKNX
 from xknx.knxip import KNXIPFrame, SessionResponse
 
 
@@ -26,8 +25,7 @@ class TestKNXIPSessionResponse:
             + public_key
             + message_authentication_code
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SessionResponse)
@@ -40,7 +38,6 @@ class TestKNXIPSessionResponse:
         assert knxipframe.to_knx() == raw
 
         session_response = SessionResponse(
-            xknx,
             secure_session_id=1,
             ecdh_server_public_key=public_key,
             message_authentication_code=message_authentication_code,
diff --git a/test/knxip_tests/session_status_test.py b/test/knxip_tests/session_status_test.py
index 61a2c9c3..e423530d 100644
--- a/test/knxip_tests/session_status_test.py
+++ b/test/knxip_tests/session_status_test.py
@@ -1,5 +1,4 @@
 """Unit test for KNX/IP SessionStatus objects."""
-from xknx import XKNX
 from xknx.knxip import KNXIPFrame, SessionStatus
 from xknx.knxip.knxip_enum import SecureSessionStatusCode
 
@@ -14,8 +13,7 @@ class TestKNXIPSessionStatus:
             "00"  # status code 00h STATUS_AUTHENTICATION_SUCCESS
             "00"  # reserved
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, SessionStatus)
@@ -27,8 +25,7 @@ class TestKNXIPSessionStatus:
         assert knxipframe.to_knx() == raw
 
         session_status = SessionStatus(
-            xknx,
-            status=SecureSessionStatusCode.STATUS_AUTHENTICATION_SUCCESS,
+            status=SecureSessionStatusCode.STATUS_AUTHENTICATION_SUCCESS
         )
         knxipframe2 = KNXIPFrame.init_from_body(session_status)
 
diff --git a/test/knxip_tests/tunnelling_ack_test.py b/test/knxip_tests/tunnelling_ack_test.py
index 332a16a9..59998c72 100644
--- a/test/knxip_tests/tunnelling_ack_test.py
+++ b/test/knxip_tests/tunnelling_ack_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP TunnellingAck objects."""
 import pytest
 
-from xknx import XKNX
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import ErrorCode, KNXIPFrame, TunnellingAck
 
@@ -12,8 +11,7 @@ class TestKNXIPTunnellingAck:
     def test_connect_request(self):
         """Test parsing and streaming tunneling ACK KNX/IP packet."""
         raw = bytes((0x06, 0x10, 0x04, 0x21, 0x00, 0x0A, 0x04, 0x2A, 0x17, 0x00))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, TunnellingAck)
@@ -22,7 +20,8 @@ class TestKNXIPTunnellingAck:
         assert knxipframe.body.status_code == ErrorCode.E_NO_ERROR
 
         tunnelling_ack = TunnellingAck(
-            xknx, communication_channel_id=42, sequence_counter=23
+            communication_channel_id=42,
+            sequence_counter=23,
         )
         knxipframe2 = KNXIPFrame.init_from_body(tunnelling_ack)
 
@@ -31,15 +30,13 @@ class TestKNXIPTunnellingAck:
     def test_from_knx_wrong_ack_information(self):
         """Test parsing and streaming wrong TunnellingAck (wrong length byte)."""
         raw = bytes((0x06, 0x10, 0x04, 0x21, 0x00, 0x0A, 0x03, 0x2A, 0x17, 0x00))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
 
     def test_from_knx_wrong_ack_information2(self):
         """Test parsing and streaming wrong TunnellingAck (wrong length)."""
         raw = bytes((0x06, 0x10, 0x04, 0x21, 0x00, 0x0A, 0x04, 0x2A, 0x17))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
diff --git a/test/knxip_tests/tunnelling_request_test.py b/test/knxip_tests/tunnelling_request_test.py
index 7f94f5df..597af1eb 100644
--- a/test/knxip_tests/tunnelling_request_test.py
+++ b/test/knxip_tests/tunnelling_request_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP TunnellingRequest objects."""
 import pytest
 
-from xknx import XKNX
 from xknx.dpt import DPTBinary
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import CEMIFrame, CEMIMessageCode, KNXIPFrame, TunnellingRequest
@@ -17,8 +16,7 @@ class TestKNXIPTunnellingRequest:
         raw = bytes.fromhex(
             "06 10 04 20 00 15 04 01 17 00 11 00 BC E0 00 00 48 08 01 00 81"
         )
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.from_knx(raw)
 
         assert isinstance(knxipframe.body, TunnellingRequest)
@@ -31,13 +29,15 @@ class TestKNXIPTunnellingRequest:
             payload=GroupValueWrite(DPTBinary(1)),
         )
 
-        cemi = CEMIFrame(xknx, code=CEMIMessageCode.L_DATA_REQ)
+        cemi = CEMIFrame(code=CEMIMessageCode.L_DATA_REQ)
         cemi.telegram = Telegram(
             destination_address=GroupAddress("9/0/8"),
             payload=GroupValueWrite(DPTBinary(1)),
         )
         tunnelling_request = TunnellingRequest(
-            xknx, communication_channel_id=1, sequence_counter=23, cemi=cemi
+            communication_channel_id=1,
+            sequence_counter=23,
+            cemi=cemi,
         )
         knxipframe2 = KNXIPFrame.init_from_body(tunnelling_request)
 
@@ -46,15 +46,13 @@ class TestKNXIPTunnellingRequest:
     def test_from_knx_wrong_header(self):
         """Test parsing and streaming wrong TunnellingRequest (wrong header length byte)."""
         raw = bytes((0x06, 0x10, 0x04, 0x20, 0x00, 0x15, 0x03))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
 
     def test_from_knx_wrong_header2(self):
         """Test parsing and streaming wrong TunnellingRequest (wrong header length)."""
         raw = bytes((0x06, 0x10, 0x04, 0x20, 0x00, 0x15, 0x04))
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         with pytest.raises(CouldNotParseKNXIP):
             knxipframe.from_knx(raw)
diff --git a/test/remote_value_tests/remote_value_string_test.py b/test/remote_value_tests/remote_value_string_test.py
index 29194e4a..64154953 100644
--- a/test/remote_value_tests/remote_value_string_test.py
+++ b/test/remote_value_tests/remote_value_string_test.py
@@ -33,7 +33,11 @@ class TestRemoteValueString:
                 0x00,
             )
         )
-        remote_value_ascii = RemoteValueString(xknx)
+        remote_value_default = RemoteValueString(xknx)
+        assert remote_value_default.dpt_class == DPTString
+        assert remote_value_default.to_knx("KNX is OK") == dpt_array_string
+
+        remote_value_ascii = RemoteValueString(xknx, value_type="string")
         assert remote_value_ascii.dpt_class == DPTString
         assert remote_value_ascii.to_knx("KNX is OK") == dpt_array_string
 
diff --git a/test/str_test.py b/test/str_test.py
index bfedb656..5d50d9fc 100644
--- a/test/str_test.py
+++ b/test/str_test.py
@@ -519,8 +519,7 @@ class TestStringRepresentations:
 
     def test_connect_request(self):
         """Test string representation of KNX/IP ConnectRequest."""
-        xknx = XKNX()
-        connect_request = ConnectRequest(xknx)
+        connect_request = ConnectRequest()
         connect_request.request_type = ConnectRequestType.TUNNEL_CONNECTION
         connect_request.control_endpoint = HPAI(ip_addr="192.168.42.1", port=33941)
         connect_request.data_endpoint = HPAI(ip_addr="192.168.42.2", port=33942)
@@ -532,8 +531,7 @@ class TestStringRepresentations:
 
     def test_connect_response(self):
         """Test string representatoin of KNX/IP ConnectResponse."""
-        xknx = XKNX()
-        connect_response = ConnectResponse(xknx)
+        connect_response = ConnectResponse()
         connect_response.communication_channel = 13
         connect_response.request_type = ConnectRequestType.TUNNEL_CONNECTION
         connect_response.data_endpoint = HPAI(ip_addr="192.168.42.1", port=33941)
@@ -547,8 +545,7 @@ class TestStringRepresentations:
 
     def test_disconnect_request(self):
         """Test string representation of KNX/IP DisconnectRequest."""
-        xknx = XKNX()
-        disconnect_request = DisconnectRequest(xknx)
+        disconnect_request = DisconnectRequest()
         disconnect_request.communication_channel_id = 13
         disconnect_request.control_endpoint = HPAI(ip_addr="192.168.42.1", port=33941)
         assert (
@@ -558,8 +555,7 @@ class TestStringRepresentations:
 
     def test_disconnect_response(self):
         """Test string representation of KNX/IP DisconnectResponse."""
-        xknx = XKNX()
-        disconnect_response = DisconnectResponse(xknx)
+        disconnect_response = DisconnectResponse()
         disconnect_response.communication_channel_id = 23
         assert (
             str(disconnect_response)
@@ -568,8 +564,7 @@ class TestStringRepresentations:
 
     def test_connectionstate_request(self):
         """Test string representation of KNX/IP ConnectionStateRequest."""
-        xknx = XKNX()
-        connectionstate_request = ConnectionStateRequest(xknx)
+        connectionstate_request = ConnectionStateRequest()
         connectionstate_request.communication_channel_id = 23
         connectionstate_request.control_endpoint = HPAI(
             ip_addr="192.168.42.1", port=33941
@@ -581,8 +576,7 @@ class TestStringRepresentations:
 
     def test_connectionstate_response(self):
         """Test string representation of KNX/IP ConnectionStateResponse."""
-        xknx = XKNX()
-        connectionstate_response = ConnectionStateResponse(xknx)
+        connectionstate_response = ConnectionStateResponse()
         connectionstate_response.communication_channel_id = 23
         assert (
             str(connectionstate_response)
@@ -591,17 +585,15 @@ class TestStringRepresentations:
 
     def test_search_reqeust(self):
         """Test string representation of KNX/IP SearchRequest."""
-        xknx = XKNX()
-        search_request = SearchRequest(xknx)
+        search_request = SearchRequest()
         assert (
             str(search_request)
-            == '<SearchRequest discovery_endpoint="224.0.23.12:3671/udp" />'
+            == '<SearchRequest discovery_endpoint="0.0.0.0:0/udp" />'
         )
 
     def test_search_response(self):
         """Test string representation of KNX/IP SearchResponse."""
-        xknx = XKNX()
-        search_response = SearchResponse(xknx)
+        search_response = SearchResponse()
         search_response.control_endpoint = HPAI(ip_addr="192.168.42.1", port=33941)
         search_response.dibs.append(DIBGeneric())
         search_response.dibs.append(DIBGeneric())
@@ -615,8 +607,7 @@ class TestStringRepresentations:
 
     def test_search_response_extended(self):
         """Test string representation of KNX/IP SearchResponseExtended."""
-        xknx = XKNX()
-        search_response = SearchResponseExtended(xknx)
+        search_response = SearchResponseExtended()
         search_response.control_endpoint = HPAI(ip_addr="192.168.42.1", port=33941)
         search_response.dibs.append(DIBGeneric())
         search_response.dibs.append(DIBGeneric())
@@ -630,8 +621,7 @@ class TestStringRepresentations:
 
     def test_tunnelling_request(self):
         """Test string representation of KNX/IP TunnellingRequest."""
-        xknx = XKNX()
-        tunnelling_request = TunnellingRequest(xknx)
+        tunnelling_request = TunnellingRequest()
         tunnelling_request.communication_channel_id = 23
         tunnelling_request.sequence_counter = 42
         assert (
@@ -643,8 +633,7 @@ class TestStringRepresentations:
 
     def test_tunnelling_ack(self):
         """Test string representation of KNX/IP TunnellingAck."""
-        xknx = XKNX()
-        tunnelling_ack = TunnellingAck(xknx)
+        tunnelling_ack = TunnellingAck()
         tunnelling_ack.communication_channel_id = 23
         tunnelling_ack.sequence_counter = 42
         assert (
@@ -654,8 +643,7 @@ class TestStringRepresentations:
 
     def test_cemi_frame(self):
         """Test string representation of KNX/IP CEMI Frame."""
-        xknx = XKNX()
-        cemi_frame = CEMIFrame(xknx)
+        cemi_frame = CEMIFrame()
         cemi_frame.src_addr = GroupAddress("1/2/3")
         cemi_frame.telegram = Telegram(
             destination_address=GroupAddress("1/2/5"),
@@ -669,14 +657,13 @@ class TestStringRepresentations:
 
     def test_knxip_frame(self):
         """Test string representation of KNX/IP Frame."""
-        xknx = XKNX()
-        knxipframe = KNXIPFrame(xknx)
+        knxipframe = KNXIPFrame()
         knxipframe.init(KNXIPServiceType.SEARCH_REQUEST)
         assert (
             str(knxipframe)
             == '<KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST" '
             'Reserve="0" TotalLength="0" />\n'
-            ' body="<SearchRequest discovery_endpoint="224.0.23.12:3671/udp" />" />'
+            ' body="<SearchRequest discovery_endpoint="0.0.0.0:0/udp" />" />'
         )
 
     #
@@ -701,8 +688,7 @@ class TestStringRepresentations:
     #
     def test_routing_indication_str(self):
         """Test string representation of GatewayDescriptor."""
-        xknx = XKNX()
-        routing_indication = RoutingIndication(xknx)
+        routing_indication = RoutingIndication()
         assert (
             str(routing_indication)
             == '<RoutingIndication cemi="<CEMIFrame SourceAddress="IndividualAddress("0.0.0")" '
diff --git a/test/telegram_tests/address_test.py b/test/telegram_tests/address_test.py
index ed2d2725..232fc518 100644
--- a/test/telegram_tests/address_test.py
+++ b/test/telegram_tests/address_test.py
@@ -219,7 +219,8 @@ class TestGroupAddress:
         assert GroupAddress("1/0").main == 1
         assert GroupAddress("15/0").main == 15
         assert GroupAddress("31/0/0").main == 31
-        assert GroupAddress("1/0", GroupAddressType.FREE).main is None
+        GroupAddress.address_format = GroupAddressType.FREE
+        assert GroupAddress("1/0").main is None
 
     def test_middle(self):
         """
@@ -229,10 +230,13 @@ class TestGroupAddress:
         * Middle group part of a strings returns the right value
         * Return `None` if not `GroupAddressType.LONG`
         """
-        assert GroupAddress("1/0/1", GroupAddressType.LONG).middle == 0
-        assert GroupAddress("1/7/1", GroupAddressType.LONG).middle == 7
-        assert GroupAddress("1/0", GroupAddressType.SHORT).middle is None
-        assert GroupAddress("1/0", GroupAddressType.FREE).middle is None
+        GroupAddress.address_format = GroupAddressType.LONG
+        assert GroupAddress("1/0/1").middle == 0
+        assert GroupAddress("1/7/1").middle == 7
+        GroupAddress.address_format = GroupAddressType.SHORT
+        assert GroupAddress("1/0").middle is None
+        GroupAddress.address_format = GroupAddressType.FREE
+        assert GroupAddress("1/0").middle is None
 
     def test_sub(self):
         """
@@ -242,15 +246,20 @@ class TestGroupAddress:
         * Sub group part of a strings returns the right value
         * Return never `None`
         """
-        assert GroupAddress("1/0", GroupAddressType.SHORT).sub == 0
-        assert GroupAddress("31/0", GroupAddressType.SHORT).sub == 0
-        assert GroupAddress("1/2047", GroupAddressType.SHORT).sub == 2047
-        assert GroupAddress("31/2047", GroupAddressType.SHORT).sub == 2047
-        assert GroupAddress("1/0/0", GroupAddressType.LONG).sub == 0
-        assert GroupAddress("1/0/255", GroupAddressType.LONG).sub == 255
-        assert GroupAddress("0/0", GroupAddressType.FREE).sub == 0
-        assert GroupAddress("1/0", GroupAddressType.FREE).sub == 2048
-        assert GroupAddress("31/2047", GroupAddressType.FREE).sub == 65535
+        GroupAddress.address_format = GroupAddressType.SHORT
+        assert GroupAddress("1/0").sub == 0
+        assert GroupAddress("31/0").sub == 0
+        assert GroupAddress("1/2047").sub == 2047
+        assert GroupAddress("31/2047").sub == 2047
+
+        GroupAddress.address_format = GroupAddressType.LONG
+        assert GroupAddress("1/0/0").sub == 0
+        assert GroupAddress("1/0/255").sub == 255
+
+        GroupAddress.address_format = GroupAddressType.FREE
+        assert GroupAddress("0/0").sub == 0
+        assert GroupAddress("1/0").sub == 2048
+        assert GroupAddress("31/2047").sub == 65535
 
     def test_to_knx(self):
         """Test if `GroupAddress.to_knx()` generates valid byte tuples."""
@@ -266,11 +275,25 @@ class TestGroupAddress:
         assert GroupAddress(1) != IndividualAddress(1)
         assert GroupAddress(1) != 1
 
-    def test_representation(self):
+    @pytest.mark.parametrize(
+        "initializer,string_free,string_short,string_long",
+        [
+            ("0", "0", "0/0", "0/0/0"),
+            ("1/4/70", "3142", "1/1094", "1/4/70"),
+        ],
+    )
+    def test_representation(self, initializer, string_free, string_short, string_long):
         """Test string representation of address."""
-        assert repr(GroupAddress("0", GroupAddressType.FREE)) == 'GroupAddress("0")'
-        assert repr(GroupAddress("0", GroupAddressType.SHORT)) == 'GroupAddress("0/0")'
-        assert repr(GroupAddress("0", GroupAddressType.LONG)) == 'GroupAddress("0/0/0")'
+        group_address = GroupAddress(initializer)
+        GroupAddress.address_format = GroupAddressType.FREE
+        assert str(group_address) == string_free
+        assert repr(group_address) == f'GroupAddress("{string_free}")'
+        GroupAddress.address_format = GroupAddressType.SHORT
+        assert str(group_address) == string_short
+        assert repr(group_address) == f'GroupAddress("{string_short}")'
+        GroupAddress.address_format = GroupAddressType.LONG
+        assert str(group_address) == string_long
+        assert repr(group_address) == f'GroupAddress("{string_long}")'
 
 
 class TestInternalGroupAddress: