mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Adjust smartthings tests which create devices (#98207)
This commit is contained in:
parent
6803a62368
commit
fcdfeb74c8
@ -37,7 +37,7 @@ from homeassistant.components.smartthings.const import (
|
|||||||
STORAGE_VERSION,
|
STORAGE_VERSION,
|
||||||
)
|
)
|
||||||
from homeassistant.config import async_process_ha_core_config
|
from homeassistant.config import async_process_ha_core_config
|
||||||
from homeassistant.config_entries import SOURCE_USER, ConfigEntry
|
from homeassistant.config_entries import SOURCE_USER
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_ACCESS_TOKEN,
|
CONF_ACCESS_TOKEN,
|
||||||
CONF_CLIENT_ID,
|
CONF_CLIENT_ID,
|
||||||
@ -55,13 +55,13 @@ COMPONENT_PREFIX = "homeassistant.components.smartthings."
|
|||||||
async def setup_platform(hass, platform: str, *, devices=None, scenes=None):
|
async def setup_platform(hass, platform: str, *, devices=None, scenes=None):
|
||||||
"""Set up the SmartThings platform and prerequisites."""
|
"""Set up the SmartThings platform and prerequisites."""
|
||||||
hass.config.components.add(DOMAIN)
|
hass.config.components.add(DOMAIN)
|
||||||
config_entry = ConfigEntry(
|
config_entry = MockConfigEntry(
|
||||||
2,
|
version=2,
|
||||||
DOMAIN,
|
domain=DOMAIN,
|
||||||
"Test",
|
title="Test",
|
||||||
{CONF_INSTALLED_APP_ID: str(uuid4())},
|
data={CONF_INSTALLED_APP_ID: str(uuid4())},
|
||||||
SOURCE_USER,
|
|
||||||
)
|
)
|
||||||
|
config_entry.add_to_hass(hass)
|
||||||
broker = DeviceBroker(
|
broker = DeviceBroker(
|
||||||
hass, config_entry, Mock(), Mock(), devices or [], scenes or []
|
hass, config_entry, Mock(), Mock(), devices or [], scenes or []
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user