Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Can we have a friendlier friendly_name? #41

Closed
RoelandPer opened this issue Feb 6, 2024 · 4 comments
Closed

Feature Request: Can we have a friendlier friendly_name? #41

RoelandPer opened this issue Feb 6, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@RoelandPer
Copy link

RoelandPer commented Feb 6, 2024

Installed your Custom Component after the provider for Skons "dutch_gas_prices" apparently blocked access to their API.
Living literally on the border between Belgium and the Netherlands, I appreciate very much your components allows to query both sides of the border.
What I really liked about Skons' solution was that it allowed to create a "friendly_name" using any attribute returned in the sensor.
See Skons' DOCS.md for more information.

Thanks for the great work

Edit: I may have been shooting faster than my shadow .... blame it on being a newbie around here. Found this article in HA Configuration .... Would this be the way to provide a friendly name?

@myTselection myTselection added the enhancement New feature or request label Feb 7, 2024
@myTselection
Copy link
Owner

Thx for the feedback!
I like the idea of a configurable friendly_name. I'll look into it in the coming days and keep you posted.

@myTselection
Copy link
Owner

I was looking into this.
But I notice different template will be required as different "types" of sensors are being defined:

  • price sensors: price for specific fuel type at the chosen location
  • neighborhood price sensors: price for specific fuel type in the neighborhood of the chosen location (eg 5km or 10km)
  • prediction price sensors: predicted price in coming days, % of increase or decrement of price that is expected
  • official price sensors: official price

@RoelandPer
Copy link
Author

RoelandPer commented Feb 12, 2024

I do not know how other HA users use your integration. To me the sensors for a chosen location, the prediction sensors and official price sensors appear being more "static" when it comes to displaying their values on a dashboard; e.g. the entity name of a chosen gas-station is a fixed choice and can easily be changed using a YAML "name" tag on the dashboard. The neighborhood price sensors have names and addresses varying as prices change throughout the week. My vote would be to direct your efforts just to the "neighborhood price sensors".
I'm looking forward to the day I've grown my Python knowledge enough to offer you a hand coding the other ones. I started with HA just a month ago and just got some books on Python last week. I already just mastered the "elif" (just kidding), so don't be afraid I will be touching your stuff soon ...

@myTselection
Copy link
Owner

I've found some way to achieve this, see update readme for info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants