Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support for renaming ZWave values #7780

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

Merged
merged 2 commits into from
Jun 3, 2017
Merged

Support for renaming ZWave values #7780

merged 2 commits into from
Jun 3, 2017

Conversation

emlove
Copy link
Contributor

@emlove emlove commented May 26, 2017

Description:

This PR adds a card to the ZWave panel that allows renaming of the ZWave values. This is important because it gives users more control over the final entity_ids. For now since this is the primary purpose, I'm filtering the list of values returned by the API call to only those that are primary values for an entity. If we expand the role of the values card or there is another reasonable use-case, we can return the full list of values for the node.

Pull request in home-assistant-polymer: home-assistant/frontend#295

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2716

@mention-bot
Copy link

@armills, thanks for your PR! By analyzing the history of the files in this pull request, we identified @turbokongen, @andrey-git and @balloob to be potential reviewers.

@andrey-git
Copy link
Contributor

But discovery schema depends on labels. What happens of you change the "open" in cover to something else?

Even if this works it now requires users to rename or they will get unstable ids.

@emlove
Copy link
Contributor Author

emlove commented May 26, 2017

None of the primary values which determine the entity_ids match based on label. We're also probably better of using index to match instead of label anyway.

The requirement to change conflicting names exists in all platforms. No one wants to have the complicated entity_ids, but it was required because they previously didn't have this capability. The goal is to eliminate workarounds from zwave. I'd much rather expose more features of an underlying library, than keep extra workarounds in hass.

Also, with previous versions since we were forcing an entity_id decision, conflicts failed much worse since they both tried to update the same state. Now it's the same as a conflict in any other platform.

@andrey-git
Copy link
Contributor

Where is the label stored?
If it is zwcfg_xxx.xml (or the device itself) then the change would affect all users of the device. I dislike that.

Maybe store the name as HA-intenal mapping?

@turbokongen
Copy link
Contributor

@andrey-git the labels are extracted from the values of the node.

@emlove
Copy link
Contributor Author

emlove commented May 27, 2017

@andrey-git The label changes are stored in zwcfg.xml.

I don't quite follow what you mean by all users of the device, can you elaborate? If users are running another program that uses the zwave device that program can maintain its own zwcfg.xml if that's desired.

@andrey-git
Copy link
Contributor

You are right, zwcfg is good.

@emlove emlove mentioned this pull request Jun 1, 2017
4 tasks
@emlove
Copy link
Contributor Author

emlove commented Jun 2, 2017

@andrey-git Are you OK merging this portion? The old entity ID format will still be used, but this allows the values to be renamed. It looks like the Polymer PR got merged.

@balloob balloob added this to the 0.46 milestone Jun 3, 2017
@balloob balloob merged commit 9c9f506 into home-assistant:dev Jun 3, 2017
@emlove emlove deleted the zwave-value-rename branch June 3, 2017 16:05
@emlove emlove modified the milestones: 0.46.1, 0.46 Jun 8, 2017
balloob pushed a commit that referenced this pull request Jun 9, 2017
* Support for renaming ZWave values

* Improve test
@balloob balloob mentioned this pull request Jun 9, 2017
@balloob
Copy link
Member

balloob commented Jun 9, 2017

Cherry-picked for 0.46.1

@balloob balloob mentioned this pull request Jun 16, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants