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

Namespaces

 config_flow
 
 const
 
 device_tracker
 

Functions

str _id (str value)
 
dict _validate_test_mode (dict obj)
 
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__)
 
 async_remove_entry = config_entry_flow.webhook_async_remove_entry
 
string ATTR_DEVICE_ID = "device"
 
string ATTR_TRIGGER = "trigger"
 
string DOMAIN = "locative"
 
list PLATFORMS = [Platform.DEVICE_TRACKER]
 
string TRACKER_UPDATE = f"{DOMAIN}_tracker_update"
 
 WEBHOOK_SCHEMA
 

Detailed Description

Support for Locative.

Function Documentation

◆ _id()

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

Definition at line 37 of file __init__.py.

◆ _validate_test_mode()

dict homeassistant.components.locative._validate_test_mode ( dict  obj)
private
Validate that id is provided outside of test mode.

Definition at line 42 of file __init__.py.

◆ async_setup_entry()

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

Definition at line 114 of file __init__.py.

◆ async_unload_entry()

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

Definition at line 126 of file __init__.py.

◆ handle_webhook()

web.Response homeassistant.components.locative.handle_webhook ( HomeAssistant  hass,
str  webhook_id,
web.Request   request 
)
Handle incoming webhook from Locative.

Definition at line 64 of file __init__.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 26 of file __init__.py.

◆ async_remove_entry

homeassistant.components.locative.async_remove_entry = config_entry_flow.webhook_async_remove_entry

Definition at line 133 of file __init__.py.

◆ ATTR_DEVICE_ID

string homeassistant.components.locative.ATTR_DEVICE_ID = "device"

Definition at line 33 of file __init__.py.

◆ ATTR_TRIGGER

string homeassistant.components.locative.ATTR_TRIGGER = "trigger"

Definition at line 34 of file __init__.py.

◆ DOMAIN

string homeassistant.components.locative.DOMAIN = "locative"

Definition at line 28 of file __init__.py.

◆ PLATFORMS

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

Definition at line 31 of file __init__.py.

◆ TRACKER_UPDATE

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

Definition at line 29 of file __init__.py.

◆ WEBHOOK_SCHEMA

homeassistant.components.locative.WEBHOOK_SCHEMA
Initial value:
1 = vol.All(
2  vol.Schema(
3  {
4  vol.Required(ATTR_LATITUDE): cv.latitude,
5  vol.Required(ATTR_LONGITUDE): cv.longitude,
6  vol.Required(ATTR_DEVICE_ID): cv.string,
7  vol.Required(ATTR_TRIGGER): cv.string,
8  vol.Optional(ATTR_ID): vol.All(cv.string, _id),
9  },
10  extra=vol.ALLOW_EXTRA,
11  ),
12  _validate_test_mode,
13 )

Definition at line 49 of file __init__.py.