From 6fdb12c09d00cbc7eef243f0295e5d72d951d11f Mon Sep 17 00:00:00 2001 From: tkdrob Date: Fri, 5 Feb 2021 09:07:17 -0500 Subject: [PATCH] Use core constants for bluetooth_tracker (#46041) --- .../components/bluetooth_tracker/device_tracker.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/homeassistant/components/bluetooth_tracker/device_tracker.py b/homeassistant/components/bluetooth_tracker/device_tracker.py index af49266bef4..380d8091bd6 100644 --- a/homeassistant/components/bluetooth_tracker/device_tracker.py +++ b/homeassistant/components/bluetooth_tracker/device_tracker.py @@ -20,6 +20,7 @@ from homeassistant.components.device_tracker.legacy import ( YAML_DEVICES, async_load_config, ) +from homeassistant.const import CONF_DEVICE_ID import homeassistant.helpers.config_validation as cv from homeassistant.helpers.event import async_track_time_interval from homeassistant.helpers.typing import HomeAssistantType @@ -32,8 +33,6 @@ BT_PREFIX = "BT_" CONF_REQUEST_RSSI = "request_rssi" -CONF_DEVICE_ID = "device_id" - DEFAULT_DEVICE_ID = -1 PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( @@ -131,7 +130,6 @@ async def async_setup_scanner( async def perform_bluetooth_update(): """Discover Bluetooth devices and update status.""" - _LOGGER.debug("Performing Bluetooth devices discovery and update") tasks = [] @@ -164,7 +162,6 @@ async def async_setup_scanner( async def update_bluetooth(now=None): """Lookup Bluetooth devices and update status.""" - # If an update is in progress, we don't do anything if update_bluetooth_lock.locked(): _LOGGER.debug( @@ -178,7 +175,6 @@ async def async_setup_scanner( async def handle_manual_update_bluetooth(call): """Update bluetooth devices on demand.""" - await update_bluetooth() hass.async_create_task(update_bluetooth())