🏡 Open source home automation that puts local control and privacy first.
Find a file
clssn 15b1a9ecea
Add numato integration (#33816)
* Add support for Numato 32 port USB GPIO boards

Included are a binary_sensor, sensor and switch component
implementations. The binary_sensor interface pushes updates via
registered callback functions, so no need to poll here.

Unit tests are included to test against a Numato device mockup.

* Refactor numato configuration due to PR finding

* Resolve minor review findings

* Bump numato-gpio requirement

* Load numato platforms during domain setup

According to review finding

* Guard from platform setup without discovery_info

According to review finding

* Move numato API state into hass.data

According to review finding.

* Avoid side effects in numato entity constructors

According to review finding

* Keep only first line of numato module docstrings

Removed reference to the documentation. Requested by reviewer.

* Minor improvements inspired by review findings

* Fix async tests

Pytest fixture was returning from the yield too early executing teardown
code during test execution.

* Improve test coverage

* Configure GPIO ports early

Review finding

* Move read_gpio callback to outside the loop

Also continue on failed switch setup, resolve other minor review
findings and correct some error messages

* Bump numato-gpio requirement

This fixes a crash during cleanup. When any device had a communication
problem, its cleanup would raise an exception which was not handled,
fell through to the caller and prevented the remaining devices from
being cleaned up.

* Call services directly

Define local helper functions for better readability.
Resolves a review finding.

* Assert something in every test

So not only coverage is satisfied but things are actually tested
to be in the expected state.
Resolves a review finding.

* Clarify scope of notification tests

Make unit test for hass NumatoAPI independent of Home Assistant (very basic test of notifications).
Improve the regular operations test for notifications.

* Test for hass.states after operating switches

Resolves a review finding.

* Check for wrong port directions

* WIP: Split numato tests to multiple files

test_hass_binary_sensor_notification still fails.

* Remove pytest asyncio decorator

Apears to be redundant. Resolves a review finding.

* Call switch services directly.

Resolves a review finding.

* Remove obsolete inline pylint config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Improve the numato_gpio module mockup

Resolves a review finding.

* Remove needless explicit conversions to str

Resolves review findings.

* Test setup of binary_sensor callbacks

* Fix test_hass_binary_sensor_notification

* Add forgotten await

Review finding.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-30 14:23:30 +02:00
.devcontainer Fixes invalid JSON syntax in devcontainer (#29911) 2019-12-13 12:41:56 +01:00
.github Add yamllint (in pre-commit and CI) (#33676) 2020-04-05 10:33:45 +02:00
.vscode Recommend python & prettier vscode extensions (#33702) 2020-04-05 18:19:40 +02:00
docs Improve string formatting v5 (#33697) 2020-04-05 17:48:55 +02:00
homeassistant Add numato integration (#33816) 2020-04-30 14:23:30 +02:00
rootfs Temporary transition Docker init (#34135) 2020-04-13 12:37:57 +02:00
script Add script to copy backend translations to frontend (#34706) 2020-04-28 10:35:38 -07:00
tests Add numato integration (#33816) 2020-04-30 14:23:30 +02:00
.coveragerc Config flow for hunterdouglas_powerview (#34795) 2020-04-29 14:24:57 -07:00
.dockerignore Integrate dockerbuild (#33168) 2020-03-23 00:39:37 +01:00
.gitattributes Fix line endings [skipci] (#12333) 2018-02-11 23:07:28 -08:00
.gitignore Move imports in wake_on_lan component (#28100) 2019-10-22 23:14:52 -07:00
.hadolint.yaml Add hadolint to CI (#34758) 2020-04-27 12:09:31 +02:00
.ignore Include .ignore file for search utilities (#5290) 2017-01-16 22:52:53 -08:00
.pre-commit-config.yaml Upgrade pyupgrade to v2.2.1 (#34608) 2020-04-23 13:13:31 -07:00
.prettierignore Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
.readthedocs.yml Drop Python 3.6 support (#29978) 2019-12-16 07:29:19 +01:00
.travis.yml Drop Python 3.6 support (#29978) 2019-12-16 07:29:19 +01:00
.yamllint Add yamllint (in pre-commit and CI) (#33676) 2020-04-05 10:33:45 +02:00
azure-pipelines-ci.yml Fix pylint CI (#34836) 2020-04-28 20:35:04 -05:00
azure-pipelines-release.yml Integrate dockerbuild (#33168) 2020-03-23 00:39:37 +01:00
azure-pipelines-translation.yml Migrate translations upload (#33926) 2020-04-09 17:52:33 -07:00
azure-pipelines-wheels.yml Update azure-pipelines-wheels.yml for Azure Pipelines 2020-04-02 09:38:43 +02:00
build.json Fix CVE-2020-1967 (#34853) 2020-04-29 18:06:25 +02:00
CLA.md Update LICENSE.md and CLA.md to reflect the new Apache 2.0 license 2017-01-28 12:12:34 -08:00
CODE_OF_CONDUCT.md Add organization docs 2017-01-22 16:21:20 -08:00
codecov.yml Update Codecov.io configuration (#33783) 2020-04-07 09:01:01 -07:00
CODEOWNERS Add numato integration (#33816) 2020-04-30 14:23:30 +02:00
CONTRIBUTING.md Contributing: Add note about feature suggestions and bug tracking (#30225) 2019-12-30 17:54:16 +01:00
Dockerfile Fix shutdown timeout and make it upstream with Supervisor (#33973) 2020-04-10 22:04:50 +02:00
Dockerfile.dev Add hadolint to CI (#34758) 2020-04-27 12:09:31 +02:00
LICENSE.md Update license to official GitHub template (#16470) 2018-09-07 10:11:51 +02:00
MANIFEST.in Consolidate frontend (#9915) 2017-10-24 19:36:27 -07:00
pylintrc Show diff in CI and cleanup pylintrc (#33704) 2020-04-05 20:51:36 +02:00
pyproject.toml Drop Python 3.6 support (#29978) 2019-12-16 07:29:19 +01:00
README.rst Adjusts repository README (#29805) 2019-12-10 09:22:37 +01:00
requirements_all.txt Add numato integration (#33816) 2020-04-30 14:23:30 +02:00
requirements_docs.txt Refactor API documentation (#33217) 2020-03-25 13:21:04 -07:00
requirements_test.txt Upgrade pytest to 5.4.1 (#34739) 2020-04-26 22:54:39 -07:00
requirements_test_all.txt Add numato integration (#33816) 2020-04-30 14:23:30 +02:00
requirements_test_pre_commit.txt Upgrade pyupgrade to v2.2.1 (#34608) 2020-04-23 13:13:31 -07:00
setup.cfg Upgrade mypy to 0.770, tighten config a bit (#32715) 2020-03-12 11:52:20 +01:00
setup.py Upgrade importlib-metadata to 1.6.0 (#34081) 2020-04-12 12:53:14 +02:00
tox.ini Fix hassfest validate invocation in Tox (#34428) 2020-04-19 17:43:49 +02:00

Home Assistant |Chat Status|
=================================================================================

Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.

Check out `home-assistant.io <https://home-assistant.io>`__ for `a
demo <https://home-assistant.io/demo/>`__, `installation instructions <https://home-assistant.io/getting-started/>`__,
`tutorials <https://home-assistant.io/getting-started/automation-2/>`__ and `documentation <https://home-assistant.io/docs/>`__.

|screenshot-states|

Featured integrations
---------------------

|screenshot-components|

The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://developers.home-assistant.io/docs/en/architecture_index.html>`__ and the `section on creating your own
components <https://developers.home-assistant.io/docs/en/creating_component_index.html>`__.

If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.

.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
   :target: https://discord.gg/c5DvZ4e
.. |screenshot-states| image:: https://raw.github.com/home-assistant/home-assistant/master/docs/screenshots.png
   :target: https://home-assistant.io/demo/
.. |screenshot-components| image:: https://raw.github.com/home-assistant/home-assistant/dev/docs/screenshot-components.png
   :target: https://home-assistant.io/integrations/