mirror of
https://github.com/home-assistant/core
synced 2024-08-31 05:57:13 +02:00
Clean up profiler constants (#49752)
This commit is contained in:
parent
b91d2be00b
commit
664075962f
@ -15,6 +15,7 @@ from pyprof2calltree import convert
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_SCAN_INTERVAL, CONF_TYPE
|
||||
from homeassistant.core import HomeAssistant, ServiceCall
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
@ -44,8 +45,6 @@ SERVICES = (
|
||||
DEFAULT_SCAN_INTERVAL = timedelta(seconds=30)
|
||||
|
||||
CONF_SECONDS = "seconds"
|
||||
CONF_SCAN_INTERVAL = "scan_interval"
|
||||
CONF_TYPE = "type"
|
||||
|
||||
LOG_INTERVAL_SUB = "log_interval_subscription"
|
||||
|
||||
@ -54,7 +53,6 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||
"""Set up Profiler from a config entry."""
|
||||
|
||||
lock = asyncio.Lock()
|
||||
domain_data = hass.data[DOMAIN] = {}
|
||||
|
||||
|
@ -5,9 +5,7 @@ from unittest.mock import patch
|
||||
|
||||
from homeassistant import setup
|
||||
from homeassistant.components.profiler import (
|
||||
CONF_SCAN_INTERVAL,
|
||||
CONF_SECONDS,
|
||||
CONF_TYPE,
|
||||
SERVICE_DUMP_LOG_OBJECTS,
|
||||
SERVICE_LOG_EVENT_LOOP_SCHEDULED,
|
||||
SERVICE_LOG_THREAD_FRAMES,
|
||||
@ -17,6 +15,7 @@ from homeassistant.components.profiler import (
|
||||
SERVICE_STOP_LOG_OBJECTS,
|
||||
)
|
||||
from homeassistant.components.profiler.const import DOMAIN
|
||||
from homeassistant.const import CONF_SCAN_INTERVAL, CONF_TYPE
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
from tests.common import MockConfigEntry, async_fire_time_changed
|
||||
|
Loading…
Reference in New Issue
Block a user