Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.owntracks Namespace Reference

Namespaces

 config_flow
 
 const
 
 device_tracker
 
 helper
 
 messages
 

Classes

class  OwnTracksContext
 

Functions

def async_connect_mqtt (hass, component)
 
None async_remove_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 
web.Response handle_webhook (HomeAssistant hass, str webhook_id, web.Request request)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string BEACON_DEV_ID = "beacon"
 
string CONF_EVENTS_ONLY = "events_only"
 
string CONF_MAX_GPS_ACCURACY = "max_gps_accuracy"
 
string CONF_MQTT_TOPIC = "mqtt_topic"
 
string CONF_REGION_MAPPING = "region_mapping"
 
string CONF_WAYPOINT_IMPORT = "waypoints"
 
string CONF_WAYPOINT_WHITELIST = "waypoint_whitelist"
 
 CONFIG_SCHEMA
 
string DEFAULT_OWNTRACKS_TOPIC = "owntracks/#"
 
list PLATFORMS = [Platform.DEVICE_TRACKER]
 

Detailed Description

Support for OwnTracks.

Function Documentation

◆ async_connect_mqtt()

def homeassistant.components.owntracks.async_connect_mqtt (   hass,
  component 
)
Subscribe to MQTT topic.

Definition at line 134 of file __init__.py.

◆ async_remove_entry()

None homeassistant.components.owntracks.async_remove_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Remove an OwnTracks config entry.

Definition at line 126 of file __init__.py.

◆ async_setup()

bool homeassistant.components.owntracks.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Initialize OwnTracks component.

Definition at line 72 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.owntracks.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up OwnTracks entry.

Definition at line 78 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.owntracks.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload an OwnTracks config entry.

Definition at line 117 of file __init__.py.

◆ handle_webhook()

web.Response homeassistant.components.owntracks.handle_webhook ( HomeAssistant  hass,
str  webhook_id,
web.Request   request 
)
Handle webhook callback.

iOS sets the "topic" as part of the payload.
Android does not set a topic but adds headers to the request.

Definition at line 156 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.owntracks._LOGGER = logging.getLogger(__name__)
private

Definition at line 34 of file __init__.py.

◆ BEACON_DEV_ID

string homeassistant.components.owntracks.BEACON_DEV_ID = "beacon"

Definition at line 42 of file __init__.py.

◆ CONF_EVENTS_ONLY

string homeassistant.components.owntracks.CONF_EVENTS_ONLY = "events_only"

Definition at line 41 of file __init__.py.

◆ CONF_MAX_GPS_ACCURACY

string homeassistant.components.owntracks.CONF_MAX_GPS_ACCURACY = "max_gps_accuracy"

Definition at line 36 of file __init__.py.

◆ CONF_MQTT_TOPIC

string homeassistant.components.owntracks.CONF_MQTT_TOPIC = "mqtt_topic"

Definition at line 39 of file __init__.py.

◆ CONF_REGION_MAPPING

string homeassistant.components.owntracks.CONF_REGION_MAPPING = "region_mapping"

Definition at line 40 of file __init__.py.

◆ CONF_WAYPOINT_IMPORT

string homeassistant.components.owntracks.CONF_WAYPOINT_IMPORT = "waypoints"

Definition at line 37 of file __init__.py.

◆ CONF_WAYPOINT_WHITELIST

string homeassistant.components.owntracks.CONF_WAYPOINT_WHITELIST = "waypoint_whitelist"

Definition at line 38 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.owntracks.CONFIG_SCHEMA
Initial value:
1 = vol.All(
2  cv.removed(CONF_WEBHOOK_ID),
3  vol.Schema(
4  {
5  vol.Optional(DOMAIN, default={}): {
6  vol.Optional(CONF_MAX_GPS_ACCURACY): vol.Coerce(float),
7  vol.Optional(CONF_WAYPOINT_IMPORT, default=True): cv.boolean,
8  vol.Optional(CONF_EVENTS_ONLY, default=False): cv.boolean,
9  vol.Optional(
10  CONF_MQTT_TOPIC, default=DEFAULT_OWNTRACKS_TOPIC
11  ): mqtt.valid_subscribe_topic,
12  vol.Optional(CONF_WAYPOINT_WHITELIST): vol.All(
13  cv.ensure_list, [cv.string]
14  ),
15  vol.Optional(CONF_SECRET): vol.Any(
16  vol.Schema({vol.Optional(cv.string): cv.string}), cv.string
17  ),
18  vol.Optional(CONF_REGION_MAPPING, default={}): dict,
19  }
20  },
21  extra=vol.ALLOW_EXTRA,
22  ),
23 )

Definition at line 47 of file __init__.py.

◆ DEFAULT_OWNTRACKS_TOPIC

string homeassistant.components.owntracks.DEFAULT_OWNTRACKS_TOPIC = "owntracks/#"

Definition at line 45 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.owntracks.PLATFORMS = [Platform.DEVICE_TRACKER]

Definition at line 43 of file __init__.py.