🏡 Open source home automation that puts local control and privacy first.
Go to file
Nicko van Someren 4390fed168 Unpacking RESTful sensor JSON results into attributes. (#10753)
* Added support for extracting JSON attributes from RESTful values

Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.

* Added support for extracting JSON attributes from RESTful values

Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.

* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.

* Expanded test coverage to test REFTful JSON attributes with and
without a value template.

* Added support for extracting JSON attributes from RESTful values

Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.

* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.

* Expanded test coverage to test REFTful JSON attributes with and
without a value template.

* sensor.envirophat: add missing requirement (#7451)

Adding requirements that is not explicitly pulled in by the library
that manages the Enviro pHAT.

* PyPI Openzwave (#7415)

* Remove default zwave config path

PYOZW now has much more comprehensive default handling for the config
path (in src-lib/libopenzwave/libopenzwave.pyx:getConfig()). It looks in
the same place we were looking, plus _many_ more. It will certainly do a
much better job of finding the config files than we will (and will be
updated as the library is changed, so we don't end up chasing it). The
getConfig() method has been there for a while, but was subsntially
improved recently.

This change simply leaves the config_path as None if it is not
specified, which will trigger the default handling in PYOZW.

* Install python-openzwave from PyPI

As of version 0.4, python-openzwave supports installation from PyPI,
which means we can use our 'normal' dependency management tooling to
install it. Yay.

This uses the default 'embed' build (which goes and downloads
statically sources to avoid having to compile anything locally). Check
out the python-openzwave readme for more details.

* Add python-openzwave deps to .travis.yml

Python OpenZwave require the libudev headers to build. This adds the
libudev-dev package to Travis runs via the 'apt' addon for Travis.

Thanks to @MartinHjelmare for this fix.

* Update docker build for PyPI openzwave

Now that PYOZW can be install from PyPI, the docker image build process
can be simplified to remove the explicit compilation of PYOZW.

* Add datadog component (#7158)

* Add datadog component

* Improve test_invalid_config datadog test

* Use assert_setup_component for test setup

* Fix object type for default KNX port

#7429 describes a TypeError that is raised if the port is omitted in the config for the KNX component (integer is required (got type str)). This commit changes the default port from a string to an integer. I expect this will resolve that issue...

* Added support for extracting JSON attributes from RESTful values

Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.

* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.

* Expanded test coverage to test REFTful JSON attributes with and
without a value template.

* Added support for extracting JSON attributes from RESTful values

Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.

* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.

* Expanded test coverage to test REFTful JSON attributes with and
without a value template.

* Added support for extracting JSON attributes from RESTful values

Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.

* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.

* Expanded test coverage to test REFTful JSON attributes with and
without a value template.

* Fixed breaks cause by manual upstream merge.

* Added one extra blank line to make PyLint happy.

* Switched json_attributes to be a list of keys rather than a boolean.

The value of json_attributes can now be either a comma sepaated list
of key names or a YAML list of key names. Only matching keys in a
retuned JSON dictionary will be mapped to sensor attributes.

Updated test cases to handle json_attributes being a list.

Also fixed two minor issues arrising from manual merge with 0.58 master.

* Added an explicit default value to the json_attributes config entry.

* Removed self.update() from __init__() body.

* Expended unit tests for error cases of json_attributes processing.

* Align quotes
2017-12-03 16:30:25 +01:00
.github Use H2 headers to split up the different sections (#6183) 2017-02-23 12:58:18 -08:00
docs Optimised images. Saved 80 KB out of 656 KB. 12.3% overall (up to 32.1% per file) (#10735) 2017-11-21 21:19:13 -08:00
homeassistant Unpacking RESTful sensor JSON results into attributes. (#10753) 2017-12-03 16:30:25 +01:00
script Update pytradfri to 4.1.0 (#10521) 2017-11-22 09:37:20 +00:00
tests Unpacking RESTful sensor JSON results into attributes. (#10753) 2017-12-03 16:30:25 +01:00
virtualization Revert gactions in Docker (#10115) 2017-10-24 07:30:24 -07:00
.coveragerc Add tts.baidu platform (#10724) 2017-11-27 10:13:25 +01:00
.dockerignore Docker cleanup. (#8226) 2017-06-30 08:07:33 -07:00
.gitignore Refactored to new global json saving and loading (#10677) 2017-11-19 19:47:55 -08:00
.gitmodules Consolidate frontend (#9915) 2017-10-24 19:36:27 -07:00
.hound.yml Add .hound.yml 2016-11-13 11:34:09 -08:00
.ignore Include .ignore file for search utilities (#5290) 2017-01-16 22:52:53 -08:00
.travis.yml Reorganize lint travis builds (#10670) 2017-11-19 17:39:24 -08: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
CODEOWNERS Updated codeowner for Tile device tracker (#10861) 2017-11-29 19:13:31 +01:00
CODE_OF_CONDUCT.md Add organization docs 2017-01-22 16:21:20 -08:00
CONTRIBUTING.md Fix spelling error and update link (#8869) 2017-08-06 21:18:44 +02:00
Dockerfile Revert gactions in Docker (#10115) 2017-10-24 07:30:24 -07:00
LICENSE.md Update LICENSE.md and CLA.md to reflect the new Apache 2.0 license 2017-01-28 12:12:34 -08:00
MANIFEST.in Consolidate frontend (#9915) 2017-10-24 19:36:27 -07:00
README.rst Remove links to gitter (#9155) 2017-08-27 11:30:26 +02:00
pylintrc Add support for using credstash as a secret store (#8494) 2017-07-24 08:59:10 -07:00
requirements_all.txt Pybotvac multi (#10843) 2017-12-02 15:44:24 +01:00
requirements_docs.txt Upgrade Sphinx to 1.6.5 (#10090) 2017-10-23 23:15:36 +02:00
requirements_test.txt Upgrade mypy to 0.550 (#10591) 2017-11-15 22:35:18 -08:00
requirements_test_all.txt Update frontend to 20171130.0 2017-11-30 20:46:21 -08:00
setup.cfg Reorganize lint travis builds (#10670) 2017-11-19 17:39:24 -08:00
setup.py Upgrade yarl to 0.15.0 (#10888) 2017-12-01 13:37:14 +01:00
tox.ini Reorganize lint travis builds (#10670) 2017-11-19 17:39:24 -08:00

README.rst

Home Assistant |Build Status| |Coverage Status| |Chat Status|
=============================================================

Home Assistant is a home automation platform running on Python 3. It is able to track and control all devices at home and offer a platform for automating control.

To get started:

.. code:: bash

    python3 -m pip install homeassistant
    hass --open-ui

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://home-assistant.io/developers/architecture/>`__ and the `section on creating your own
components <https://home-assistant.io/developers/creating_components/>`__.

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.

.. |Build Status| image:: https://travis-ci.org/home-assistant/home-assistant.svg?branch=master
   :target: https://travis-ci.org/home-assistant/home-assistant
.. |Coverage Status| image:: https://img.shields.io/coveralls/home-assistant/home-assistant.svg
   :target: https://coveralls.io/r/home-assistant/home-assistant?branch=master
.. |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/components/