Clean up entity registry imports in Shelly tests (#136159)

pull/136113/head^2
Maciej Bieniek 2025-01-21 10:47:15 +01:00 committed by GitHub
parent 6e4a21987b
commit 57b17472d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 12 deletions

View File

@ -12,7 +12,6 @@ from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAI
from homeassistant.components.shelly.const import UPDATE_PERIOD_MULTIPLIER
from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNKNOWN
from homeassistant.core import HomeAssistant, State
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.device_registry import DeviceRegistry
from homeassistant.helpers.entity_registry import EntityRegistry
@ -388,7 +387,7 @@ async def test_rpc_restored_sleeping_binary_sensor_no_last_state(
)
async def test_rpc_device_virtual_binary_sensor(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
mock_rpc_device: Mock,
monkeypatch: pytest.MonkeyPatch,
name: str | None,
@ -423,7 +422,7 @@ async def test_rpc_device_virtual_binary_sensor(
async def test_rpc_remove_virtual_binary_sensor_when_mode_toggle(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
device_registry: DeviceRegistry,
mock_rpc_device: Mock,
monkeypatch: pytest.MonkeyPatch,
@ -457,7 +456,7 @@ async def test_rpc_remove_virtual_binary_sensor_when_mode_toggle(
async def test_rpc_remove_virtual_binary_sensor_when_orphaned(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
device_registry: DeviceRegistry,
mock_rpc_device: Mock,
) -> None:
@ -483,7 +482,7 @@ async def test_rpc_remove_virtual_binary_sensor_when_orphaned(
async def test_blu_trv_binary_sensor_entity(
hass: HomeAssistant,
mock_blu_trv: Mock,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
snapshot: SnapshotAssertion,
) -> None:
"""Test BLU TRV binary sensor entity."""

View File

@ -25,7 +25,6 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant, State
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.device_registry import DeviceRegistry
from homeassistant.helpers.entity_registry import EntityRegistry
@ -444,7 +443,7 @@ async def test_wall_display_relay_mode(
)
async def test_rpc_device_virtual_switch(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
mock_rpc_device: Mock,
monkeypatch: pytest.MonkeyPatch,
name: str | None,
@ -517,7 +516,7 @@ async def test_rpc_device_virtual_binary_sensor(
async def test_rpc_remove_virtual_switch_when_mode_label(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
device_registry: DeviceRegistry,
mock_rpc_device: Mock,
monkeypatch: pytest.MonkeyPatch,
@ -551,7 +550,7 @@ async def test_rpc_remove_virtual_switch_when_mode_label(
async def test_rpc_remove_virtual_switch_when_orphaned(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
device_registry: DeviceRegistry,
mock_rpc_device: Mock,
) -> None:
@ -577,7 +576,7 @@ async def test_rpc_remove_virtual_switch_when_orphaned(
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
async def test_rpc_device_script_switch(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
mock_rpc_device: Mock,
monkeypatch: pytest.MonkeyPatch,
) -> None:

View File

@ -8,7 +8,7 @@ import pytest
from homeassistant.components.valve import DOMAIN as VALVE_DOMAIN, ValveState
from homeassistant.const import ATTR_ENTITY_ID, SERVICE_CLOSE_VALVE, SERVICE_OPEN_VALVE
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity_registry import EntityRegistry
from . import init_integration
@ -17,7 +17,7 @@ GAS_VALVE_BLOCK_ID = 6
async def test_block_device_gas_valve(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
entity_registry: EntityRegistry,
mock_block_device: Mock,
monkeypatch: pytest.MonkeyPatch,
) -> None: