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

Customize bus number #33

Open
TKone7 opened this issue Nov 26, 2024 · 1 comment
Open

Customize bus number #33

TKone7 opened this issue Nov 26, 2024 · 1 comment

Comments

@TKone7
Copy link

TKone7 commented Nov 26, 2024

Hey, thanks a lot for this custom component. I realized that custom_components/mcp23017/const.py defines a constant number for the bus being used /dev/i2c-#. In my case this is not sufficient and I would think it would be best to let this be configured.

Would you accept a PR that makes this a config?

@TKone7 TKone7 changed the title Customize bus Customize bus number Nov 26, 2024
@jpcornil-git
Copy link
Owner

jpcornil-git commented Nov 26, 2024

Sure/happy to support, just make sure it is optional, support config flow (configuration.yaml not a must), defaults to current bus and doesn't break existing configflow/configuration.yaml configurations.

There are two options wrt bus number configuration:

  • it remains a global settings, i.e. just an option to change the current default (low hanging fruit)
  • it becomes a component property (better/more complex change but it should only affect the toplevel logic as MCP23017 class has been prepared to support that already)

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

No branches or pull requests

2 participants