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

Update displayed naming and avoid duplicated sensors from api #108

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

elden1337
Copy link
Contributor

This pr aims to further improve the readability of the many many sensors we get from myuplink, at least with certain hvac-types.
See if you approve, i have removed the device_id from the name as it was obscuring the readability. I also added the id in parenthesis in the end.

Furthermore, in api.py i've introduced a check for duplicated points since i've seen that these do occur. Imo this should not be possible but to prevent issues or missmatching sensors in HA I suggest we patch it like this til it's fixed on the myuplink-side.

When reviewing this, please do consider any implications the renaming may have for future sensor_ids. The current ids should stay the same as they did with my instance.
Also check so that you agree with my distinct-selection in api.py

Thanks.

Change naming convention to either parameter.category+parameter.name+(parameter.id) or parameter.name+(parameter.id) 
this is done to reveal the point-id from myuplink since many sensors tend to be called the same thing (at least for Nibe). The removal of device is because of duplication in naming that caused confusion in finding the correct sensor in lookup
Check for duplication in parameters from the api. This is to avoid unneccesary sensors as there are quite a few of these examples (again for Nibe, don't know of others). This change also removes
@elden1337 elden1337 mentioned this pull request Apr 25, 2024
@elden1337
Copy link
Contributor Author

Example from my instance running the new code.
As you can see here it wouldnt be possible to distinguish these sensors without the id.

image

@jaroschek jaroschek merged commit 538880e into jaroschek:main Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants