Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.mqtt.client.MqttClientSetup Class Reference

Public Member Functions

None __init__ (self, ConfigType config)
 
AsyncMQTTClient client (self)
 
None setup (self)
 

Private Attributes

 _client
 
 _config
 

Detailed Description

Helper class to setup the paho mqtt client from config.

Definition at line 276 of file client.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.mqtt.client.MqttClientSetup.__init__ (   self,
ConfigType  config 
)
Initialize the MQTT client setup helper.

self.setup must be run in an executor job.

Definition at line 281 of file client.py.

Member Function Documentation

◆ client()

AsyncMQTTClient homeassistant.components.mqtt.client.MqttClientSetup.client (   self)
Return the paho MQTT client.

Definition at line 355 of file client.py.

◆ setup()

None homeassistant.components.mqtt.client.MqttClientSetup.setup (   self)
Set up the MQTT client.

The setup of the MQTT client should be run in an executor job,
because it accesses files, so it does IO.

Definition at line 289 of file client.py.

Member Data Documentation

◆ _client

homeassistant.components.mqtt.client.MqttClientSetup._client
private

Definition at line 315 of file client.py.

◆ _config

homeassistant.components.mqtt.client.MqttClientSetup._config
private

Definition at line 287 of file client.py.


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