#Renaming an entity in ha causes influxdb to loose history.

12 messages · Page 1 of 1 (latest)

cold scroll
#

Hello,

I need to rename a device and it's entities, eg. device1 and sensor.device1.temperature to device2 and sensor.device2.temperature. When I do, ha keeps the History of the old entity, but influxdb no. There is any solution or workaround for that?

Thanks!

brisk finch
#

That's because HA looses history as well and influx is pulling from the same source. Don't rename it if you need the history.

#

New entity name, no longer the samer thing. Replace something and use the old entity name, that is the same thing and history stays.

#

That's how it's designed.

cold scroll
#

but in ha, when I rename the entity, I see the History.

fallow trail
#

If you are using Grafana to graph your influxDB data it doesn't matter. Your graph query can be sensor.device1.temperature OR sensor.device2.temperature.

#

Sensor 1 fills the first part of the graph up to the time it was renamed then sensor 2 takes over for the rest.

cold scroll
#

Yes but when I rename the entity to device2.temperature, grafana has no data to visualize.
Ok I see, but that's my problem. I want to transfer all data from old entity to new one somehow. Because the device name I want to use is completely different. Even the room is different.

#

So if I'm getting it right, no way to do that, so I'm stuck with the old entity name.

fallow trail
#

As I said it depends what you are doing with the data. You can work around nearly everything. You may even be able to find the commands to rename the InfluxDB entity. But do that before you rename the HA entity.

cold scroll
#

Your suggestion?