Do not clear cache for each attribute (#38)
This commit is contained in:
@@ -26,12 +26,9 @@ class MithermometerWorker(BaseWorker):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
@timeout(8.0)
|
@timeout(8.0)
|
||||||
|
|
||||||
def update_device_state(self, name, poller):
|
def update_device_state(self, name, poller):
|
||||||
|
|
||||||
ret = []
|
ret = []
|
||||||
|
poller.clear_cache()
|
||||||
for attr in monitoredAttrs:
|
for attr in monitoredAttrs:
|
||||||
|
ret.append(MqttMessage(topic=self.format_topic(name, attr), payload=poller.parameter_value(attr)))
|
||||||
ret.append(MqttMessage(topic=self.format_topic(name, attr), payload=poller.parameter_value(attr, read_cached=False)))
|
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
Reference in New Issue
Block a user