Update f-g* tests to use entity & device registry fixtures (#103841)
This commit is contained in:
parent
b9bc6ca070
commit
04a497343d
56 changed files with 317 additions and 270 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue