1
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:
tkdrob 2021-04-27 10:04:45 -04:00 committed by GitHub
parent b91d2be00b
commit 664075962f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -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] = {}

View File

@ -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