LordBoos / discord_game

Home Assistant custom component to get online and game status of Discord users
MIT License
57 stars 9 forks source link

entity_id not using new format? #32

Closed C0NTi closed 2 years ago

C0NTi commented 3 years ago

Entity_ID not using new format.

I have migrated to your new version 4.# and ajusted my config to use discord user ids.

It is definitely working as I am seeing all the new attribute you have added.

It appears the unique_id is using the new format of sensor.discorduser{id number} however the entity_ids themselves are still sensor.{discord_displayname]#{number}

image

LordBoos commented 3 years ago

This is weird because my own entities are using the new format. Could it be cached somewhere in your HA? Where did you get that JSON display? EDIT: found the file "core.entity_registry" with above, but my entity IDs are with the new format. Maybe HA somehow cached those old ids? Can you try to stop HA, remove it and start HA again to see if that fixes it?

C0NTi commented 3 years ago

I went full nuclear.

I deleted the component, manually removed all the entries from the registry. but for some reason they kept defaulting back to the old naming convention, no idea where else it could be cached.

In the end I just manually copied the unique_id to the entity_id and started home assistant and finally the old naming convention did not come back.

LordBoos commented 3 years ago

I will keep this open in for a while to see if it's happening for more users, especially new users.

jhqv commented 3 years ago

I am having the same issue a long time after upgrading. I have rebooted HA a few times since then, so that shouldn't be the issue. The entity id is still sensor._.

image

LordBoos commented 3 years ago

This is weird your entityid don't even follow the old naming, which was sensor.discord{name}#{discriminator}. Are you sure you did not manualy edit those ID's in entity detail sometime in the past? image

jhqv commented 3 years ago

This is weird your entityid don't even follow the old naming, which was sensor.discord{name}#{discriminator}. Are you sure you did not manualy edit those ID's in entity detail sometime in the past?

Yes, it is possible that I edited the entity id a few weeks ago when I was struggling with the ids. I can try removing it completely and reinstalling and see if that helps.

trunks403 commented 3 years ago

Hello, i have also upgraded and entitiy are not using the correct format My entitys name Sensor.username.idnumber

Is not problem for me cause it works :)

LordBoos commented 2 years ago

fixed in https://github.com/LordBoos/discord_game/commit/1825cdbe769185cb266387e88f6366dce0b9dc2f