Update f-g* tests to use entity & device registry fixtures (#103841)

This commit is contained in:
Jan-Philipp Benecke 2023-11-12 13:07:38 +01:00 committed by GitHub
parent b9bc6ca070
commit 04a497343d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 317 additions and 270 deletions

View file

@ -41,7 +41,9 @@ from . import (
from tests.common import MockConfigEntry
async def test_effects_speed_unique_id(hass: HomeAssistant) -> None:
async def test_effects_speed_unique_id(
hass: HomeAssistant, entity_registry: er.EntityRegistry
) -> None:
"""Test a number unique id."""
config_entry = MockConfigEntry(
domain=DOMAIN,
@ -55,11 +57,12 @@ async def test_effects_speed_unique_id(hass: HomeAssistant) -> None:
await hass.async_block_till_done()
entity_id = "number.bulb_rgbcw_ddeeff_effect_speed"
entity_registry = er.async_get(hass)
assert entity_registry.async_get(entity_id).unique_id == MAC_ADDRESS
async def test_effects_speed_unique_id_no_discovery(hass: HomeAssistant) -> None:
async def test_effects_speed_unique_id_no_discovery(
hass: HomeAssistant, entity_registry: er.EntityRegistry
) -> None:
"""Test a number unique id."""
config_entry = MockConfigEntry(
domain=DOMAIN,
@ -72,7 +75,6 @@ async def test_effects_speed_unique_id_no_discovery(hass: HomeAssistant) -> None
await hass.async_block_till_done()
entity_id = "number.bulb_rgbcw_ddeeff_effect_speed"
entity_registry = er.async_get(hass)
assert entity_registry.async_get(entity_id).unique_id == config_entry.entry_id