Add new raspihats component#7392
Conversation
|
Hi @florincosta, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
|
@florincosta, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @robbiet480 to be potential reviewers. |
| def setup(hass, config): | ||
| """Setup the raspihats component.""" | ||
| # pylint: disable=global-statement | ||
| global I2C_HATS_MANAGER |
There was a problem hiding this comment.
Please don't use global. Instead store your manager in hass.data, which is a dictionary for exactly this purpose.
There was a problem hiding this comment.
Fixed in latest commit 372c84ef6b4a2dfdea932ae92005971058fb3919
| DOMAIN = 'raspihats' | ||
|
|
||
| CONF_I2C_HATS = 'i2c_hats' | ||
| CONF_BOARD = 'board' |
There was a problem hiding this comment.
All these variables are not being used?
There was a problem hiding this comment.
All the unused variables will be used by 2 new platforms switch.raspihats and binary_sensor.raspihats that I have already prepared. I will make PRs for those 2 new platforms after this one is accepted.
|
I must admit that it's a bit tough to see what is going on because I don't see the platforms. But thus far looks good 👍 |
Description:
New base component used for integrating raspihats boards.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2543
Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests passREQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices:
toxrun successfully. Your PR cannot be merged unless tests pass