Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.lg_thinq.mqtt.ThinQMQTT Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, ThinQApi thinq_api, str client_id, dict[str, DeviceDataUpdateCoordinator] coordinators)
 
bool async_connect (self)
 
None async_disconnect (self, Event|None event=None)
 
None async_end_subscribes (self)
 
None async_handle_device_event (self, dict message)
 
None async_refresh_subscribe (self, datetime|None now=None)
 
None async_start_subscribes (self)
 
None on_message_received (self, str topic, bytes payload, bool dup, Any qos, bool retain, **dict kwargs)
 

Public Attributes

 client
 
 client_id
 
 coordinators
 
 hass
 
 thinq_api
 

Private Member Functions

int _get_failed_device_count (self, list[dict|BaseException|None] results)
 

Detailed Description

A class that implements MQTT connection.

Definition at line 27 of file mqtt.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.lg_thinq.mqtt.ThinQMQTT.__init__ (   self,
HomeAssistant  hass,
ThinQApi  thinq_api,
str  client_id,
dict[str, DeviceDataUpdateCoordinator coordinators 
)
Initialize a mqtt.

Definition at line 30 of file mqtt.py.

Member Function Documentation

◆ _get_failed_device_count()

int homeassistant.components.lg_thinq.mqtt.ThinQMQTT._get_failed_device_count (   self,
list[dict | BaseException | None]   results 
)
private
Check if there exists errors while performing tasks and then return count.

Definition at line 69 of file mqtt.py.

◆ async_connect()

bool homeassistant.components.lg_thinq.mqtt.ThinQMQTT.async_connect (   self)
Create a mqtt client and then try to connect.

Definition at line 44 of file mqtt.py.

◆ async_disconnect()

None homeassistant.components.lg_thinq.mqtt.ThinQMQTT.async_disconnect (   self,
Event | None   event = None 
)
Unregister client and disconnects handlers.

Definition at line 59 of file mqtt.py.

◆ async_end_subscribes()

None homeassistant.components.lg_thinq.mqtt.ThinQMQTT.async_end_subscribes (   self)
Start push/event unsubscribes.

Definition at line 126 of file mqtt.py.

◆ async_handle_device_event()

None homeassistant.components.lg_thinq.mqtt.ThinQMQTT.async_handle_device_event (   self,
dict  message 
)
Handle received mqtt message.

Definition at line 168 of file mqtt.py.

◆ async_refresh_subscribe()

None homeassistant.components.lg_thinq.mqtt.ThinQMQTT.async_refresh_subscribe (   self,
datetime | None   now = None 
)
Update event subscribes.

Definition at line 84 of file mqtt.py.

◆ async_start_subscribes()

None homeassistant.components.lg_thinq.mqtt.ThinQMQTT.async_start_subscribes (   self)
Start push/event subscribes.

Definition at line 99 of file mqtt.py.

◆ on_message_received()

None homeassistant.components.lg_thinq.mqtt.ThinQMQTT.on_message_received (   self,
str  topic,
bytes  payload,
bool  dup,
Any  qos,
bool  retain,
**dict  kwargs 
)
Handle the received message that matching the topic.

Definition at line 147 of file mqtt.py.

Member Data Documentation

◆ client

homeassistant.components.lg_thinq.mqtt.ThinQMQTT.client

Definition at line 47 of file mqtt.py.

◆ client_id

homeassistant.components.lg_thinq.mqtt.ThinQMQTT.client_id

Definition at line 40 of file mqtt.py.

◆ coordinators

homeassistant.components.lg_thinq.mqtt.ThinQMQTT.coordinators

Definition at line 41 of file mqtt.py.

◆ hass

homeassistant.components.lg_thinq.mqtt.ThinQMQTT.hass

Definition at line 38 of file mqtt.py.

◆ thinq_api

homeassistant.components.lg_thinq.mqtt.ThinQMQTT.thinq_api

Definition at line 39 of file mqtt.py.


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