Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.geo_location.trigger Namespace Reference

Functions

CALLBACK_TYPE async_attach_trigger (HomeAssistant hass, ConfigType config, TriggerActionType action, TriggerInfo trigger_info)
 
bool source_match (State|None state, str source)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 Final
 
 TRIGGER_SCHEMA
 

Detailed Description

Offer geolocation automation rules.

Function Documentation

◆ async_attach_trigger()

CALLBACK_TYPE homeassistant.components.geo_location.trigger.async_attach_trigger ( HomeAssistant  hass,
ConfigType  config,
TriggerActionType  action,
TriggerInfo  trigger_info 
)
Listen for state changes based on configuration.

Definition at line 51 of file trigger.py.

◆ source_match()

bool homeassistant.components.geo_location.trigger.source_match ( State | None  state,
str  source 
)
Check if the state matches the provided source.

Definition at line 46 of file trigger.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.geo_location.trigger._LOGGER = logging.getLogger(__name__)
private

Definition at line 28 of file trigger.py.

◆ Final

homeassistant.components.geo_location.trigger.Final

Definition at line 30 of file trigger.py.

◆ TRIGGER_SCHEMA

homeassistant.components.geo_location.trigger.TRIGGER_SCHEMA
Initial value:
1 = cv.TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_PLATFORM): "geo_location",
4  vol.Required(CONF_SOURCE): cv.string,
5  vol.Required(CONF_ZONE): entity_domain("zone"),
6  vol.Required(CONF_EVENT, default=DEFAULT_EVENT): vol.Any(
7  EVENT_ENTER, EVENT_LEAVE
8  ),
9  }
10 )
Callable[[Any], str] entity_domain(str|list[str] domain)

Definition at line 34 of file trigger.py.