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

Optionally define unique sensor id in inverter response decoder #122

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

niclasku
Copy link
Contributor

This is a fix for #112. It allows us to optionally define the unique sensor used by Home Assistant in the inverter's response decoder:

"Run Mode Raw": {
    "decoder": (21, Units.NONE),
    "unique_id": 200,
},

I believe explicitly defining the id is better than generating an id. An id generation algorithm would always depend on some value or order of a list, tuple or dict so that there is no guarantee that the generated id will not change in the future.

@squishykid How do you think about this solution? Let me know if you have a better idea!

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.

1 participant