Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.device_tracker.legacy.DeviceTracker Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, timedelta consider_home, bool track_new, dict[str, Any] defaults, Sequence[Device] devices)
 
None async_see (self, str|None mac=None, str|None dev_id=None, str|None host_name=None, str|None location_name=None, GPSType|None gps=None, int|None gps_accuracy=None, int|None battery=None, dict[str, Any]|None attributes=None, SourceType|str source_type=SourceType.GPS, str|None picture=None, str|None icon=None, timedelta|None consider_home=None)
 
None async_setup_tracked_device (self)
 
None async_update_config (self, str path, str dev_id, Device device)
 
None async_update_stale (self, datetime now)
 
None see (self, str|None mac=None, str|None dev_id=None, str|None host_name=None, str|None location_name=None, GPSType|None gps=None, int|None gps_accuracy=None, int|None battery=None, dict[str, Any]|None attributes=None, SourceType|str source_type=SourceType.GPS, str|None picture=None, str|None icon=None, timedelta|None consider_home=None)
 

Public Attributes

 consider_home
 
 defaults
 
 hass
 
 mac_to_dev
 
 track_new
 

Private Attributes

 _is_updating
 

Detailed Description

Representation of a device tracker.

Definition at line 562 of file legacy.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.device_tracker.legacy.DeviceTracker.__init__ (   self,
HomeAssistant  hass,
timedelta  consider_home,
bool  track_new,
dict[str, Any]  defaults,
Sequence[Device devices 
)
Initialize a device tracker.

Definition at line 565 of file legacy.py.

Member Function Documentation

◆ async_see()

None homeassistant.components.device_tracker.legacy.DeviceTracker.async_see (   self,
str | None   mac = None,
str | None   dev_id = None,
str | None   host_name = None,
str | None   location_name = None,
GPSType | None   gps = None,
int | None   gps_accuracy = None,
int | None   battery = None,
dict[str, Any] | None   attributes = None,
SourceType | str   source_type = SourceType.GPS,
str | None   picture = None,
str | None   icon = None,
timedelta | None   consider_home = None 
)
Notify the device tracker that you see a device.

This method is a coroutine.

Definition at line 625 of file legacy.py.

◆ async_setup_tracked_device()

None homeassistant.components.device_tracker.legacy.DeviceTracker.async_setup_tracked_device (   self)
Set up all not exists tracked devices.

This method is a coroutine.

Definition at line 748 of file legacy.py.

◆ async_update_config()

None homeassistant.components.device_tracker.legacy.DeviceTracker.async_update_config (   self,
str  path,
str  dev_id,
Device  device 
)
Add device to YAML configuration file.

This method is a coroutine.

Definition at line 726 of file legacy.py.

◆ async_update_stale()

None homeassistant.components.device_tracker.legacy.DeviceTracker.async_update_stale (   self,
datetime  now 
)
Update stale devices.

This method must be run in the event loop.

Definition at line 737 of file legacy.py.

◆ see()

None homeassistant.components.device_tracker.legacy.DeviceTracker.see (   self,
str | None   mac = None,
str | None   dev_id = None,
str | None   host_name = None,
str | None   location_name = None,
GPSType | None   gps = None,
int | None   gps_accuracy = None,
int | None   battery = None,
dict[str, Any] | None   attributes = None,
SourceType | str   source_type = SourceType.GPS,
str | None   picture = None,
str | None   icon = None,
timedelta | None   consider_home = None 
)
Notify the device tracker that you see a device.

Definition at line 592 of file legacy.py.

Member Data Documentation

◆ _is_updating

homeassistant.components.device_tracker.legacy.DeviceTracker._is_updating
private

Definition at line 584 of file legacy.py.

◆ consider_home

homeassistant.components.device_tracker.legacy.DeviceTracker.consider_home

Definition at line 577 of file legacy.py.

◆ defaults

homeassistant.components.device_tracker.legacy.DeviceTracker.defaults

Definition at line 583 of file legacy.py.

◆ hass

homeassistant.components.device_tracker.legacy.DeviceTracker.hass

Definition at line 574 of file legacy.py.

◆ mac_to_dev

homeassistant.components.device_tracker.legacy.DeviceTracker.mac_to_dev

Definition at line 576 of file legacy.py.

◆ track_new

homeassistant.components.device_tracker.legacy.DeviceTracker.track_new

Definition at line 578 of file legacy.py.


The documentation for this class was generated from the following file: