mirror of
https://github.com/OMGeeky/homecontrol.esp-sensors.git
synced 2026-02-23 15:49:52 +01:00
refactor: move MQTT client implementation to a separate module for better organization
This commit is contained in:
@@ -26,7 +26,7 @@ The implementation provides the following features:
|
||||
|
||||
### MQTTClient
|
||||
|
||||
The `MQTTClient` class is the core implementation of the MQTT protocol. It handles the low-level details of the MQTT protocol, including packet formatting, socket communication, and protocol state management.
|
||||
The `MQTTClient` class is the core implementation of the MQTT protocol. It handles the low-level details of the MQTT protocol, including packet formatting, socket communication, and protocol state management. This class is now in its own module `mqtt_client.py` for better testability and separation of concerns.
|
||||
|
||||
#### Methods
|
||||
|
||||
@@ -105,7 +105,7 @@ if client.connect():
|
||||
For more control over the MQTT protocol, you can use the `MQTTClient` class directly:
|
||||
|
||||
```python
|
||||
from esp_sensors.mqtt import MQTTClient
|
||||
from esp_sensors.mqtt_client import MQTTClient
|
||||
import time
|
||||
|
||||
# Create client
|
||||
|
||||
Reference in New Issue
Block a user