Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ omit =
homeassistant/components/bloomsky/*
homeassistant/components/bluesound/*
homeassistant/components/bluetooth_le_tracker/device_tracker.py
homeassistant/components/bluetooth_tracker/device_tracker.py
homeassistant/components/bluetooth_tracker/*
homeassistant/components/bme280/sensor.py
homeassistant/components/bme680/sensor.py
homeassistant/components/bmw_connected_drive/*
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/bluetooth_tracker/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Constants for the Bluetooth Tracker component."""
DOMAIN = "bluetooth_tracker"
SERVICE_UPDATE = "update"
6 changes: 2 additions & 4 deletions homeassistant/components/bluetooth_tracker/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
CONF_SCAN_INTERVAL,
CONF_TRACK_NEW,
DEFAULT_TRACK_NEW,
DOMAIN,
SCAN_INTERVAL,
SOURCE_TYPE_BLUETOOTH,
)
Expand All @@ -25,6 +24,7 @@
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.typing import HomeAssistantType

from .const import DOMAIN, SERVICE_UPDATE

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -184,8 +184,6 @@ async def handle_manual_update_bluetooth(call):
hass.async_create_task(update_bluetooth())
async_track_time_interval(hass, update_bluetooth, interval)

hass.services.async_register(
DOMAIN, "bluetooth_tracker_update", handle_manual_update_bluetooth
)
hass.services.async_register(DOMAIN, SERVICE_UPDATE, handle_manual_update_bluetooth)

return True
2 changes: 2 additions & 0 deletions homeassistant/components/bluetooth_tracker/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
update:
description: Trigger manual tracker update