Clean up entity registry imports in Shelly tests (#136159)
parent
6e4a21987b
commit
57b17472d7
|
@ -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.components.shelly.const import UPDATE_PERIOD_MULTIPLIER
|
||||||
from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNKNOWN
|
from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNKNOWN
|
||||||
from homeassistant.core import HomeAssistant, State
|
from homeassistant.core import HomeAssistant, State
|
||||||
from homeassistant.helpers import entity_registry as er
|
|
||||||
from homeassistant.helpers.device_registry import DeviceRegistry
|
from homeassistant.helpers.device_registry import DeviceRegistry
|
||||||
from homeassistant.helpers.entity_registry import EntityRegistry
|
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(
|
async def test_rpc_device_virtual_binary_sensor(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
mock_rpc_device: Mock,
|
mock_rpc_device: Mock,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
name: str | None,
|
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(
|
async def test_rpc_remove_virtual_binary_sensor_when_mode_toggle(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
device_registry: DeviceRegistry,
|
device_registry: DeviceRegistry,
|
||||||
mock_rpc_device: Mock,
|
mock_rpc_device: Mock,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
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(
|
async def test_rpc_remove_virtual_binary_sensor_when_orphaned(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
device_registry: DeviceRegistry,
|
device_registry: DeviceRegistry,
|
||||||
mock_rpc_device: Mock,
|
mock_rpc_device: Mock,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -483,7 +482,7 @@ async def test_rpc_remove_virtual_binary_sensor_when_orphaned(
|
||||||
async def test_blu_trv_binary_sensor_entity(
|
async def test_blu_trv_binary_sensor_entity(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mock_blu_trv: Mock,
|
mock_blu_trv: Mock,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
snapshot: SnapshotAssertion,
|
snapshot: SnapshotAssertion,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test BLU TRV binary sensor entity."""
|
"""Test BLU TRV binary sensor entity."""
|
||||||
|
|
|
@ -25,7 +25,6 @@ from homeassistant.const import (
|
||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant, State
|
from homeassistant.core import HomeAssistant, State
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.helpers import entity_registry as er
|
|
||||||
from homeassistant.helpers.device_registry import DeviceRegistry
|
from homeassistant.helpers.device_registry import DeviceRegistry
|
||||||
from homeassistant.helpers.entity_registry import EntityRegistry
|
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(
|
async def test_rpc_device_virtual_switch(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
mock_rpc_device: Mock,
|
mock_rpc_device: Mock,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
name: str | None,
|
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(
|
async def test_rpc_remove_virtual_switch_when_mode_label(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
device_registry: DeviceRegistry,
|
device_registry: DeviceRegistry,
|
||||||
mock_rpc_device: Mock,
|
mock_rpc_device: Mock,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
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(
|
async def test_rpc_remove_virtual_switch_when_orphaned(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
device_registry: DeviceRegistry,
|
device_registry: DeviceRegistry,
|
||||||
mock_rpc_device: Mock,
|
mock_rpc_device: Mock,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -577,7 +576,7 @@ async def test_rpc_remove_virtual_switch_when_orphaned(
|
||||||
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||||
async def test_rpc_device_script_switch(
|
async def test_rpc_device_script_switch(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
mock_rpc_device: Mock,
|
mock_rpc_device: Mock,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
|
@ -8,7 +8,7 @@ import pytest
|
||||||
from homeassistant.components.valve import DOMAIN as VALVE_DOMAIN, ValveState
|
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.const import ATTR_ENTITY_ID, SERVICE_CLOSE_VALVE, SERVICE_OPEN_VALVE
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers.entity_registry import EntityRegistry
|
||||||
|
|
||||||
from . import init_integration
|
from . import init_integration
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ GAS_VALVE_BLOCK_ID = 6
|
||||||
|
|
||||||
async def test_block_device_gas_valve(
|
async def test_block_device_gas_valve(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entity_registry: er.EntityRegistry,
|
entity_registry: EntityRegistry,
|
||||||
mock_block_device: Mock,
|
mock_block_device: Mock,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
Loading…
Reference in New Issue