scottyphillips / echonetlite_homeassistant

A Home Assistant custom component for use with ECHONET enabled devices.
MIT License
137 stars 42 forks source link

Latest update doubles most of my entries #165

Closed lordCONAN closed 9 months ago

lordCONAN commented 9 months ago

The latest update replaced my aircon and eco one entries with new ones with _2 appended to the entity names. Not sure if this was intentional, or I missed something in the patch notes, but it is a little bit of a hassle deleting all the old entries and renaming the new ones to match the old ones.

Edit: Realised just deleting the device and readding was the best way to go.

nao-pon commented 9 months ago

@lordCONAN Thank you for your report. Did you install Version 3.8.0-beta2?

lordCONAN commented 9 months ago

Correct.

nao-pon commented 9 months ago

I have an environment configured with Home air conditioner, Low voltage smart electric energy meter, Temperature sensor, Electric lock, Electrically operated blind/shade, General lighting, Hot water generator, Water flow meter, Gas meter...

I tried that, but the entity ID never changed. It seems that the entity ID may change, but I can't reproduce it in my environment, so debugging is not progressing. Do you have any useful information?

scottyphillips commented 9 months ago

I had this issue i think a week ago but I havent been able to replicate it either.

xbmcnut commented 9 months ago

I'm running 3.8.0 Beta4 and now have duplicates with _2 on all duplicate entities. I've removed all original entities and renamed the _2 entities but the now dysfunctional devices remain. Is it possible to remove those with removing the integration?

image

P.S Rolling back to 3.7.9 still left me with duplicates.

nao-pon commented 9 months ago

First, keep a full backup handy.

Removing and re-adding the device on the integration page may resolve the issue.

This may be due to a change in the way HomeAssistant Core handles cases where the device name and entity name are the same, and this integration change. I haven't gotten the cause and solution yet.

lordCONAN commented 9 months ago

Yeah, I'm not sure what caused it. The original entities were listed as "restored". I restarted home assistant and then was able to remove the devices from the integration, and re-add them with the original names.

nao-pon commented 9 months ago

I think I found the cause. Starting from Version 3.8.0, a process has been added to automatically add new instances when they are added to a device. This is probably the cause. I'll see if I can fix this.

This issue affects devices configured with versions below 3.6.0. However, this happens only once when the user reconfigures the device for some reason. It cannot be avoided.

nao-pon commented 9 months ago

Fixed in version 3.8.0-beta5. Thanks guys! 👍

xbmcnut commented 9 months ago

I upgraded to 3.8.0-beta5 but sadly still had to remove all instances and re-add.

nao-pon commented 9 months ago

@xbmcnut It does not include a flow to undo what has been registered twice. This is because in an environment where this problem occurs, the same thing happens if a user intentionally removes and reconfigures the device. Also, it only happens once.

Therefore, the flow added this time corresponds for the environment before dual registration.

In an environment where this problem occurred, we have two options.

  1. Remove and reconfigure the devices.
  2. Delete all unusable entities and remove _2 form usable entity's Entity ID.

Either of these will solve the problem.