add errors to MinerData().as_influxdb()
This commit is contained in:
@@ -208,6 +208,9 @@ class MinerData:
|
|||||||
if attribute == "fault_light" and not self[attribute]:
|
if attribute == "fault_light" and not self[attribute]:
|
||||||
field_data.append(f"{attribute}=false")
|
field_data.append(f"{attribute}=false")
|
||||||
continue
|
continue
|
||||||
|
if attribute == "errors":
|
||||||
|
for idx, item in enumerate(self[attribute]):
|
||||||
|
field_data.append(f'error_{idx+1}="{item.error_message}"')
|
||||||
|
|
||||||
tags_str = ",".join(tag_data)
|
tags_str = ",".join(tag_data)
|
||||||
field_str = ",".join(field_data)
|
field_str = ",".join(field_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user