heyajohnny / cryptoinfo

Provides Home Assistant sensors for all cryptocurrencies supported by CoinGecko
GNU General Public License v3.0
48 stars 13 forks source link

Different entity name #1

Closed SeLLeRoNe closed 4 years ago

SeLLeRoNe commented 4 years ago

Hi there, first of all, thanks for this integration very nice :)

I would like to make a suggestion, the naming is "generic" while it might be better (and easier) to have it defined in the config, or generated based on what is showing the price for.

For example: image

It is hard to define what is what in the screenshot, but with custom naming or a better naming definition it can be better Example: sensor.cryptoinfo_btc_usd sensor.cryptoinfo_btc_eur sensor.cryptoinfo_xrp_usd sensor.cryptoinfo_xrp_eur

This might also require an adjustment in the configuration: from: cryptocurrency_name: bitcoin to: cryptocurrency_name: btc

Hope it is clear enough and doable if you agree with my suggestions :)

Thanks Andrea

heyajohnny commented 4 years ago

Hi,

I just pushed an update. The name of the sensor will be: "Cryptoinfo " + [cryptocurrency_name] + " " + [currency_name]

So in your example case it will be: sensor.cryptoinfo_bitcoin_usd sensor.cryptoinfo_bitcoin_eur sensor.cryptoinfo_ripple_usd sensor.cryptoinfo_ripple_eur

I personally prefer the ticker/symbol name (btc) above the id (bitcoin), but the CoinGecko API expects the id and doesn't work with the ticker/symbol name and I don't want to put extra load to CoinGecko just for an id to ticker mapping, so this is what it is...

Please let me know if this is oke-ish with you and if it works as expected ;)

SeLLeRoNe commented 4 years ago

Thanks for this :)

I understand the reason why not to use shorter name for the first part, don't worry.

It was just a suggestion to have a better naming (less confusing) and that's working perfectly with this new change :)

Thanks a lot for the time you took to implement this.