diff --git a/tests/components/tradfri/common.py b/tests/components/tradfri/common.py index e81e045b445..55e56bb9f72 100644 --- a/tests/components/tradfri/common.py +++ b/tests/components/tradfri/common.py @@ -1,6 +1,5 @@ """Common tools used for the Tradfri test suite.""" -from copy import deepcopy from dataclasses import dataclass from typing import Any @@ -30,7 +29,7 @@ class CommandStore: get_devices_command = gateway.get_devices() self.register_response(get_devices_command, [device_response.id]) get_device_command = gateway.get_device(device_response.id) - self.register_response(get_device_command, device_response.dict()) + self.register_response(get_device_command, device_response.dict(by_alias=True)) def register_response(self, command: Command, response: Any) -> None: """Register command response.""" @@ -61,7 +60,7 @@ class CommandStore: assert observe_command device_path = "/".join(str(v) for v in device.path) - device_state = deepcopy(device.raw) + device_state = device.raw.dict(by_alias=True) # Create a default observed state based on the sent commands. for command in self.sent_commands: diff --git a/tests/components/tradfri/test_fan.py b/tests/components/tradfri/test_fan.py index 4f72e4709e9..4a4f83dd9cc 100644 --- a/tests/components/tradfri/test_fan.py +++ b/tests/components/tradfri/test_fan.py @@ -93,7 +93,7 @@ async def test_fan_available( ATTR_AIR_PURIFIER_MODE: 0, }, STATE_OFF, - None, + 0, None, ), ( @@ -145,7 +145,7 @@ async def test_fan_available( ATTR_AIR_PURIFIER_MODE: 0, }, STATE_OFF, - None, + 0, None, ), ],