Use core constants for bluetooth_tracker (#46041)
This commit is contained in:
parent
9a570d7c32
commit
6fdb12c09d
1 changed files with 1 additions and 5 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue