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

Renault entity naming #57371

Closed
sagitt opened this issue Oct 9, 2021 · 6 comments · Fixed by #57922
Closed

Renault entity naming #57371

sagitt opened this issue Oct 9, 2021 · 6 comments · Fixed by #57922

Comments

@sagitt
Copy link

sagitt commented Oct 9, 2021

The problem

With new Renault integration in 2021.10.X, all entity have a bad naming scheme (respect old custom component)

for example, "sensor.battery_level".

I think is better an entity like sensor.XXXXXX_battery_level, where XXXXXX is for example the integration name, the plate or the VIN number.

What is version of Home Assistant Core has the issue?

core-2021.10.2

What was the last working version of Home Assistant Core?

n/a

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Renault

Link to integration documentation on our website

https://www.home-assistant.io/integrations/renault/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

renault documentation
renault source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @epenet, mind taking a look at this issue as it has been labeled with an integration (renault) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@epenet
Copy link
Contributor

epenet commented Oct 11, 2021

Hi @sagitt,
The unique_id of the entities hasn't changed between the old custom component and the core component.
Only the name has changes, and this can be amended manually in the UI.

This was discussed with @frenck on the original PR: #39605 (comment)

@sagitt
Copy link
Author

sagitt commented Oct 11, 2021

Hi @sagitt,

The unique_id of the entities hasn't changed between the old custom component and the core component.

Only the name has changes, and this can be amended manually in the UI.

This was discussed with @frenck on the original PR: #39605 (comment)

Of course the user can change entities name, but i think is a better choice (like most integrations) change the integration naming scheme.

Personally, i not change any entity name on my installation working on real device name or integration name, and all integrations are ok, except Renault.

I think that the better solution is the ability to give a name to the integration during configuration and associate the given name as prefix to the entities.

Please think about this solution! Thanks

@epenet
Copy link
Contributor

epenet commented Oct 11, 2021

The VIN is good for unique_id, but not so good for the display name. Maybe we could use the vehicle name (eg. Zoe)?
Something like this from tplink:

@property
def name(self) -> str:
"""Return the name of the Smart Plug.
Overridden to include the description.
"""
return f"{self.device.alias} {self.entity_description.name}"

@sagitt
Copy link
Author

sagitt commented Oct 11, 2021

The VIN is good for unique_id, but not so good for the display name. Maybe we could use the vehicle name (eg. Zoe)?

Something like this from tplink:

@property
def name(self) -> str:
"""Return the name of the Smart Plug.
Overridden to include the description.
"""
return f"{self.device.alias} {self.entity_description.name}"

Car model, VIN, integration name or car plate are all ok

But i think is a bad choice (as now) a generic entity name without prefix like "sensor.battery_level".

@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants