Use serial number for AirVisal Pro config entry unique ID (#84902)
* Use serial number for AirVisal Pro config entry unique ID * Code review
This commit is contained in:
parent
fdf2f8a2ea
commit
34b5928707
4 changed files with 45 additions and 23 deletions
|
@ -12,9 +12,9 @@ from tests.common import MockConfigEntry, load_fixture
|
|||
|
||||
|
||||
@pytest.fixture(name="config_entry")
|
||||
def config_entry_fixture(hass, config, unique_id):
|
||||
def config_entry_fixture(hass, config):
|
||||
"""Define a config entry fixture."""
|
||||
entry = MockConfigEntry(domain=DOMAIN, unique_id=unique_id, data=config)
|
||||
entry = MockConfigEntry(domain=DOMAIN, unique_id="XXXXXXX", data=config)
|
||||
entry.add_to_hass(hass)
|
||||
return entry
|
||||
|
||||
|
@ -69,9 +69,3 @@ async def setup_airvisual_pro_fixture(hass, config, pro):
|
|||
assert await async_setup_component(hass, DOMAIN, config)
|
||||
await hass.async_block_till_done()
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture(name="unique_id")
|
||||
def unique_id_fixture(hass):
|
||||
"""Define a config entry unique ID fixture."""
|
||||
return "192.168.1.101"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue