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