Add missing hass type hint in component tests (t) (#124274)

This commit is contained in:
epenet
2024-08-20 12:55:39 +02:00
committed by GitHub
parent 14775c822f
commit 3dc83ef19d
18 changed files with 186 additions and 126 deletions

View File

@@ -2,6 +2,7 @@
import copy
import json
from typing import Any
from unittest.mock import patch
from hatasmota.const import CONF_MAC
@@ -1478,7 +1479,13 @@ async def test_relay_as_light(
assert state is not None
async def _test_split_light(hass, mqtt_mock, config, num_lights, num_switches):
async def _test_split_light(
hass: HomeAssistant,
mqtt_mock: MqttMockHAClient,
config: dict[str, Any],
num_lights: int,
num_switches: int,
) -> None:
"""Test multi-channel light split to single-channel dimmers."""
mac = config["mac"]
@@ -1553,7 +1560,12 @@ async def test_split_light2(
await _test_split_light(hass, mqtt_mock, config, 5, 2)
async def _test_unlinked_light(hass, mqtt_mock, config, num_switches):
async def _test_unlinked_light(
hass: HomeAssistant,
mqtt_mock: MqttMockHAClient,
config: dict[str, Any],
num_switches: int,
) -> None:
"""Test rgbww light split to rgb+ww."""
mac = config["mac"]
num_lights = 2