Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.mqtt_json.device_tracker Namespace Reference

Functions

def _parse_see_args (dev_id, data)
 
bool async_setup_scanner (HomeAssistant hass, ConfigType config, AsyncSeeCallback async_see, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 GPS_JSON_PAYLOAD_SCHEMA
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for GPS tracking MQTT enabled devices.

Function Documentation

◆ _parse_see_args()

def homeassistant.components.mqtt_json.device_tracker._parse_see_args (   dev_id,
  data 
)
private
Parse the payload location parameters, into the format see expects.

Definition at line 89 of file device_tracker.py.

◆ async_setup_scanner()

bool homeassistant.components.mqtt_json.device_tracker.async_setup_scanner ( HomeAssistant  hass,
ConfigType  config,
AsyncSeeCallback  async_see,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the MQTT JSON tracker.

Definition at line 44 of file device_tracker.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.mqtt_json.device_tracker._LOGGER = logging.getLogger(__name__)
private

Definition at line 27 of file device_tracker.py.

◆ GPS_JSON_PAYLOAD_SCHEMA

homeassistant.components.mqtt_json.device_tracker.GPS_JSON_PAYLOAD_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(ATTR_LATITUDE): vol.Coerce(float),
4  vol.Required(ATTR_LONGITUDE): vol.Coerce(float),
5  vol.Optional(ATTR_GPS_ACCURACY): vol.Coerce(int),
6  vol.Optional(ATTR_BATTERY_LEVEL): vol.Coerce(str),
7  },
8  extra=vol.ALLOW_EXTRA,
9 )

Definition at line 29 of file device_tracker.py.

◆ PLATFORM_SCHEMA

homeassistant.components.mqtt_json.device_tracker.PLATFORM_SCHEMA
Initial value:
1 = DEVICE_TRACKER_PLATFORM_SCHEMA.extend(mqtt.config.SCHEMA_BASE).extend(
2  {vol.Required(CONF_DEVICES): {cv.string: mqtt.valid_subscribe_topic}}
3 )

Definition at line 39 of file device_tracker.py.