Repository: XKNX/xknx
Pull request #876 (2022-02-20 22:14:33)

Upgrade test and lint environment
<!--
  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.
-->
- Upgrade pre-commit hook versions and black target-version
- Move configurations of mypy, isort, pylint, pytest to pyproject.toml
- Update isort config
- Enable pylint `useless-suppression`

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/876?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) Report
> Merging [#876](https://codecov.io/gh/XKNX/xknx/pull/876?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) (37f3857) into [main](https://codecov.io/gh/XKNX/xknx/commit/f674160a4c298223a79a7129e3c02eef2238ac5e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) (f674160) will **not change** coverage.
> The diff coverage is `97.14%`.

[![Impacted file tree graph](https://codecov.io/gh/XKNX/xknx/pull/876/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/876?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX)

```diff
@@           Coverage Diff           @@
##             main     #876   +/-   ##
=======================================
  Coverage   95.50%   95.50%           
=======================================
  Files         116      116           
  Lines        7013     7013           
=======================================
  Hits         6698     6698           
  Misses        315      315           
```


| [Impacted Files](https://codecov.io/gh/XKNX/xknx/pull/876?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) | Coverage Δ | |
|---|---|---|
| [xknx/io/transport/ip\_transport.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9pby90cmFuc3BvcnQvaXBfdHJhbnNwb3J0LnB5) | `89.58% <50.00%> (ø)` | |
| [xknx/devices/light.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9kZXZpY2VzL2xpZ2h0LnB5) | `99.60% <100.00%> (ø)` | |
| [xknx/dpt/dpt.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9kcHQvZHB0LnB5) | `100.00% <100.00%> (ø)` | |
| [xknx/knxip/description\_response.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9rbnhpcC9kZXNjcmlwdGlvbl9yZXNwb25zZS5weQ==) | `93.33% <100.00%> (ø)` | |
| [xknx/knxip/dib.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9rbnhpcC9kaWIucHk=) | `88.48% <100.00%> (ø)` | |
| [xknx/knxip/search\_response.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9rbnhpcC9zZWFyY2hfcmVzcG9uc2UucHk=) | `100.00% <100.00%> (ø)` | |
| [xknx/remote\_value/remote\_value.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9yZW1vdGVfdmFsdWUvcmVtb3RlX3ZhbHVlLnB5) | `100.00% <100.00%> (ø)` | |
| [xknx/remote\_value/remote\_value\_color\_rgb.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9yZW1vdGVfdmFsdWUvcmVtb3RlX3ZhbHVlX2NvbG9yX3JnYi5weQ==) | `100.00% <100.00%> (ø)` | |
| [xknx/remote\_value/remote\_value\_color\_rgbw.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9yZW1vdGVfdmFsdWUvcmVtb3RlX3ZhbHVlX2NvbG9yX3JnYncucHk=) | `100.00% <100.00%> (ø)` | |
| [xknx/telegram/address.py](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC90ZWxlZ3JhbS9hZGRyZXNzLnB5) | `100.00% <100.00%> (ø)` | |
| ... and [1 more](https://codecov.io/gh/XKNX/xknx/pull/876/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) | |


Patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e8f28152..a3d4c4c5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,32 +1,34 @@
 ---
 repos:
   - repo: https://github.com/asottile/pyupgrade
-    rev: v2.11.0
+    rev: v2.31.0
     hooks:
       - id: pyupgrade
-        args: [--py38-plus]
+        args: [--py39-plus]
   - repo: https://github.com/psf/black
-    rev: 20.8b1
+    rev: 22.1.0
     hooks:
       - id: black
         args:
           - --safe
           - --quiet
         files: ^((xknx|test|examples|home-assistant-plugin|docs)/.+)?[^/]+\.py$
-  - repo: https://gitlab.com/pycqa/flake8
-    rev: 3.9.0
+  - repo: https://github.com/pycqa/flake8
+    rev: 4.0.1
     hooks:
       - id: flake8
         additional_dependencies:
           - flake8-docstrings==1.6.0
           - pydocstyle==6.0.0
         files: ^(xknx|examples|docs)/.+\.py$
-  - repo: https://github.com/timothycrosley/isort
-    rev: 5.8.0
+  - repo: https://github.com/PyCQA/isort
+    rev: 5.10.1
     hooks:
       - id: isort
+        args:
+          - --resolve-all-configs
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v3.4.0
+    rev: v4.1.0
     hooks:
       - id: check-executables-have-shebangs
         stages: [manual]
@@ -36,7 +38,7 @@ repos:
           - --branch=main
       - id: trailing-whitespace
   - repo: https://github.com/cdce8p/python-typing-update
-    rev: v0.3.2
+    rev: v0.3.5
     hooks:
       # Run `pre-commit run --hook-stage manual python-typing-update --all-files` manually
       # from time to time to update python typing syntax.
@@ -44,7 +46,7 @@ repos:
       - id: python-typing-update
         stages: [manual]
         args:
-          - --py38-plus
+          - --py39-plus
           - --force
           - --keep-updates
         files: ^(xknx)/.+\.py$
diff --git a/.pylintrc b/.pylintrc
deleted file mode 100644
index b144382b..00000000
--- a/.pylintrc
+++ /dev/null
@@ -1,63 +0,0 @@
-[MASTER]
-ignore=test
-persistent=no
-reports=no
-extension-pkg-whitelist=netifaces
-
-[MESSAGES CONTROL]
-# Reasons disabled:
-# format - handled by black
-# locally-disabled - it spams too much
-# duplicate-code - unavoidable
-# cyclic-import - doesn't test if both import on load
-# abstract-class-little-used - prevents from setting right foundation
-# unused-argument - generic callbacks and setup methods create a lot of warnings
-# raise-missing-from - we use this in order to avoid too generic exception to the user
-# too-many-* - are not enforced for the sake of readability
-# too-few-* - same as too-many-*
-# abstract-method - with intro of async there are always methods missing
-# inconsistent-return-statements - doesn't handle raise
-# too-many-ancestors - it's too strict.
-# wrong-import-order - isort guards this
-# unsubscriptable-object - https://github.com/PyCQA/pylint/issues/3882
-# fixme - TODO
-disable=
-  format,
-  abstract-class-little-used,
-  abstract-method,
-  cyclic-import,
-  duplicate-code,
-  fixme,
-  inconsistent-return-statements,
-  locally-disabled,
-  not-context-manager,
-  raise-missing-from,
-  too-few-public-methods,
-  too-many-ancestors,
-  too-many-arguments,
-  too-many-branches,
-  too-many-instance-attributes,
-  too-many-lines,
-  too-many-locals,
-  too-many-public-methods,
-  too-many-return-statements,
-  too-many-statements,
-  too-many-boolean-expressions,
-  unused-argument,
-  wrong-import-order,
-  unsubscriptable-object
-# disabled for tests via command line options in Makefile:
-#   - no-self-use
-#   - protected-access
-#   - abstract-class-instantiated
-# enable useless-suppression temporarily every now and then to clean them up
-enable=
-  use-symbolic-message-instead,
-  useless-suppression
-
-[REPORTS]
-score=no
-output-format=colorized
-
-[FORMAT]
-expected-line-ending-format=LF
\ No newline at end of file
diff --git a/Makefile b/Makefile
index af64d4f8..3437bc64 100644
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,8 @@ pypi:
 	@twine upload dist/*
 
 pylint:
-	@pylint --jobs=0 --rcfile=.pylintrc xknx *.py examples/*.py
-	@pylint --jobs=0 --rcfile=.pylintrc --disable=no-self-use,protected-access,abstract-class-instantiated test/*
+	@pylint --jobs=0 xknx *.py examples/*.py
+	@pylint --jobs=0 --disable=no-self-use,protected-access,abstract-class-instantiated test/*
 
 pydocstyle:
 	@pydocstyle xknx test/*.py test/*.py *.py examples/*.py
diff --git a/README.md b/README.md
index 7845c91a..f9e330d8 100644
--- a/README.md
+++ b/README.md
@@ -30,9 +30,11 @@ XKNX contains a [plugin](https://xknx.io/home_assistant) for the [Home Assistant
 ```python
 """Example for switching a light on and off."""
 import asyncio
+
 from xknx import XKNX
 from xknx.devices import Light
 
+
 async def main():
     """Connect to KNX/IP bus, switch on light, wait 2 seconds and switch it off again."""
     async with XKNX() as xknx:
diff --git a/examples/example_info.py b/examples/example_info.py
index 30fbbbc6..64b6d270 100644
--- a/examples/example_info.py
+++ b/examples/example_info.py
@@ -1,7 +1,6 @@
 """Example on how to read mask version and properties from a KNX actor."""
 import asyncio
 import sys
-from typing import List
 
 from xknx import XKNX
 from xknx.core import PayloadReader
@@ -14,7 +13,7 @@ from xknx.telegram.apci import (
 )
 
 
-async def main(argv: List[str]):
+async def main(argv: list[str]):
     """Connect and read information from a KNX device. Requires a System B device."""
     if len(argv) == 2:
         address = IndividualAddress(argv[1])
diff --git a/examples/example_powermeter_mqtt.py b/examples/example_powermeter_mqtt.py
index 21b51dcf..9f016236 100644
--- a/examples/example_powermeter_mqtt.py
+++ b/examples/example_powermeter_mqtt.py
@@ -25,6 +25,7 @@ try:
 
     # import time
     import paho.mqtt.client as mqtt
+
     from xknx import XKNX
     from xknx.devices import Sensor
 
diff --git a/examples/example_restart.py b/examples/example_restart.py
index 4e6e38a0..c499128f 100644
--- a/examples/example_restart.py
+++ b/examples/example_restart.py
@@ -1,14 +1,13 @@
 """Example on how to connect to restart a KNX device."""
 import asyncio
 import sys
-from typing import List
 
 from xknx import XKNX
 from xknx.telegram import IndividualAddress, Telegram
 from xknx.telegram.apci import Restart
 
 
-async def main(argv: List[str]):
+async def main(argv: list[str]):
     """Restart a KNX device."""
     if len(argv) != 2:
         print(f"{argv[0]}: missing target address.")
diff --git a/home-assistant-plugin/.isort.cfg b/home-assistant-plugin/.isort.cfg
new file mode 100644
index 00000000..1df1c52f
--- /dev/null
+++ b/home-assistant-plugin/.isort.cfg
@@ -0,0 +1,8 @@
+[settings]
+profile = black
+# will group `import x` and `from x import` of the same module.
+force_sort_within_sections = true
+known_third_party = xknx
+known_first_party = homeassistant,test
+forced_separate = test
+combine_as_imports = true
diff --git a/home-assistant-plugin/custom_components/xknx/light.py b/home-assistant-plugin/custom_components/xknx/light.py
index 4841b056..28e0d08a 100644
--- a/home-assistant-plugin/custom_components/xknx/light.py
+++ b/home-assistant-plugin/custom_components/xknx/light.py
@@ -1,7 +1,7 @@
 """Support for KNX/IP lights."""
 from __future__ import annotations
 
-from typing import Any, Tuple, cast
+from typing import Any, cast
 
 from xknx import XKNX
 from xknx.devices.light import Light as XknxLight, XYYColor
@@ -287,7 +287,7 @@ class KNXLight(KnxEntity, LightEntity):
                     # brightness will be calculated from color so color must not hold brightness again
                     # pylint: disable=protected-access
                     return cast(
-                        Tuple[int, int, int], color_util.match_max_scale((255,), rgb)
+                        tuple[int, int, int], color_util.match_max_scale((255,), rgb)
                     )
                 return rgb
         return None
@@ -302,7 +302,7 @@ class KNXLight(KnxEntity, LightEntity):
                     # brightness will be calculated from color so color must not hold brightness again
                     # pylint: disable=protected-access
                     return cast(
-                        Tuple[int, int, int, int],
+                        tuple[int, int, int, int],
                         color_util.match_max_scale((255,), (*rgb, white)),
                     )
                 return (*rgb, white)
@@ -403,7 +403,7 @@ class KNXLight(KnxEntity, LightEntity):
                 # normalize for brightness if brightness is derived from color
                 brightness = self.brightness or 255
             rgb = cast(
-                Tuple[int, int, int],
+                tuple[int, int, int],
                 tuple(color * brightness // 255 for color in rgb),
             )
             white = white * brightness // 255 if white is not None else None
diff --git a/home-assistant-plugin/custom_components/xknx/schema.py b/home-assistant-plugin/custom_components/xknx/schema.py
index debefc91..9ae658ef 100644
--- a/home-assistant-plugin/custom_components/xknx/schema.py
+++ b/home-assistant-plugin/custom_components/xknx/schema.py
@@ -128,7 +128,7 @@ def numeric_type_validator(value: Any) -> str | int:
 def _max_payload_value(payload_length: int) -> int:
     if payload_length == 0:
         return 0x3F
-    return int(256 ** payload_length) - 1
+    return int(256**payload_length) - 1
 
 
 def button_payload_sub_validator(entity_config: OrderedDict) -> OrderedDict:
diff --git a/pyproject.toml b/pyproject.toml
index e7954c17..4476feef 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,83 @@
 [tool.black]
-target-version = ["py38"]
+target-version = ["py39", "py310"]
 exclude = "generated"
+
+[tool.isort]
+profile = "black"
+# will group `import x` and `from x import` of the same module.
+force_sort_within_sections = true
+combine_as_imports = true
+
+[tool.mypy]
+python_version = "3.9"
+strict = true
+ignore_missing_imports = true
+implicit_reexport = true
+warn_unreachable = true
+
+[tool.pylint.master]
+ignore = "test"
+persistent = "no"
+reports = "no"
+extension-pkg-whitelist = "netifaces"
+
+[tool.pylint.message_control]
+# Reasons disabled:
+# format - handled by black
+# locally-disabled - it spams too much
+# duplicate-code - unavoidable
+# cyclic-import - doesn't test if both import on load
+# abstract-class-little-used - prevents from setting right foundation
+# unused-argument - generic callbacks and setup methods create a lot of warnings
+# raise-missing-from - we use this in order to avoid too generic exception to the user
+# too-many-* - are not enforced for the sake of readability
+# too-few-* - same as too-many-*
+# abstract-method - with intro of async there are always methods missing
+# inconsistent-return-statements - doesn't handle raise
+# too-many-ancestors - it's too strict.
+# wrong-import-order - isort guards this
+# fixme - TODO
+disable = [
+  "format",
+  "abstract-class-little-used",
+  "abstract-method",
+  "cyclic-import",
+  "duplicate-code",
+  "fixme",
+  "inconsistent-return-statements",
+  "locally-disabled",
+  "not-context-manager",
+  "raise-missing-from",
+  "too-few-public-methods",
+  "too-many-ancestors",
+  "too-many-arguments",
+  "too-many-branches",
+  "too-many-instance-attributes",
+  "too-many-lines",
+  "too-many-locals",
+  "too-many-public-methods",
+  "too-many-return-statements",
+  "too-many-statements",
+  "too-many-boolean-expressions",
+  "unused-argument",
+  "wrong-import-order",
+  ]
+# disabled for tests via command line options in Makefile:
+#   - no-self-use
+#   - protected-access
+#   - abstract-class-instantiated
+enable = [
+  "use-symbolic-message-instead",
+]
+
+[tool.pylint.format]
+expected-line-ending-format = "LF"
+
+[tool.pylint.reports]
+score = "no"
+output-format = "colorized"
+
+
+[tool.pytest.ini_options]
+testpaths = "test"
+asyncio_mode = "auto"
diff --git a/setup.cfg b/setup.cfg
index 005c32dd..146effb7 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,40 +1,18 @@
 [metadata]
 description-file = README.md
 
-[tool:pytest]
-testpaths = test
-norecursedirs = .git
-
 [flake8]
 exclude = .venv,.git,.tox,bin,lib,deps,build
 # black requires this
 max-line-length = 88
+# D202 No blank lines allowed after function docstring
+# E203: Whitespace before ':'
 # E501: line too long
 # W503: Line break occurred before a binary operator
-# E203: Whitespace before ':'
-# D202 No blank lines allowed after function docstring
 # W504 line break after binary operator
 ignore =
+    D202,
+    E203,
     E501,
     W503,
-    E203,
-    D202,
     W504
-
-[isort]
-# https://github.com/timothycrosley/isort
-# https://github.com/timothycrosley/isort/wiki/isort-Settings
-profile = black
-# will group `import x` and `from x import` of the same module.
-force_sort_within_sections = true
-known_third_party = xknx
-known_first_party = homeassistant,test
-forced_separate = test
-combine_as_imports = true
-
-[mypy]
-python_version = 3.9
-strict = true
-warn_unreachable = true
-implicit_reexport = true
-ignore_missing_imports = true
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 73990e16..74fff9d1 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ VERSION = {}
 with open(path.join(THIS_DIRECTORY, "xknx/__version__.py"), encoding="utf-8") as fp:
     exec(fp.read(), VERSION)
 
-REQUIRES = ["netifaces>=0.10.9"]
+REQUIRES = ["netifaces>=0.11.0"]
 
 setup(
     name="xknx",
diff --git a/xknx/devices/light.py b/xknx/devices/light.py
index 0fa3664c..6c919bdd 100644
--- a/xknx/devices/light.py
+++ b/xknx/devices/light.py
@@ -16,7 +16,7 @@ import asyncio
 from enum import Enum
 from itertools import chain
 import logging
-from typing import TYPE_CHECKING, Any, Awaitable, Callable, Iterator, Tuple, cast
+from typing import TYPE_CHECKING, Any, Awaitable, Callable, Iterator, cast
 
 from xknx.dpt.dpt_color import XYYColor
 from xknx.remote_value import (
@@ -473,7 +473,7 @@ class Light(Device):
         )
         if None in colors:
             return None, self.white.brightness.value
-        return cast(Tuple[int, int, int], colors), self.white.brightness.value
+        return cast(tuple[int, int, int], colors), self.white.brightness.value
 
     async def set_color(
         self, color: tuple[int, int, int], white: int | None = None
diff --git a/xknx/dpt/dpt.py b/xknx/dpt/dpt.py
index 6a924fd9..fbe69124 100644
--- a/xknx/dpt/dpt.py
+++ b/xknx/dpt/dpt.py
@@ -3,11 +3,11 @@ from __future__ import annotations
 
 from abc import ABC, abstractmethod
 from inspect import isabstract
-from typing import Any, Iterator, Type, TypeVar, cast
+from typing import Any, Iterator, TypeVar, cast
 
 from xknx.exceptions import ConversionError
 
-T = TypeVar("T", bound=Type["DPTBase"])  # pylint: disable=invalid-name
+T = TypeVar("T", bound=type["DPTBase"])  # pylint: disable=invalid-name
 
 
 class DPTBase(ABC):
diff --git a/xknx/io/gateway_scanner.py b/xknx/io/gateway_scanner.py
index 9a98d1cf..460f97f2 100644
--- a/xknx/io/gateway_scanner.py
+++ b/xknx/io/gateway_scanner.py
@@ -13,6 +13,7 @@ import logging
 from typing import TYPE_CHECKING
 
 import netifaces
+
 from xknx.knxip import (
     DIB,
     HPAI,
diff --git a/xknx/io/transport/ip_transport.py b/xknx/io/transport/ip_transport.py
index 870cdeb7..a5e46def 100644
--- a/xknx/io/transport/ip_transport.py
+++ b/xknx/io/transport/ip_transport.py
@@ -9,7 +9,7 @@ from __future__ import annotations
 from abc import ABC, abstractmethod
 import asyncio
 import logging
-from typing import Callable, Tuple, cast
+from typing import Callable, cast
 
 from xknx.exceptions import CommunicationError
 from xknx.knxip import HPAI, KNXIPFrame, KNXIPServiceType
@@ -88,7 +88,7 @@ class KNXIPTransport(ABC):
             raise CommunicationError(
                 "No transport defined. Socket information not resolveable"
             )
-        return cast(Tuple[str, int], self.transport.get_extra_info("sockname"))
+        return cast(tuple[str, int], self.transport.get_extra_info("sockname"))
 
     def getremote(self) -> str | None:
         """Return peername."""
diff --git a/xknx/io/util.py b/xknx/io/util.py
index 68112381..baa8aa9e 100644
--- a/xknx/io/util.py
+++ b/xknx/io/util.py
@@ -6,6 +6,7 @@ import logging
 from typing import cast
 
 import netifaces
+
 from xknx.exceptions import CommunicationError, XKNXException
 
 logger = logging.getLogger("xknx.log")
diff --git a/xknx/knxip/description_response.py b/xknx/knxip/description_response.py
index ff6f2cb8..7fe5c68f 100644
--- a/xknx/knxip/description_response.py
+++ b/xknx/knxip/description_response.py
@@ -31,7 +31,7 @@ class DescriptionResponse(KNXIPBody):
 
     def calculated_length(self) -> int:
         """Get length of KNX/IP body."""
-        return sum([dib.calculated_length() for dib in self.dibs])
+        return sum(dib.calculated_length() for dib in self.dibs)
 
     def from_knx(self, raw: bytes) -> int:
         """Parse/deserialize from KNX/IP raw data."""
diff --git a/xknx/knxip/dib.py b/xknx/knxip/dib.py
index bb82cacc..e729c19d 100644
--- a/xknx/knxip/dib.py
+++ b/xknx/knxip/dib.py
@@ -175,15 +175,12 @@ class DIBSuppSVCFamilies(DIB):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        return (
-            bytes(
-                (
-                    self.calculated_length(),
-                    DIBTypeCode.SUPP_SVC_FAMILIES.value,
-                )
+        return bytes(
+            (
+                self.calculated_length(),
+                DIBTypeCode.SUPP_SVC_FAMILIES.value,
             )
-            + b"".join(family.to_knx() for family in self.families)
-        )
+        ) + b"".join(family.to_knx() for family in self.families)
 
     def __str__(self) -> str:
         """Return object as readable string."""
diff --git a/xknx/knxip/search_response.py b/xknx/knxip/search_response.py
index f35059ba..19f5ef5b 100644
--- a/xknx/knxip/search_response.py
+++ b/xknx/knxip/search_response.py
@@ -32,7 +32,7 @@ class SearchResponse(KNXIPBody):
 
     def calculated_length(self) -> int:
         """Get length of KNX/IP body."""
-        return HPAI.LENGTH + sum([dib.calculated_length() for dib in self.dibs])
+        return HPAI.LENGTH + sum(dib.calculated_length() for dib in self.dibs)
 
     def from_knx(self, raw: bytes) -> int:
         """Parse/deserialize from KNX/IP raw data."""
diff --git a/xknx/remote_value/remote_value.py b/xknx/remote_value/remote_value.py
index 3abe98f7..3bf4bbcb 100644
--- a/xknx/remote_value/remote_value.py
+++ b/xknx/remote_value/remote_value.py
@@ -10,16 +10,7 @@ from __future__ import annotations
 
 from abc import ABC, abstractmethod
 import logging
-from typing import (
-    TYPE_CHECKING,
-    Awaitable,
-    Callable,
-    Generic,
-    Iterator,
-    List,
-    TypeVar,
-    Union,
-)
+from typing import TYPE_CHECKING, Awaitable, Callable, Generic, Iterator, TypeVar, Union
 
 from xknx.dpt.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError, CouldNotParseTelegram
@@ -41,7 +32,7 @@ AsyncCallbackType = Callable[[], Awaitable[None]]
 DPTPayloadType = TypeVar(
     "DPTPayloadType", DPTArray, DPTBinary, Union[DPTArray, DPTBinary]
 )
-GroupAddressesType = Union["DeviceAddressableType", List["DeviceAddressableType"]]
+GroupAddressesType = Union["DeviceAddressableType", list["DeviceAddressableType"]]
 ValueType = TypeVar("ValueType")
 
 
diff --git a/xknx/remote_value/remote_value_color_rgb.py b/xknx/remote_value/remote_value_color_rgb.py
index 938dced5..cac6c1f4 100644
--- a/xknx/remote_value/remote_value_color_rgb.py
+++ b/xknx/remote_value/remote_value_color_rgb.py
@@ -5,7 +5,7 @@ DPT 232.600.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING, Sequence, Tuple
+from typing import TYPE_CHECKING, Sequence
 
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError, CouldNotParseTelegram
@@ -16,7 +16,7 @@ if TYPE_CHECKING:
     from xknx.xknx import XKNX
 
 
-class RemoteValueColorRGB(RemoteValue[DPTArray, Tuple[int, int, int]]):
+class RemoteValueColorRGB(RemoteValue[DPTArray, tuple[int, int, int]]):
     """Abstraction for remote value of KNX DPT 232.600 (DPT_Color_RGB)."""
 
     def __init__(
diff --git a/xknx/remote_value/remote_value_color_rgbw.py b/xknx/remote_value/remote_value_color_rgbw.py
index 745322b4..30cde6c0 100644
--- a/xknx/remote_value/remote_value_color_rgbw.py
+++ b/xknx/remote_value/remote_value_color_rgbw.py
@@ -5,7 +5,7 @@ DPT 251.600.
 """
 from __future__ import annotations
 
-from typing import TYPE_CHECKING, Sequence, Tuple
+from typing import TYPE_CHECKING, Sequence
 
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError, CouldNotParseTelegram
@@ -16,7 +16,7 @@ if TYPE_CHECKING:
     from xknx.xknx import XKNX
 
 
-class RemoteValueColorRGBW(RemoteValue[DPTArray, Tuple[int, int, int, int]]):
+class RemoteValueColorRGBW(RemoteValue[DPTArray, tuple[int, int, int, int]]):
     """Abstraction for remote value of KNX DPT 251.600 (DPT_Color_RGBW)."""
 
     def __init__(
diff --git a/xknx/telegram/address.py b/xknx/telegram/address.py
index 7711f099..56d7b43f 100644
--- a/xknx/telegram/address.py
+++ b/xknx/telegram/address.py
@@ -18,14 +18,14 @@ from __future__ import annotations
 from abc import ABC
 from enum import Enum
 from re import compile as re_compile
-from typing import Optional, Tuple, Union
+from typing import Optional, Union
 
 from xknx.exceptions import CouldNotParseAddress
 
 # TODO: typing - remove need for Optional here
-GroupAddressableType = Optional[Union["GroupAddress", str, int, Tuple[int, int]]]
+GroupAddressableType = Optional[Union["GroupAddress", str, int, tuple[int, int]]]
 IndividualAddressableType = Optional[
-    Union["IndividualAddress", str, int, Tuple[int, int]]
+    Union["IndividualAddress", str, int, tuple[int, int]]
 ]
 InternalGroupAddressableType = Union["InternalGroupAddress", str]
 DeviceAddressableType = Union[GroupAddressableType, InternalGroupAddressableType]
diff --git a/xknx/telegram/apci.py b/xknx/telegram/apci.py
index c08cd9f7..fc79b639 100644
--- a/xknx/telegram/apci.py
+++ b/xknx/telegram/apci.py
@@ -514,9 +514,9 @@ class MemoryRead(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.address < 0 or self.address >= 2 ** 16:
+        if self.address < 0 or self.address >= 2**16:
             raise ConversionError("Address out of range.")
-        if self.count < 0 or self.count >= 2 ** 6:
+        if self.count < 0 or self.count >= 2**6:
             raise ConversionError("Count out of range.")
 
         payload = struct.pack("!BH", self.count, self.address)
@@ -565,9 +565,9 @@ class MemoryWrite(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.address < 0 or self.address >= 2 ** 16:
+        if self.address < 0 or self.address >= 2**16:
             raise ConversionError("Address out of range.")
-        if self.count < 0 or self.count >= 2 ** 6:
+        if self.count < 0 or self.count >= 2**6:
             raise ConversionError("Count out of range.")
 
         size = len(self.data)
@@ -617,9 +617,9 @@ class MemoryResponse(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.address < 0 or self.address >= 2 ** 16:
+        if self.address < 0 or self.address >= 2**16:
             raise ConversionError("Address out of range.")
-        if self.count < 0 or self.count >= 2 ** 6:
+        if self.count < 0 or self.count >= 2**6:
             raise ConversionError("Count out of range.")
 
         size = len(self.data)
@@ -657,7 +657,7 @@ class DeviceDescriptorRead(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.descriptor < 0 or self.descriptor >= 2 ** 6:
+        if self.descriptor < 0 or self.descriptor >= 2**6:
             raise ConversionError("Descriptor out of range.")
 
         return encode_cmd_and_payload(self.CODE, encoded_payload=self.descriptor)
@@ -693,7 +693,7 @@ class DeviceDescriptorResponse(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.descriptor < 0 or self.descriptor >= 2 ** 6:
+        if self.descriptor < 0 or self.descriptor >= 2**6:
             raise ConversionError("Descriptor out of range.")
 
         payload = struct.pack("!H", self.value)
@@ -762,9 +762,9 @@ class UserMemoryRead(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.address < 0 or self.address >= 2 ** 20:
+        if self.address < 0 or self.address >= 2**20:
             raise ConversionError("Address out of range.")
-        if self.count < 0 or self.count >= 2 ** 4:
+        if self.count < 0 or self.count >= 2**4:
             raise ConversionError("Count out of range.")
 
         byte0 = (((self.address & 0x0F0000) >> 16) << 4) | (self.count & 0x0F)
@@ -815,9 +815,9 @@ class UserMemoryWrite(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.address < 0 or self.address >= 2 ** 20:
+        if self.address < 0 or self.address >= 2**20:
             raise ConversionError("Address out of range.")
-        if self.count < 0 or self.count >= 2 ** 4:
+        if self.count < 0 or self.count >= 2**4:
             raise ConversionError("Count out of range.")
 
         byte0 = (((self.address & 0x0F0000) >> 16) << 4) | (self.count & 0x0F)
@@ -869,9 +869,9 @@ class UserMemoryResponse(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.address < 0 or self.address >= 2 ** 20:
+        if self.address < 0 or self.address >= 2**20:
             raise ConversionError("Address out of range.")
-        if self.count < 0 or self.count >= 2 ** 4:
+        if self.count < 0 or self.count >= 2**4:
             raise ConversionError("Count out of range.")
 
         byte0 = (((self.address & 0x0F0000) >> 16) << 4) | (self.count & 0x0F)
@@ -1177,7 +1177,7 @@ class PropertyValueRead(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.count < 0 or self.count > 2 ** 4:
+        if self.count < 0 or self.count > 2**4:
             raise ConversionError("Count out of range.")
 
         payload = struct.pack(
@@ -1236,7 +1236,7 @@ class PropertyValueWrite(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.count < 0 or self.count > 2 ** 4:
+        if self.count < 0 or self.count > 2**4:
             raise ConversionError("Count out of range.")
 
         size = len(self.data)
@@ -1330,7 +1330,7 @@ class PropertyValueResponse(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.count < 0 or self.count > 2 ** 4:
+        if self.count < 0 or self.count > 2**4:
             raise ConversionError("Count out of range.")
 
         size = len(self.data)
@@ -1436,7 +1436,7 @@ class PropertyDescriptionResponse(APCI):
 
     def to_knx(self) -> bytes:
         """Serialize to KNX/IP raw data."""
-        if self.max_count < 0 or self.max_count >= 2 ** 12:
+        if self.max_count < 0 or self.max_count >= 2**12:
             raise ConversionError("Max count out of range.")
 
         payload = struct.pack(


Test patch:
diff --git a/test/core_tests/connection_manager_test.py b/test/core_tests/connection_manager_test.py
index c94a9d82..c10c7efb 100644
--- a/test/core_tests/connection_manager_test.py
+++ b/test/core_tests/connection_manager_test.py
@@ -1,12 +1,10 @@
 """Unit test for connection manager."""
 from unittest.mock import AsyncMock
 
-import pytest
 from xknx import XKNX
 from xknx.core import XknxConnectionState
 
 
-@pytest.mark.asyncio
 class TestConnectionManager:
     """Test class for connection manager."""
 
diff --git a/test/core_tests/exceptions_test.py b/test/core_tests/exceptions_test.py
index d292a3cb..ed10e430 100644
--- a/test/core_tests/exceptions_test.py
+++ b/test/core_tests/exceptions_test.py
@@ -1,5 +1,6 @@
 """Unit tests for exceptions."""
 import pytest
+
 from xknx.exceptions import (
     ConversionError,
     CouldNotParseAddress,
diff --git a/test/core_tests/payload_reader_test.py b/test/core_tests/payload_reader_test.py
index bb927b31..4c33ad86 100644
--- a/test/core_tests/payload_reader_test.py
+++ b/test/core_tests/payload_reader_test.py
@@ -2,14 +2,12 @@
 import asyncio
 from unittest.mock import MagicMock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.core import PayloadReader
 from xknx.telegram import IndividualAddress, Telegram, TelegramDirection
 from xknx.telegram.apci import MemoryRead, MemoryResponse
 
 
-@pytest.mark.asyncio
 class TestPayloadReader:
     """Test class for payload reader."""
 
diff --git a/test/core_tests/state_updater_test.py b/test/core_tests/state_updater_test.py
index 0c950b74..6ac0d767 100644
--- a/test/core_tests/state_updater_test.py
+++ b/test/core_tests/state_updater_test.py
@@ -1,7 +1,6 @@
 """Unit test for StateUpdater."""
 from unittest.mock import Mock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.core import XknxConnectionState
 from xknx.core.state_updater import StateTrackerType, _StateTracker
@@ -10,7 +9,6 @@ from xknx.telegram import GroupAddress
 
 
 @patch.multiple(RemoteValue, __abstractmethods__=set())
-@pytest.mark.asyncio
 class TestStateUpdater:
     """Test class for state updater."""
 
diff --git a/test/core_tests/task_registry_test.py b/test/core_tests/task_registry_test.py
index 6b6928b3..0cfcf44a 100644
--- a/test/core_tests/task_registry_test.py
+++ b/test/core_tests/task_registry_test.py
@@ -1,12 +1,10 @@
 """Unit test for task registry."""
 import asyncio
 
-import pytest
 from xknx import XKNX
 from xknx.core import XknxConnectionState
 
 
-@pytest.mark.asyncio
 class TestTaskRegistry:
     """Test class for task registry."""
 
diff --git a/test/core_tests/telegram_queue_test.py b/test/core_tests/telegram_queue_test.py
index 10016bb4..3b21c573 100644
--- a/test/core_tests/telegram_queue_test.py
+++ b/test/core_tests/telegram_queue_test.py
@@ -3,6 +3,7 @@ import asyncio
 from unittest.mock import AsyncMock, MagicMock, call, patch
 
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTBinary
 from xknx.exceptions import CommunicationError, CouldNotParseTelegram
@@ -11,7 +12,6 @@ from xknx.telegram.address import GroupAddress, InternalGroupAddress
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestTelegramQueue:
     """Test class for telegram queue."""
 
diff --git a/test/core_tests/value_reader_test.py b/test/core_tests/value_reader_test.py
index 8d4315eb..32a7532c 100644
--- a/test/core_tests/value_reader_test.py
+++ b/test/core_tests/value_reader_test.py
@@ -3,6 +3,7 @@ import asyncio
 from unittest.mock import MagicMock, patch
 
 import pytest
+
 from xknx import XKNX
 from xknx.core import ValueReader
 from xknx.dpt import DPTBinary
@@ -10,7 +11,6 @@ from xknx.telegram import GroupAddress, Telegram, TelegramDirection
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestValueReader:
     """Test class for value reader."""
 
diff --git a/test/devices_tests/binary_sensor_test.py b/test/devices_tests/binary_sensor_test.py
index b8893a8a..1301c96f 100644
--- a/test/devices_tests/binary_sensor_test.py
+++ b/test/devices_tests/binary_sensor_test.py
@@ -1,7 +1,6 @@
 """Unit test for BinarySensor objects."""
 from unittest.mock import AsyncMock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.devices import BinarySensor
 from xknx.dpt import DPTArray, DPTBinary
@@ -9,7 +8,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestBinarySensor:
     """Test class for BinarySensor objects."""
 
diff --git a/test/devices_tests/climate_test.py b/test/devices_tests/climate_test.py
index 86904355..93b00549 100644
--- a/test/devices_tests/climate_test.py
+++ b/test/devices_tests/climate_test.py
@@ -2,6 +2,7 @@
 from unittest.mock import AsyncMock, patch
 
 import pytest
+
 from xknx import XKNX
 from xknx.devices import Climate, ClimateMode
 from xknx.devices.climate import SetpointShiftMode
@@ -29,7 +30,6 @@ DPT_20102_MODES = [
 ]
 
 
-@pytest.mark.asyncio
 class TestClimate:
     """Test class for Climate objects."""
 
diff --git a/test/devices_tests/cover_test.py b/test/devices_tests/cover_test.py
index 43a4ad86..70da444c 100644
--- a/test/devices_tests/cover_test.py
+++ b/test/devices_tests/cover_test.py
@@ -1,7 +1,6 @@
 """Unit test for Cover objects."""
 from unittest.mock import AsyncMock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.devices import Cover
 from xknx.dpt import DPTArray, DPTBinary
@@ -9,7 +8,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestCover:
     """Test class for Cover objects."""
 
diff --git a/test/devices_tests/datetime_test.py b/test/devices_tests/datetime_test.py
index 03652d98..a98c4bda 100644
--- a/test/devices_tests/datetime_test.py
+++ b/test/devices_tests/datetime_test.py
@@ -2,7 +2,6 @@
 import time
 from unittest.mock import patch
 
-import pytest
 from xknx import XKNX
 from xknx.devices import DateTime
 from xknx.dpt import DPTArray
@@ -10,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse
 
 
-@pytest.mark.asyncio
 class TestDateTime:
     """Test class for DateTime object."""
 
diff --git a/test/devices_tests/device_test.py b/test/devices_tests/device_test.py
index 8c27355c..1e23909f 100644
--- a/test/devices_tests/device_test.py
+++ b/test/devices_tests/device_test.py
@@ -1,7 +1,6 @@
 """Unit test for Switch objects."""
 from unittest.mock import AsyncMock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.devices import Device, Sensor
 from xknx.dpt import DPTArray
@@ -9,7 +8,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 @patch.multiple(Device, __abstractmethods__=set())
 class TestDevice:
     """Test class for Switch object."""
diff --git a/test/devices_tests/devices_test.py b/test/devices_tests/devices_test.py
index e3e7b90e..b84800db 100644
--- a/test/devices_tests/devices_test.py
+++ b/test/devices_tests/devices_test.py
@@ -2,12 +2,12 @@
 from unittest.mock import AsyncMock, patch
 
 import pytest
+
 from xknx import XKNX
 from xknx.devices import BinarySensor, Device, Devices, Light, Switch
 from xknx.telegram import GroupAddress
 
 
-@pytest.mark.asyncio
 class TestDevices:
     """Test class for devices container within XKNX."""
 
diff --git a/test/devices_tests/expose_sensor_test.py b/test/devices_tests/expose_sensor_test.py
index 6640dc58..04a4585e 100644
--- a/test/devices_tests/expose_sensor_test.py
+++ b/test/devices_tests/expose_sensor_test.py
@@ -1,7 +1,6 @@
 """Unit test for Sensor objects."""
 from unittest.mock import AsyncMock
 
-import pytest
 from xknx import XKNX
 from xknx.devices import ExposeSensor
 from xknx.dpt import DPTArray, DPTBinary
@@ -9,7 +8,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestExposeSensor:
     """Test class for Sensor objects."""
 
diff --git a/test/devices_tests/fan_test.py b/test/devices_tests/fan_test.py
index eaffac86..7ae82a09 100644
--- a/test/devices_tests/fan_test.py
+++ b/test/devices_tests/fan_test.py
@@ -1,7 +1,6 @@
 """Unit test for Fan objects."""
 from unittest.mock import AsyncMock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.devices import Fan
 from xknx.dpt import DPTArray, DPTBinary
@@ -9,7 +8,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestFan:
     """Class for testing Fan objects."""
 
diff --git a/test/devices_tests/light_test.py b/test/devices_tests/light_test.py
index 593b8f5c..1fdbc5f4 100644
--- a/test/devices_tests/light_test.py
+++ b/test/devices_tests/light_test.py
@@ -1,7 +1,6 @@
 """Unit test for Light objects."""
 from unittest.mock import AsyncMock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.devices import Light
 from xknx.dpt import DPTArray, DPTBinary
@@ -9,7 +8,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestLight:
     """Class for testing Light objects."""
 
diff --git a/test/devices_tests/notification_test.py b/test/devices_tests/notification_test.py
index 5a9b7197..4f5deb26 100644
--- a/test/devices_tests/notification_test.py
+++ b/test/devices_tests/notification_test.py
@@ -1,7 +1,6 @@
 """Unit test for Notification objects."""
 from unittest.mock import AsyncMock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.devices import Notification
 from xknx.dpt import DPTArray, DPTBinary, DPTString
@@ -9,7 +8,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestNotification:
     """Test class for Notification object."""
 
diff --git a/test/devices_tests/numeric_value_test.py b/test/devices_tests/numeric_value_test.py
index c635bece..39673890 100644
--- a/test/devices_tests/numeric_value_test.py
+++ b/test/devices_tests/numeric_value_test.py
@@ -2,6 +2,7 @@
 from unittest.mock import AsyncMock
 
 import pytest
+
 from xknx import XKNX
 from xknx.devices import NumericValue
 from xknx.dpt import DPTArray
@@ -9,7 +10,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestNumericValue:
     """Test class for NumericValue objects."""
 
diff --git a/test/devices_tests/raw_value_test.py b/test/devices_tests/raw_value_test.py
index c7b42ef2..ae26ba41 100644
--- a/test/devices_tests/raw_value_test.py
+++ b/test/devices_tests/raw_value_test.py
@@ -2,6 +2,7 @@
 from unittest.mock import AsyncMock
 
 import pytest
+
 from xknx import XKNX
 from xknx.devices import RawValue
 from xknx.dpt import DPTArray, DPTBinary
@@ -9,7 +10,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRawValue:
     """Test class for RawValue objects."""
 
diff --git a/test/devices_tests/scene_test.py b/test/devices_tests/scene_test.py
index d21074e6..354a4821 100644
--- a/test/devices_tests/scene_test.py
+++ b/test/devices_tests/scene_test.py
@@ -1,5 +1,4 @@
 """Unit test for Scene objects."""
-import pytest
 from xknx import XKNX
 from xknx.devices import Scene
 from xknx.dpt import DPTArray
@@ -7,7 +6,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestScene:
     """Test class for Scene objects."""
 
diff --git a/test/devices_tests/sensor_expose_loop_test.py b/test/devices_tests/sensor_expose_loop_test.py
index bda263b0..1f5ca197 100644
--- a/test/devices_tests/sensor_expose_loop_test.py
+++ b/test/devices_tests/sensor_expose_loop_test.py
@@ -2,6 +2,7 @@
 from unittest.mock import AsyncMock, call
 
 import pytest
+
 from xknx import XKNX
 from xknx.devices import BinarySensor, ExposeSensor, Sensor
 from xknx.dpt import DPTArray, DPTBinary
@@ -10,7 +11,6 @@ from xknx.telegram.address import GroupAddress, InternalGroupAddress
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestSensorExposeLoop:
     """Process incoming Telegrams and send the values to the bus again."""
 
@@ -240,7 +240,6 @@ class TestSensorExposeLoop:
         await xknx.telegram_queue.stop()
 
 
-@pytest.mark.asyncio
 class TestBinarySensorExposeLoop:
     """Process incoming Telegrams and send the values to the bus again."""
 
@@ -304,7 +303,6 @@ class TestBinarySensorExposeLoop:
         await xknx.telegram_queue.stop()
 
 
-@pytest.mark.asyncio
 class TestBinarySensorInternalGroupAddressExposeLoop:
     """Process incoming Telegrams and send values to other devices."""
 
diff --git a/test/devices_tests/sensor_test.py b/test/devices_tests/sensor_test.py
index 2fae23aa..77472a6b 100644
--- a/test/devices_tests/sensor_test.py
+++ b/test/devices_tests/sensor_test.py
@@ -2,6 +2,7 @@
 from unittest.mock import AsyncMock
 
 import pytest
+
 from xknx import XKNX
 from xknx.devices import Sensor
 from xknx.dpt import DPTArray
@@ -9,7 +10,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestSensor:
     """Test class for Sensor objects."""
 
diff --git a/test/devices_tests/switch_test.py b/test/devices_tests/switch_test.py
index 403fb3a1..6980a19b 100644
--- a/test/devices_tests/switch_test.py
+++ b/test/devices_tests/switch_test.py
@@ -1,7 +1,6 @@
 """Unit test for Switch objects."""
 from unittest.mock import AsyncMock, Mock
 
-import pytest
 from xknx import XKNX
 from xknx.devices import Switch
 from xknx.dpt import DPTBinary
@@ -9,7 +8,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestSwitch:
     """Test class for Switch object."""
 
diff --git a/test/devices_tests/weather_test.py b/test/devices_tests/weather_test.py
index 81e3567b..cc409bb0 100644
--- a/test/devices_tests/weather_test.py
+++ b/test/devices_tests/weather_test.py
@@ -1,7 +1,6 @@
 """Unit test for Weather objects."""
 import datetime
 
-import pytest
 from xknx import XKNX
 from xknx.devices import Weather
 from xknx.devices.weather import WeatherCondition
@@ -10,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestWeather:
     """Test class for Weather objects."""
 
diff --git a/test/dpt_tests/dpt_1byte_signed_test.py b/test/dpt_tests/dpt_1byte_signed_test.py
index c23212cc..24396e45 100644
--- a/test/dpt_tests/dpt_1byte_signed_test.py
+++ b/test/dpt_tests/dpt_1byte_signed_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX DPT 1 byte relative value  objects."""
 import pytest
+
 from xknx.dpt import DPTPercentV8, DPTSignedRelativeValue, DPTValue1Count
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_1byte_uint_test.py b/test/dpt_tests/dpt_1byte_uint_test.py
index e9ce08dd..44038931 100644
--- a/test/dpt_tests/dpt_1byte_uint_test.py
+++ b/test/dpt_tests/dpt_1byte_uint_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX DPT 5.010 value."""
 import pytest
+
 from xknx.dpt import DPTTariff, DPTValue1Ucount
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_2byte_signed_test.py b/test/dpt_tests/dpt_2byte_signed_test.py
index 436e141b..04450493 100644
--- a/test/dpt_tests/dpt_2byte_signed_test.py
+++ b/test/dpt_tests/dpt_2byte_signed_test.py
@@ -3,6 +3,7 @@ import struct
 from unittest.mock import patch
 
 import pytest
+
 from xknx.dpt import DPT2ByteSigned
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_2byte_uint_test.py b/test/dpt_tests/dpt_2byte_uint_test.py
index 71386c78..65f2ec82 100644
--- a/test/dpt_tests/dpt_2byte_uint_test.py
+++ b/test/dpt_tests/dpt_2byte_uint_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX 2 byte objects."""
 import pytest
+
 from xknx.dpt import DPTUElCurrentmA
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_4bit_control_test.py b/test/dpt_tests/dpt_4bit_control_test.py
index 133d7cce..60a29763 100644
--- a/test/dpt_tests/dpt_4bit_control_test.py
+++ b/test/dpt_tests/dpt_4bit_control_test.py
@@ -1,5 +1,6 @@
 """Unit test for DPTControlStepCode objects."""
 import pytest
+
 from xknx.dpt import (
     DPTControlStartStop,
     DPTControlStartStopBlinds,
diff --git a/test/dpt_tests/dpt_4byte_int_test.py b/test/dpt_tests/dpt_4byte_int_test.py
index adc5245e..c60e6fca 100644
--- a/test/dpt_tests/dpt_4byte_int_test.py
+++ b/test/dpt_tests/dpt_4byte_int_test.py
@@ -3,6 +3,7 @@ import struct
 from unittest.mock import patch
 
 import pytest
+
 from xknx.dpt import DPT4ByteSigned, DPT4ByteUnsigned
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_color_test.py b/test/dpt_tests/dpt_color_test.py
index 76811616..83647fba 100644
--- a/test/dpt_tests/dpt_color_test.py
+++ b/test/dpt_tests/dpt_color_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX color objects."""
 import pytest
+
 from xknx.dpt.dpt_color import DPTColorXYY, XYYColor
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_date_test.py b/test/dpt_tests/dpt_date_test.py
index c1350bc5..3769a28a 100644
--- a/test/dpt_tests/dpt_date_test.py
+++ b/test/dpt_tests/dpt_date_test.py
@@ -2,6 +2,7 @@
 import time
 
 import pytest
+
 from xknx.dpt import DPTDate
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_datetime_test.py b/test/dpt_tests/dpt_datetime_test.py
index 4f15acec..bf2de301 100644
--- a/test/dpt_tests/dpt_datetime_test.py
+++ b/test/dpt_tests/dpt_datetime_test.py
@@ -2,6 +2,7 @@
 import time
 
 import pytest
+
 from xknx.dpt import DPTDateTime
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_float_test.py b/test/dpt_tests/dpt_float_test.py
index cc5965d8..0a9dc336 100644
--- a/test/dpt_tests/dpt_float_test.py
+++ b/test/dpt_tests/dpt_float_test.py
@@ -4,6 +4,7 @@ import struct
 from unittest.mock import patch
 
 import pytest
+
 from xknx.dpt import (
     DPT2ByteFloat,
     DPT4ByteFloat,
diff --git a/test/dpt_tests/dpt_hvac_mode_test.py b/test/dpt_tests/dpt_hvac_mode_test.py
index 86d5b931..4d82d9c7 100644
--- a/test/dpt_tests/dpt_hvac_mode_test.py
+++ b/test/dpt_tests/dpt_hvac_mode_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX DPT HVAC Operation modes."""
 import pytest
+
 from xknx.dpt import DPTControllerStatus, DPTHVACMode
 from xknx.dpt.dpt_hvac_mode import HVACOperationMode
 from xknx.exceptions import ConversionError
diff --git a/test/dpt_tests/dpt_scaling_test.py b/test/dpt_tests/dpt_scaling_test.py
index 55359298..fa101476 100644
--- a/test/dpt_tests/dpt_scaling_test.py
+++ b/test/dpt_tests/dpt_scaling_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX DPT 5.001 and 5.003 value."""
 import pytest
+
 from xknx.dpt import DPTAngle, DPTScaling
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_scene_number_test.py b/test/dpt_tests/dpt_scene_number_test.py
index 3d021b5f..75d76729 100644
--- a/test/dpt_tests/dpt_scene_number_test.py
+++ b/test/dpt_tests/dpt_scene_number_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX scene number."""
 import pytest
+
 from xknx.dpt import DPTSceneNumber
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_string_test.py b/test/dpt_tests/dpt_string_test.py
index 45070e2e..b73065ae 100644
--- a/test/dpt_tests/dpt_string_test.py
+++ b/test/dpt_tests/dpt_string_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX string object."""
 import pytest
+
 from xknx.dpt import DPTString
 from xknx.exceptions import ConversionError
 
diff --git a/test/dpt_tests/dpt_test.py b/test/dpt_tests/dpt_test.py
index 5d6e2884..bd4c868f 100644
--- a/test/dpt_tests/dpt_test.py
+++ b/test/dpt_tests/dpt_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX binary/integer objects."""
 import pytest
+
 from xknx.dpt import (
     DPT2ByteFloat,
     DPTArray,
diff --git a/test/dpt_tests/dpt_time_test.py b/test/dpt_tests/dpt_time_test.py
index 569c94c0..4d447d1a 100644
--- a/test/dpt_tests/dpt_time_test.py
+++ b/test/dpt_tests/dpt_time_test.py
@@ -2,6 +2,7 @@
 import time
 
 import pytest
+
 from xknx.dpt import DPTTime
 from xknx.exceptions import ConversionError
 
diff --git a/test/io_tests/gateway_scanner_test.py b/test/io_tests/gateway_scanner_test.py
index 2e82903e..7caf2e39 100644
--- a/test/io_tests/gateway_scanner_test.py
+++ b/test/io_tests/gateway_scanner_test.py
@@ -2,7 +2,6 @@
 import asyncio
 from unittest.mock import MagicMock, create_autospec, patch
 
-import pytest
 from xknx import XKNX
 from xknx.io import GatewayScanFilter, GatewayScanner
 from xknx.io.gateway_scanner import GatewayDescriptor
@@ -18,7 +17,6 @@ from xknx.knxip import (
 from xknx.telegram import IndividualAddress
 
 
-@pytest.mark.asyncio
 class TestGatewayScanner:
     """Test class for xknx/io/GatewayScanner objects."""
 
diff --git a/test/io_tests/knxip_interface_test.py b/test/io_tests/knxip_interface_test.py
index 1177c107..008b698f 100644
--- a/test/io_tests/knxip_interface_test.py
+++ b/test/io_tests/knxip_interface_test.py
@@ -2,14 +2,12 @@
 import threading
 from unittest.mock import DEFAULT, Mock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.io import ConnectionConfig, ConnectionType, knx_interface_factory
 from xknx.io.routing import Routing
 from xknx.io.tunnel import TCPTunnel, UDPTunnel
 
 
-@pytest.mark.asyncio
 class TestKNXIPInterface:
     """Test class for KNX interface objects."""
 
diff --git a/test/io_tests/request_response_tests/connect_test.py b/test/io_tests/request_response_tests/connect_test.py
index 400aca4d..2aa195df 100644
--- a/test/io_tests/request_response_tests/connect_test.py
+++ b/test/io_tests/request_response_tests/connect_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP Connect Request/Response."""
 from unittest.mock import patch
 
-import pytest
 from xknx import XKNX
 from xknx.io.request_response import Connect
 from xknx.io.transport import UDPTransport
@@ -16,7 +15,6 @@ from xknx.knxip import (
 )
 
 
-@pytest.mark.asyncio
 class TestConnect:
     """Test class for xknx/io/Connect objects."""
 
diff --git a/test/io_tests/request_response_tests/connectionstate_test.py b/test/io_tests/request_response_tests/connectionstate_test.py
index 404b6e28..0dec9444 100644
--- a/test/io_tests/request_response_tests/connectionstate_test.py
+++ b/test/io_tests/request_response_tests/connectionstate_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP ConnectionState Request/Response."""
 from unittest.mock import patch
 
-import pytest
 from xknx import XKNX
 from xknx.io.request_response import ConnectionState
 from xknx.io.transport import UDPTransport
@@ -15,7 +14,6 @@ from xknx.knxip import (
 )
 
 
-@pytest.mark.asyncio
 class TestConnectionState:
     """Test class for xknx/io/ConnectionState objects."""
 
diff --git a/test/io_tests/request_response_tests/disconnect_test.py b/test/io_tests/request_response_tests/disconnect_test.py
index 1e908f93..778cac45 100644
--- a/test/io_tests/request_response_tests/disconnect_test.py
+++ b/test/io_tests/request_response_tests/disconnect_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP Disconnect Request/Response."""
 from unittest.mock import patch
 
-import pytest
 from xknx import XKNX
 from xknx.io.request_response import Disconnect
 from xknx.io.transport import UDPTransport
@@ -15,7 +14,6 @@ from xknx.knxip import (
 )
 
 
-@pytest.mark.asyncio
 class TestDisconnect:
     """Test class for xknx/io/Disconnect objects."""
 
diff --git a/test/io_tests/request_response_tests/request_response_test.py b/test/io_tests/request_response_tests/request_response_test.py
index 02ec976b..77d07420 100644
--- a/test/io_tests/request_response_tests/request_response_test.py
+++ b/test/io_tests/request_response_tests/request_response_test.py
@@ -3,13 +3,13 @@ import asyncio
 from unittest.mock import AsyncMock, MagicMock, patch
 
 import pytest
+
 from xknx import XKNX
 from xknx.io.request_response import RequestResponse
 from xknx.io.transport import UDPTransport
 from xknx.knxip import DisconnectResponse, KNXIPBody
 
 
-@pytest.mark.asyncio
 class TestConnectResponse:
     """Test class for xknx/io/Disconnect objects."""
 
diff --git a/test/io_tests/request_response_tests/tunnelling_test.py b/test/io_tests/request_response_tests/tunnelling_test.py
index 2461b285..ae723ad2 100644
--- a/test/io_tests/request_response_tests/tunnelling_test.py
+++ b/test/io_tests/request_response_tests/tunnelling_test.py
@@ -1,7 +1,6 @@
 """Unit test for KNX/IP Tunnelling Request/Response."""
 from unittest.mock import patch
 
-import pytest
 from xknx import XKNX
 from xknx.dpt import DPTArray
 from xknx.io.request_response import Tunnelling
@@ -18,7 +17,6 @@ from xknx.telegram import GroupAddress, IndividualAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestTunnelling:
     """Test class for xknx/io/Tunnelling objects."""
 
diff --git a/test/io_tests/self_description_test.py b/test/io_tests/self_description_test.py
index 2cb31e29..0db4ecf6 100644
--- a/test/io_tests/self_description_test.py
+++ b/test/io_tests/self_description_test.py
@@ -2,14 +2,12 @@
 import asyncio
 from unittest.mock import Mock, patch
 
-import pytest
 from xknx import XKNX
 from xknx.io.self_description import DescriptionQuery, request_description
 from xknx.io.transport.udp_transport import UDPTransport
 from xknx.knxip import HPAI, DescriptionRequest, KNXIPFrame
 
 
-@pytest.mark.asyncio
 class TestSelfDescription:
     """Test class for KNX/IP self description."""
 
diff --git a/test/io_tests/tunnel_test.py b/test/io_tests/tunnel_test.py
index b6ec0469..2694bc14 100644
--- a/test/io_tests/tunnel_test.py
+++ b/test/io_tests/tunnel_test.py
@@ -3,6 +3,7 @@ import asyncio
 from unittest.mock import AsyncMock, Mock, patch
 
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray
 from xknx.io import UDPTunnel
@@ -25,7 +26,6 @@ from xknx.telegram import IndividualAddress, Telegram, TelegramDirection
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestUDPTunnel:
     """Test class for xknx/io/Tunnel objects."""
 
diff --git a/test/knxip_tests/cemi_frame_test.py b/test/knxip_tests/cemi_frame_test.py
index 1e0f3cf7..1793ee95 100644
--- a/test/knxip_tests/cemi_frame_test.py
+++ b/test/knxip_tests/cemi_frame_test.py
@@ -2,6 +2,7 @@
 from unittest.mock import MagicMock
 
 from pytest import fixture, raises
+
 from xknx.dpt import DPTBinary
 from xknx.exceptions import ConversionError, CouldNotParseKNXIP, UnsupportedCEMIMessage
 from xknx.knxip.cemi_frame import CEMIFrame
diff --git a/test/knxip_tests/connect_request_test.py b/test/knxip_tests/connect_request_test.py
index b97e9635..e3a13828 100644
--- a/test/knxip_tests/connect_request_test.py
+++ b/test/knxip_tests/connect_request_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/connect_response_test.py b/test/knxip_tests/connect_response_test.py
index 34b994e1..e2cf9971 100644
--- a/test/knxip_tests/connect_response_test.py
+++ b/test/knxip_tests/connect_response_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/connectionstate_request_test.py b/test/knxip_tests/connectionstate_request_test.py
index b847e376..04b07f50 100644
--- a/test/knxip_tests/connectionstate_request_test.py
+++ b/test/knxip_tests/connectionstate_request_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/connectionstate_response_test.py b/test/knxip_tests/connectionstate_response_test.py
index 10b68a6b..0007d5b7 100644
--- a/test/knxip_tests/connectionstate_response_test.py
+++ b/test/knxip_tests/connectionstate_response_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/dib_test.py b/test/knxip_tests/dib_test.py
index b881e39c..cd5478c8 100644
--- a/test/knxip_tests/dib_test.py
+++ b/test/knxip_tests/dib_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX/IP DIB objects."""
 import pytest
+
 from xknx.exceptions import CouldNotParseKNXIP
 from xknx.knxip import (
     DIB,
diff --git a/test/knxip_tests/disconnect_request_test.py b/test/knxip_tests/disconnect_request_test.py
index 21494690..1d298a51 100644
--- a/test/knxip_tests/disconnect_request_test.py
+++ b/test/knxip_tests/disconnect_request_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/disconnect_response_test.py b/test/knxip_tests/disconnect_response_test.py
index 5a0cabb3..e712ea1b 100644
--- a/test/knxip_tests/disconnect_response_test.py
+++ b/test/knxip_tests/disconnect_response_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/header_test.py b/test/knxip_tests/header_test.py
index 278db27a..333a5f12 100644
--- a/test/knxip_tests/header_test.py
+++ b/test/knxip_tests/header_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/hpai_test.py b/test/knxip_tests/hpai_test.py
index 92dcdd59..6dd675ec 100644
--- a/test/knxip_tests/hpai_test.py
+++ b/test/knxip_tests/hpai_test.py
@@ -1,5 +1,6 @@
 """Unit test for KNX/IP HPAI objects."""
 import pytest
+
 from xknx.exceptions import ConversionError, CouldNotParseKNXIP
 from xknx.knxip import HPAI, HostProtocol
 
diff --git a/test/knxip_tests/knxip_test.py b/test/knxip_tests/knxip_test.py
index 76ede7fd..1050e0b8 100644
--- a/test/knxip_tests/knxip_test.py
+++ b/test/knxip_tests/knxip_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/tunnelling_ack_test.py b/test/knxip_tests/tunnelling_ack_test.py
index 4ca40318..e279fba2 100644
--- a/test/knxip_tests/tunnelling_ack_test.py
+++ b/test/knxip_tests/tunnelling_ack_test.py
@@ -1,5 +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
diff --git a/test/knxip_tests/tunnelling_request_test.py b/test/knxip_tests/tunnelling_request_test.py
index 8eb3f93f..84727309 100644
--- a/test/knxip_tests/tunnelling_request_test.py
+++ b/test/knxip_tests/tunnelling_request_test.py
@@ -1,5 +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
diff --git a/test/remote_value_tests/remote_value_1count_test.py b/test/remote_value_tests/remote_value_1count_test.py
index e6d48e8a..3cdaf76c 100644
--- a/test/remote_value_tests/remote_value_1count_test.py
+++ b/test/remote_value_tests/remote_value_1count_test.py
@@ -1,5 +1,4 @@
 """Unit test for RemoteValue1Count objects."""
-import pytest
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.remote_value import RemoteValue1Count
@@ -7,7 +6,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValue1Count:
     """Test class for RemoteValue1Count objects."""
 
diff --git a/test/remote_value_tests/remote_value_climate_mode_test.py b/test/remote_value_tests/remote_value_climate_mode_test.py
index 0d09c72c..7081a5de 100644
--- a/test/remote_value_tests/remote_value_climate_mode_test.py
+++ b/test/remote_value_tests/remote_value_climate_mode_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueClimateMode objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.dpt.dpt_hvac_mode import HVACControllerMode, HVACOperationMode
@@ -14,7 +15,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueOperationMode:
     """Test class for RemoteValueOperationMode objects."""
 
diff --git a/test/remote_value_tests/remote_value_color_rgb_test.py b/test/remote_value_tests/remote_value_color_rgb_test.py
index e2a2ff12..003a74da 100644
--- a/test/remote_value_tests/remote_value_color_rgb_test.py
+++ b/test/remote_value_tests/remote_value_color_rgb_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueColorRGB objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueColorRGB:
     """Test class for RemoteValueColorRGB objects."""
 
diff --git a/test/remote_value_tests/remote_value_color_rgbw_test.py b/test/remote_value_tests/remote_value_color_rgbw_test.py
index 1fa711ab..6394473c 100644
--- a/test/remote_value_tests/remote_value_color_rgbw_test.py
+++ b/test/remote_value_tests/remote_value_color_rgbw_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueColorRGBW objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueColorRGBW:
     """Test class for RemoteValueColorRGBW objects."""
 
diff --git a/test/remote_value_tests/remote_value_color_xyy_test.py b/test/remote_value_tests/remote_value_color_xyy_test.py
index f83e0e3f..a6ece42f 100644
--- a/test/remote_value_tests/remote_value_color_xyy_test.py
+++ b/test/remote_value_tests/remote_value_color_xyy_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueColorXYY objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueColorXYY:
     """Test class for RemoteValueColorXYY objects."""
 
diff --git a/test/remote_value_tests/remote_value_control_test.py b/test/remote_value_tests/remote_value_control_test.py
index f1eaac7a..eb8d8292 100644
--- a/test/remote_value_tests/remote_value_control_test.py
+++ b/test/remote_value_tests/remote_value_control_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueControl objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueControl:
     """Test class for RemoteValueControl objects."""
 
diff --git a/test/remote_value_tests/remote_value_datetime_test.py b/test/remote_value_tests/remote_value_datetime_test.py
index 20270a28..8d7e0ada 100644
--- a/test/remote_value_tests/remote_value_datetime_test.py
+++ b/test/remote_value_tests/remote_value_datetime_test.py
@@ -2,6 +2,7 @@
 import time
 
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray
 from xknx.exceptions import ConversionError, CouldNotParseTelegram
diff --git a/test/remote_value_tests/remote_value_dpt_2_byte_unsigned_test.py b/test/remote_value_tests/remote_value_dpt_2_byte_unsigned_test.py
index a777c4aa..8f062344 100644
--- a/test/remote_value_tests/remote_value_dpt_2_byte_unsigned_test.py
+++ b/test/remote_value_tests/remote_value_dpt_2_byte_unsigned_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueDpt2ByteUnsigned objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueDptValue2Ucount:
     """Test class for RemoteValueDpt2ByteUnsigned objects."""
 
diff --git a/test/remote_value_tests/remote_value_dpt_value_1_ucount_test.py b/test/remote_value_tests/remote_value_dpt_value_1_ucount_test.py
index 8191ded8..878187f1 100644
--- a/test/remote_value_tests/remote_value_dpt_value_1_ucount_test.py
+++ b/test/remote_value_tests/remote_value_dpt_value_1_ucount_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueDptValue1Ucount objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueDptValue1Ucount:
     """Test class for RemoteValueDptValue1Ucount objects."""
 
diff --git a/test/remote_value_tests/remote_value_raw_test.py b/test/remote_value_tests/remote_value_raw_test.py
index e362d325..b76ef025 100644
--- a/test/remote_value_tests/remote_value_raw_test.py
+++ b/test/remote_value_tests/remote_value_raw_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueRaw objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueRaw:
     """Test class for RemoteValueRaw objects."""
 
diff --git a/test/remote_value_tests/remote_value_scene_number_test.py b/test/remote_value_tests/remote_value_scene_number_test.py
index e8140c2a..e1de6c7b 100644
--- a/test/remote_value_tests/remote_value_scene_number_test.py
+++ b/test/remote_value_tests/remote_value_scene_number_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueSceneNumber objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueSceneNumber:
     """Test class for RemoteValueSceneNumber objects."""
 
diff --git a/test/remote_value_tests/remote_value_sensor_test.py b/test/remote_value_tests/remote_value_sensor_test.py
index 0db9aae2..eb491171 100644
--- a/test/remote_value_tests/remote_value_sensor_test.py
+++ b/test/remote_value_tests/remote_value_sensor_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueSensor objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBase, DPTBinary, DPTValue1Ucount
 from xknx.exceptions import ConversionError, CouldNotParseTelegram
diff --git a/test/remote_value_tests/remote_value_setepoint_shift_test.py b/test/remote_value_tests/remote_value_setepoint_shift_test.py
index a1669b47..77693bec 100644
--- a/test/remote_value_tests/remote_value_setepoint_shift_test.py
+++ b/test/remote_value_tests/remote_value_setepoint_shift_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueSetpointShift objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary, DPTTemperature, DPTValue1Count
 from xknx.exceptions import ConversionError, CouldNotParseTelegram
diff --git a/test/remote_value_tests/remote_value_step_test.py b/test/remote_value_tests/remote_value_step_test.py
index 775f8a37..e28fd930 100644
--- a/test/remote_value_tests/remote_value_step_test.py
+++ b/test/remote_value_tests/remote_value_step_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueStep objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueStep:
     """Test class for RemoteValueStep objects."""
 
diff --git a/test/remote_value_tests/remote_value_string_test.py b/test/remote_value_tests/remote_value_string_test.py
index 6a20dedc..f47de16e 100644
--- a/test/remote_value_tests/remote_value_string_test.py
+++ b/test/remote_value_tests/remote_value_string_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueString objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueString:
     """Test class for RemoteValueString objects."""
 
diff --git a/test/remote_value_tests/remote_value_switch_test.py b/test/remote_value_tests/remote_value_switch_test.py
index 696adf8e..e09ff5b9 100644
--- a/test/remote_value_tests/remote_value_switch_test.py
+++ b/test/remote_value_tests/remote_value_switch_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueSwitch objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueSwitch:
     """Test class for RemoteValueSwitch objects."""
 
diff --git a/test/remote_value_tests/remote_value_temp_test.py b/test/remote_value_tests/remote_value_temp_test.py
index 24957974..26f0f3cb 100644
--- a/test/remote_value_tests/remote_value_temp_test.py
+++ b/test/remote_value_tests/remote_value_temp_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueSceneNumber objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueTemp:
     """Test class for RemoteValueTemp objects."""
 
diff --git a/test/remote_value_tests/remote_value_test.py b/test/remote_value_tests/remote_value_test.py
index f234aafd..502c9dd6 100644
--- a/test/remote_value_tests/remote_value_test.py
+++ b/test/remote_value_tests/remote_value_test.py
@@ -2,6 +2,7 @@
 from unittest.mock import AsyncMock, patch
 
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPT2ByteFloat, DPTArray, DPTBinary
 from xknx.exceptions import ConversionError, CouldNotParseTelegram
@@ -10,7 +11,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 @patch.multiple(RemoteValue, __abstractmethods__=set())
 class TestRemoteValue:
     """Test class for RemoteValue objects."""
diff --git a/test/remote_value_tests/remote_value_updown_test.py b/test/remote_value_tests/remote_value_updown_test.py
index 1eb5bbee..569dcb82 100644
--- a/test/remote_value_tests/remote_value_updown_test.py
+++ b/test/remote_value_tests/remote_value_updown_test.py
@@ -1,5 +1,6 @@
 """Unit test for RemoteValueUpDown objects."""
 import pytest
+
 from xknx import XKNX
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
@@ -8,7 +9,6 @@ from xknx.telegram import GroupAddress, Telegram
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestRemoteValueUpDown:
     """Test class for RemoteValueUpDown objects."""
 
diff --git a/test/str_test.py b/test/str_test.py
index 3c839acb..b5cff428 100644
--- a/test/str_test.py
+++ b/test/str_test.py
@@ -1,7 +1,6 @@
 """Unit test for String representations."""
 from unittest.mock import patch
 
-import pytest
 from xknx import XKNX
 from xknx.devices import (
     BinarySensor,
@@ -58,7 +57,6 @@ from xknx.telegram import GroupAddress, IndividualAddress, Telegram, TelegramDir
 from xknx.telegram.apci import GroupValueWrite
 
 
-@pytest.mark.asyncio
 class TestStringRepresentations:
     """Test class for Configuration logic."""
 
diff --git a/test/telegram_tests/address_filter_test.py b/test/telegram_tests/address_filter_test.py
index 545bf15c..c3817a09 100644
--- a/test/telegram_tests/address_filter_test.py
+++ b/test/telegram_tests/address_filter_test.py
@@ -1,5 +1,6 @@
 """Unit test for Address class."""
 import pytest
+
 from xknx.exceptions import ConversionError
 from xknx.telegram import AddressFilter
 from xknx.telegram.address import GroupAddress, InternalGroupAddress
diff --git a/test/telegram_tests/address_test.py b/test/telegram_tests/address_test.py
index 35a44612..ed2d2725 100644
--- a/test/telegram_tests/address_test.py
+++ b/test/telegram_tests/address_test.py
@@ -1,5 +1,6 @@
 """Unit test for Address class."""
 import pytest
+
 from xknx.exceptions import CouldNotParseAddress
 from xknx.telegram.address import (
     GroupAddress,
diff --git a/test/telegram_tests/apci_test.py b/test/telegram_tests/apci_test.py
index 2244f102..eb7706af 100644
--- a/test/telegram_tests/apci_test.py
+++ b/test/telegram_tests/apci_test.py
@@ -1,5 +1,6 @@
 """Unit test for APCI objects."""
 import pytest
+
 from xknx.dpt import DPTArray, DPTBinary
 from xknx.exceptions import ConversionError
 from xknx.telegram.address import IndividualAddress
diff --git a/test/xknx_test.py b/test/xknx_test.py
index 676b5feb..99f8b63d 100644
--- a/test/xknx_test.py
+++ b/test/xknx_test.py
@@ -3,12 +3,12 @@ import os
 from unittest.mock import AsyncMock, patch
 
 import pytest
+
 from xknx import XKNX
 from xknx.exceptions import CommunicationError
 from xknx.io import ConnectionConfig, ConnectionType
 
 
-@pytest.mark.asyncio
 class TestXknxModule:
     """Test class for XKNX."""