@@ -69,7 +69,7 @@ def __init__(self, mqtt_client):
69
69
)
70
70
# MiniMQTT's username kwarg is optional, IO requires a username
71
71
try :
72
- self ._user = self ._client ._user
72
+ self ._user = self ._client .user
73
73
except :
74
74
raise TypeError (
75
75
"Adafruit IO requires a username, please set one in MiniMQTT"
@@ -86,7 +86,7 @@ def __init__(self, mqtt_client):
86
86
self ._client .on_message = self ._on_message_mqtt
87
87
self ._logger = False
88
88
# Write to the MiniMQTT logger, if avaliable.
89
- if self ._client ._logger is not None :
89
+ if self ._client .logger is not None :
90
90
self ._logger = True
91
91
self ._client .set_logger_level ("DEBUG" )
92
92
self ._connected = False
@@ -427,7 +427,7 @@ class IO_HTTP:
427
427
"""
428
428
429
429
def __init__ (self , adafruit_io_username , adafruit_io_key , wifi_manager ):
430
- self .username = adafruit_io_username
430
+ self ._username = adafruit_io_username
431
431
self .key = adafruit_io_key
432
432
wifi_type = str (type (wifi_manager ))
433
433
if "ESPSPI_WiFiManager" in wifi_type or "ESPAT_WiFiManager" in wifi_type :
@@ -477,7 +477,7 @@ def _compose_path(self, path):
477
477
"""Composes a valid API request path.
478
478
:param str path: Adafruit IO API URL path.
479
479
"""
480
- return "https://io.adafruit.com/api/v2/{0}/{1}" .format (self .username , path )
480
+ return "https://io.adafruit.com/api/v2/{0}/{1}" .format (self ._username , path )
481
481
482
482
# HTTP Requests
483
483
def _post (self , path , payload ):
0 commit comments