jertel / vuegraf

Populate metrics from your Emporia Vue energy monitoring devices into an InfluxDB
MIT License
167 stars 55 forks source link

Add Detailed Tag to InfluxDB v2 output #64

Closed tgregory86 closed 3 years ago

tgregory86 commented 3 years ago

I noticed when I switched to using InfluxDB2 for Vuegraf, that the detailed tag was omitted. I am not sure how to do a PR, but I edited my local file and added: .tag("detailed", detailed) \

That seemed to add the true/false tag to the data points.

def createDataPoint(account, chanName, watts, timestamp, detailed): dataPoint = None if influxVersion == 2: dataPoint = influxdb_client.Point("energy_usage") \ .tag("account_name", account['name']) \ .tag("device_name", chanName) \ .tag("detailed", detailed) \ .field("usage", watts) \ .time(time=timestamp)

jertel commented 3 years ago

Thanks. Just pushed this fix - let me know if you see anything else with v2.