britkat1980 / giv_tcp

TCP connection (from inverter) and MQTT implementation
71 stars 32 forks source link

After restarting HomeAssistant all GivTCP entities names got renamed to *_2 #100

Closed andrzej-r closed 11 months ago

andrzej-r commented 11 months ago

After restarting HomeAssistant I noticed all existing givtcp_* entities became unavailable and plots of these entities only show data before the restart.

There are new entities available, with "_2" added at the end. Switching to these entities works just fine, but all of the graph history is now lost.

Where is this entity renaming coming from and is it possible to undo it? Ideally, I would like history of these entities merged but I am OK losing a couple of days worth of recent data.

Only GivTCP entities are affected. All other entities (including other MQTT ones) have retained their names.

andrzej-r commented 11 months ago

I noticed the descriptive names of the entities have changed as well. Perhaps that has caused the duplication?

Before: GivTCP [ID] PV Power = sensor.givtcp_[ID]_pv_power

Now: GivTCP PV Power = sensor.givtcp_[ID]_pv_power_2

andrzej-r commented 11 months ago

Looks like a duplicate of issue #31 but I was already using HADEVICEPREFIX=GivTCP in the config and deleting MQTT entries in MQTT Explorer had no effect.

andrzej-r commented 11 months ago

It is a duplicate of issue #31 but the recommended solution did not work.

Fixed it by pinning GivTCP version to 2.1.11:

services:
  GivTCP:
    image: britkat/giv_tcp-ma:2.1.11

I am glad I have only lost half a day of data history. No more GivTCP updates for me.