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

Namespaces

 config_flow
 
 const
 
 device_tracker
 

Functions

str _id (str value)
 
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

 async_remove_entry = config_entry_flow.webhook_async_remove_entry
 
int DEFAULT_ACCURACY = 200
 
int DEFAULT_BATTERY = -1
 
list PLATFORMS = [Platform.DEVICE_TRACKER]
 
string TRACKER_UPDATE = f"{DOMAIN}_tracker_update"
 
 WEBHOOK_SCHEMA
 

Detailed Description

Support for GPSLogger.

Function Documentation

◆ _id()

str homeassistant.components.gpslogger._id ( str  value)
private
Coerce id by removing '-'.

Definition at line 37 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.gpslogger.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Configure based on config entry.

Definition at line 92 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.gpslogger.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

Definition at line 104 of file __init__.py.

◆ handle_webhook()

web.Response homeassistant.components.gpslogger.handle_webhook ( HomeAssistant  hass,
str  webhook_id,
web.Request   request 
)
Handle incoming webhook with GPSLogger request.

Definition at line 58 of file __init__.py.

Variable Documentation

◆ async_remove_entry

homeassistant.components.gpslogger.async_remove_entry = config_entry_flow.webhook_async_remove_entry

Definition at line 111 of file __init__.py.

◆ DEFAULT_ACCURACY

int homeassistant.components.gpslogger.DEFAULT_ACCURACY = 200

Definition at line 33 of file __init__.py.

◆ DEFAULT_BATTERY

int homeassistant.components.gpslogger.DEFAULT_BATTERY = -1

Definition at line 34 of file __init__.py.

◆ PLATFORMS

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

Definition at line 28 of file __init__.py.

◆ TRACKER_UPDATE

string homeassistant.components.gpslogger.TRACKER_UPDATE = f"{DOMAIN}_tracker_update"

Definition at line 30 of file __init__.py.

◆ WEBHOOK_SCHEMA

homeassistant.components.gpslogger.WEBHOOK_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(ATTR_DEVICE): _id,
4  vol.Required(ATTR_LATITUDE): cv.latitude,
5  vol.Required(ATTR_LONGITUDE): cv.longitude,
6  vol.Optional(ATTR_ACCURACY, default=DEFAULT_ACCURACY): vol.Coerce(float),
7  vol.Optional(ATTR_ACTIVITY): cv.string,
8  vol.Optional(ATTR_ALTITUDE): vol.Coerce(float),
9  vol.Optional(ATTR_BATTERY, default=DEFAULT_BATTERY): vol.Coerce(float),
10  vol.Optional(ATTR_DIRECTION): vol.Coerce(float),
11  vol.Optional(ATTR_PROVIDER): cv.string,
12  vol.Optional(ATTR_SPEED): vol.Coerce(float),
13  }
14 )

Definition at line 42 of file __init__.py.