LordBoos / discord_game

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

Manually format Sensor Naming? #37

Closed pixelwave closed 2 years ago

pixelwave commented 2 years ago

Is there a way to manually add a prefix to each sensor created? Since all are in the format "sensor.username_1234" it is difficult for an autofill plugin to put all discord members in a card. Something like "sensor.discord_username_1234" would be great ...

LordBoos commented 2 years ago

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

pixelwave commented 2 years ago

I checked - and also updated to 4.2.2. The config files also look like you describe in the fix. But the sensors still do not have the "discord_" prefix ... ?

LordBoos commented 2 years ago

It will only work for newly added sensors from this integration, because entity id is user configurable. If you want to update your existing entities, you have to remove discord_game, manualy delete all discord game entities and add discord_game back.

pixelwave commented 2 years ago

Thanks for the info - then I will reinstall and rewire the card ..

LordBoos commented 2 years ago

Please keep in mind, that you have to restart HA after you remove discord_game before removing the entities.

pixelwave commented 2 years ago

Worked - thanks!