Fix test typing

This commit is contained in:
Martin Hjelmare
2025-02-12 11:53:35 +01:00
parent 4870ea907d
commit 8ab627cd44
2 changed files with 4 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ class CommandStore:
"""Register device response.""" """Register device response."""
get_devices_command = gateway.get_devices() get_devices_command = gateway.get_devices()
self.register_response(get_devices_command, [device_response.id]) self.register_response(get_devices_command, [device_response.id])
get_device_command = gateway.get_device(device_response.id) get_device_command = gateway.get_device(str(device_response.id))
self.register_response(get_device_command, device_response.dict(by_alias=True)) self.register_response(get_device_command, device_response.dict(by_alias=True))
def register_response(self, command: Command, response: Any) -> None: def register_response(self, command: Command, response: Any) -> None:

View File

@@ -246,7 +246,9 @@ async def test_turn_on(
) -> None: ) -> None:
"""Test turning on a light.""" """Test turning on a light."""
# Make sure the light is off. # Make sure the light is off.
device.raw.light_control[0].state = 0 light_control = device.raw.light_control
assert light_control
light_control[0].state = 0
await setup_integration(hass) await setup_integration(hass)
await hass.services.async_call( await hass.services.async_call(