Combining influxdb series & measurements after renaming an entity?

I updated my modbus sensor config after getting some more metering equipment. This resulted in a new entity id which inturn pushed the new entity id into influxdb. I also took this time to correct the units which I had defined as lower case to their proper upper case units.

Is there a way to combine these old and new series (and/or measurements?) so that I don’t have two data series?

1 Like

Hmm. That could be tricky using the visual editor. As this requires the same unit:

You may be able to use the query editor and just OR the two queries.

Click the pencil icon next to one of them, copy the whole query:

And OR it in the edit box of the other sensor.

I’m not sure this will work due to the incompatible units.

If it does not, just discard the changes by navigating back to the dashboard then pick another dashboard. Choose “discard” in the pop-up.

Brilliant! It works, but unfortunately, it doesn’t like me going back to the GUI editor.

SELECT integral("value") /3600 FROM "w" WHERE ("entity_id" = 'pm8_active_power_total') OR ("entity_id" = 'active_power_total') AND $timeFilter GROUP BY time(1d) fill(null)

But I am still curious if there’s a way to fix the raw data by modifying the influxdb…