Skip to content

Add new raspihats component#7392

Merged
balloob merged 4 commits into
home-assistant:devfrom
raspihats:raspihats
May 5, 2017
Merged

Add new raspihats component#7392
balloob merged 4 commits into
home-assistant:devfrom
raspihats:raspihats

Conversation

@florincosta
Copy link
Copy Markdown
Contributor

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:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@homeassistant
Copy link
Copy Markdown
Contributor

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!

@mention-bot
Copy link
Copy Markdown

@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.

Comment thread homeassistant/components/raspihats.py Outdated
def setup(hass, config):
"""Setup the raspihats component."""
# pylint: disable=global-statement
global I2C_HATS_MANAGER
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use global. Instead store your manager in hass.data, which is a dictionary for exactly this purpose.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOMAIN = 'raspihats'

CONF_I2C_HATS = 'i2c_hats'
CONF_BOARD = 'board'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these variables are not being used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@balloob
Copy link
Copy Markdown
Member

balloob commented May 5, 2017

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 👍

@balloob balloob merged commit 92411cd into home-assistant:dev May 5, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Aug 12, 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.

4 participants