diff --git a/aioesphomeapi/model.py b/aioesphomeapi/model.py index 1cd41aa..f3f245e 100644 --- a/aioesphomeapi/model.py +++ b/aioesphomeapi/model.py @@ -655,6 +655,7 @@ class DateState(EntityState): # ==================== DATETIME TIME ==================== + @_frozen_dataclass_decorator class TimeInfo(EntityInfo): pass diff --git a/aioesphomeapi/model_conversions.py b/aioesphomeapi/model_conversions.py index baabe91..f67a760 100644 --- a/aioesphomeapi/model_conversions.py +++ b/aioesphomeapi/model_conversions.py @@ -39,7 +39,7 @@ from .api_pb2 import ( # type: ignore SwitchStateResponse, TextSensorStateResponse, TextStateResponse, - TimeStateResponse + TimeStateResponse, ) from .model import ( AlarmControlPanelEntityState, diff --git a/tests/test_client.py b/tests/test_client.py index c524462..42d066c 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -641,6 +641,7 @@ async def test_date_command( auth_client.date_command(**cmd) send.assert_called_once_with(DateCommandRequest(**req)) + # Test time command @pytest.mark.asyncio @pytest.mark.parametrize( @@ -664,6 +665,7 @@ async def test_time_command( auth_client.time_command(**cmd) send.assert_called_once_with(TimeCommandRequest(**req)) + @pytest.mark.asyncio @pytest.mark.parametrize( "cmd, req",