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

Add I2c HTU21D temperature and humidity sensor for Raspberry Pi #8049

Merged
merged 13 commits into from Jun 22, 2017

Conversation

Projects
None yet
4 participants
@azogue
Contributor

azogue commented Jun 15, 2017

Introduction:

Many of us use a Raspberry Pi to run Home Assistant, and we have different sensors connected to it, but for many of them there is no direct support, and it is necessary to use template sensors or command line sensors to make them work within Home Assistant.

Problem is using shell commands to retrieve the values of some sensors limits the working modes of these sensors, and, IMHO, it could be an entry barrier for some beginners.

I think that, as it exists for sensors like the DHT11/22 or the onewire ones, specific platforms for good and cheap digital sensors, with a simple configuration in Home Assistant, are very convenient.

This is the second of a series of PR that I intend to propose for supporting I2c digital sensors compatible with Raspberry Pi. First was #7989 (BME280 sensor), and next will be a light level sensor (BH1750).

Description:

HTU21D sensor support as a sensor platform. Senses temperature and humidity.

The docs include a section to easy install the i2c and smbus support for the home_assistant user, to get things done quickly.

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2820

Example entry for configuration.yaml (if applicable):

sensor:

  - platform: htu21d

    name: Ambient


Checklist:

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • 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.
Add new HTU21D temperature and humidity sensor
* new sensor platform
* requirements_all and .coveragerc update

@azogue azogue changed the title from Add new HTU21D temperature and humidity sensor to Add I2c HTU21D temperature and humidity sensor for Raspberry Pi Jun 15, 2017

@azogue azogue referenced this pull request Jun 15, 2017

Merged

Add I2c BH1750 light sensor for Raspberry Pi #8050

4 of 4 tasks complete
@pvizeli

Amazing work but it is not allow to have proto specific code inside HomeAssistant. Please export this device specific code into a new mini library and use this for this sensor.

azogue added some commits Jun 16, 2017

@azogue

This comment has been minimized.

Contributor

azogue commented Jun 21, 2017

@pvizeli, changes are done

azogue added some commits Jun 21, 2017

@pvizeli pvizeli merged commit 435e5c8 into home-assistant:dev Jun 22, 2017

4 checks passed

cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 93.652%
Details
hound No violations found. Woof!

@azogue azogue deleted the azogue:i2c-sensor-htu21d branch Jun 22, 2017

@balloob balloob referenced this pull request Jul 1, 2017

Merged

0.48 #8270

dethpickle added a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017

Add I2c HTU21D temperature and humidity sensor for Raspberry Pi (home…
…-assistant#8049)

* Add new HTU21D temperature and humidity sensor

* new sensor platform
* requirements_all and .coveragerc update

* fix lint

* review changes: move sensor code to external module

* remove debug log msg

* add i2csense to COMMENT_REQUIREMENTS, require i2csense 0.0.3

* Add new HTU21D temperature and humidity sensor

* new sensor platform
* requirements_all and .coveragerc update

* fix lint

* review changes: move sensor code to external module

* remove debug log msg

* add i2csense to COMMENT_REQUIREMENTS, require i2csense 0.0.3

* change style for hass

* fix requirements

@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.