Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.tractive.TractiveClient Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, aiotractive.Tractive client, str user_id, ConfigEntry config_entry)
 
None subscribe (self)
 
bool subscribed (self)
 
list[aiotractive.trackable_object.TrackableObject] trackable_objects (self)
 
aiotractive.tracker.Tracker tracker (self, str tracker_id)
 
None unsubscribe (self)
 
str user_id (self)
 

Private Member Functions

None _dispatch_tracker_event (self, str event_name, str tracker_id, dict[str, Any] payload)
 
None _listen (self)
 
None _send_hardware_update (self, dict[str, Any] event)
 
None _send_position_update (self, dict[str, Any] event)
 
None _send_switch_update (self, dict[str, Any] event)
 
None _send_wellness_update (self, dict[str, Any] event)
 

Private Attributes

 _client
 
 _config_entry
 
 _hass
 
 _last_hw_time
 
 _last_pos_time
 
 _listen_task
 
 _user_id
 

Detailed Description

A Tractive client.

Definition at line 164 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.tractive.TractiveClient.__init__ (   self,
HomeAssistant  hass,
aiotractive.Tractive  client,
str  user_id,
ConfigEntry  config_entry 
)
Initialize the client.

Definition at line 167 of file __init__.py.

Member Function Documentation

◆ _dispatch_tracker_event()

None homeassistant.components.tractive.TractiveClient._dispatch_tracker_event (   self,
str  event_name,
str  tracker_id,
dict[str, Any]   payload 
)
private

Definition at line 327 of file __init__.py.

◆ _listen()

None homeassistant.components.tractive.TractiveClient._listen (   self)
private

Definition at line 219 of file __init__.py.

◆ _send_hardware_update()

None homeassistant.components.tractive.TractiveClient._send_hardware_update (   self,
dict[str, Any]  event 
)
private

Definition at line 275 of file __init__.py.

◆ _send_position_update()

None homeassistant.components.tractive.TractiveClient._send_position_update (   self,
dict[str, Any]  event 
)
private

Definition at line 316 of file __init__.py.

◆ _send_switch_update()

None homeassistant.components.tractive.TractiveClient._send_switch_update (   self,
dict[str, Any]  event 
)
private

Definition at line 286 of file __init__.py.

◆ _send_wellness_update()

None homeassistant.components.tractive.TractiveClient._send_wellness_update (   self,
dict[str, Any]  event 
)
private

Definition at line 296 of file __init__.py.

◆ subscribe()

None homeassistant.components.tractive.TractiveClient.subscribe (   self)
Start event listener coroutine.

Definition at line 209 of file __init__.py.

◆ subscribed()

bool homeassistant.components.tractive.TractiveClient.subscribed (   self)
Return True if subscribed.

Definition at line 189 of file __init__.py.

◆ trackable_objects()

list[aiotractive.trackable_object.TrackableObject] homeassistant.components.tractive.TractiveClient.trackable_objects (   self)
Get list of trackable objects.

Definition at line 196 of file __init__.py.

◆ tracker()

aiotractive.tracker.Tracker homeassistant.components.tractive.TractiveClient.tracker (   self,
str  tracker_id 
)
Get tracker by id.

Definition at line 205 of file __init__.py.

◆ unsubscribe()

None homeassistant.components.tractive.TractiveClient.unsubscribe (   self)
Stop event listener coroutine.

Definition at line 213 of file __init__.py.

◆ user_id()

str homeassistant.components.tractive.TractiveClient.user_id (   self)
Return user id.

Definition at line 184 of file __init__.py.

Member Data Documentation

◆ _client

homeassistant.components.tractive.TractiveClient._client
private

Definition at line 176 of file __init__.py.

◆ _config_entry

homeassistant.components.tractive.TractiveClient._config_entry
private

Definition at line 181 of file __init__.py.

◆ _hass

homeassistant.components.tractive.TractiveClient._hass
private

Definition at line 175 of file __init__.py.

◆ _last_hw_time

homeassistant.components.tractive.TractiveClient._last_hw_time
private

Definition at line 178 of file __init__.py.

◆ _last_pos_time

homeassistant.components.tractive.TractiveClient._last_pos_time
private

Definition at line 179 of file __init__.py.

◆ _listen_task

homeassistant.components.tractive.TractiveClient._listen_task
private

Definition at line 211 of file __init__.py.

◆ _user_id

homeassistant.components.tractive.TractiveClient._user_id
private

Definition at line 177 of file __init__.py.


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