diff --git a/tests/components/matrix/test_commands.py b/tests/components/matrix/test_commands.py
index 8539252ad66fb48bcc3e6b7251998791b00886d7..dabee74fdc3265c47f7fd4dbb862c864b5bf6a1f 100644
--- a/tests/components/matrix/test_commands.py
+++ b/tests/components/matrix/test_commands.py
@@ -1,11 +1,11 @@
 """Test MatrixBot's ability to parse and respond to commands in matrix rooms."""
 
+from dataclasses import dataclass
 from functools import partial
 from itertools import chain
 from typing import Any
 
 from nio import MatrixRoom, RoomMessageText
-from pydantic.dataclasses import dataclass
 import pytest
 
 from homeassistant.components.matrix import MatrixBot, RoomID