mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 20:25:07 +02:00
Fix test typing
This commit is contained in:
@@ -28,7 +28,7 @@ class CommandStore:
|
||||
"""Register device response."""
|
||||
get_devices_command = gateway.get_devices()
|
||||
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))
|
||||
|
||||
def register_response(self, command: Command, response: Any) -> None:
|
||||
|
@@ -246,7 +246,9 @@ async def test_turn_on(
|
||||
) -> None:
|
||||
"""Test turning on a light."""
|
||||
# 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 hass.services.async_call(
|
||||
|
Reference in New Issue
Block a user