This commit is contained in:
parent
cf0c2f1e8b
commit
e59cba7603
@ -31,7 +31,7 @@ class MQTT:
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.client_id = client_id
|
||||
self.topic = None
|
||||
self._topic = None
|
||||
self.qos = qos
|
||||
self.retain = retain
|
||||
|
||||
@ -40,15 +40,15 @@ class MQTT:
|
||||
Set topic
|
||||
:return:
|
||||
"""
|
||||
return self.topic
|
||||
return self._topic
|
||||
|
||||
def set_topic(self, _topic: str) -> None:
|
||||
def set_topic(self, value: str) -> None:
|
||||
"""
|
||||
Get current topic
|
||||
:param _topic:
|
||||
:param value:
|
||||
:return:
|
||||
"""
|
||||
self.topic = _topic
|
||||
self._topic = value
|
||||
|
||||
topic = property(get_topic, set_topic)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user