🏡 Open source home automation that puts local control and privacy first.
Go to file
Patrik Lindgren 9d404b749a
Implement coordinator class for Tradfri integration (#64166)
* Initial commit coordinator

* More coordinator implementation

* More coordinator implementation

* Allow integration reload

* Move API calls to try/catch block

* Move back fixture

* Remove coordinator test file

* Ensure unchanged file

* Ensure unchanged conftest.py file

* Remove coordinator key check

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Import RequestError

* Move async_setup_platforms to end of setup_entry

* Remove centralised handling of device data and device controllers

* Remove platform_type argument

* Remove exception

* Remove the correct exception

* Refactor coordinator error handling

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove platform type from base class

* Remove timeout context manager

* Refactor exception callback

* Simplify starting device observation

* Update test

* Move observe start into update method

* Remove await self.coordinator.async_request_refresh()

* Refactor cover.py

* Uncomment const.py

* Add back extra_state_attributes

* Update homeassistant/components/tradfri/coordinator.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Refactor switch platform

* Expose switch state

* Refactor sensor platform

* Put back accidentally deleted code

* Add set_hub_available

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix tests for fan platform

* Update homeassistant/components/tradfri/base_class.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/tradfri/base_class.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix non-working tests

* Refresh sensor state

* Remove commented line

* Add group coordinator

* Add groups during setup

* Refactor light platform

* Fix tests

* Move outside of try...except

* Remove error handler

* Remove unneeded methods

* Update sensor

* Update .coveragerc

* Move signal

* Add signals for groups

* Fix signal

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-27 11:12:52 +01:00
.devcontainer VSCode switch to terminal.integrated.profiles (#54301) 2021-08-21 21:46:24 +02:00
.github Update home-assistant/wheels to 2021.01.2 (#64958) 2022-01-26 10:08:59 +01:00
.vscode Add 'compile translations' task to VSCode tasks (#64933) 2022-01-25 20:55:02 -08:00
docs Update featured integrations screenshot in README (#64046) 2022-01-13 18:26:13 +01:00
homeassistant Implement coordinator class for Tradfri integration (#64166) 2022-01-27 11:12:52 +01:00
machine Update base image 2021.11.0 (#60227) 2021-11-24 09:48:34 +01:00
pylint/plugins Adjust pylint plugin to enforce device_tracker type hints (#64903) 2022-01-25 18:21:59 +01:00
rootfs Pass exit code to s6-init (#59545) 2021-11-14 16:56:09 +01:00
script Add plugin option [hassfest] (#65024) 2022-01-26 20:52:09 -08:00
tests Implement coordinator class for Tradfri integration (#64166) 2022-01-27 11:12:52 +01:00
.core_files.yaml Add diagnostics to the core files (#64417) 2022-01-19 10:55:33 +01:00
.coveragerc Implement coordinator class for Tradfri integration (#64166) 2022-01-27 11:12:52 +01:00
.dockerignore Integrate dockerbuild (#33168) 2020-03-23 00:39:37 +01:00
.gitattributes highlight Dockerfile.dev as Dockerfile in github ui (#36933) 2020-06-22 14:45:57 +02:00
.gitignore Ignore config directory symlink in development (#56639) 2021-09-25 12:53:41 +02:00
.hadolint.yaml Add hadolint to CI (#34758) 2020-04-27 12:09:31 +02:00
.ignore
.pre-commit-config.yaml Add pylint to pre-commit hooks (#64665) 2022-01-24 12:00:49 +01:00
.prettierignore Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
.readthedocs.yml Drop remaining Python < 3.8 support (#44743) 2021-01-04 11:47:29 +01:00
.strict-typing Improve code quality trafikverket_train (#62677) 2022-01-19 20:57:05 +01:00
.yamllint Add yamllint (in pre-commit and CI) (#33676) 2020-04-05 10:33:45 +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
CODEOWNERS Add detailed status for UptimeRobot (#64879) 2022-01-26 16:48:15 +01:00
CODE_OF_CONDUCT.md Update Code of Conduct to 2.0 (#36142) 2020-05-25 19:40:40 -04:00
CONTRIBUTING.md Use core GitHub URL in contributing guidelines (#41083) 2020-10-02 20:42:33 +02:00
Dockerfile Extend Docker build caching opportunities (#60661) 2021-12-01 13:20:00 +01:00
Dockerfile.dev Add libturbojpeg0 to dev-container (#64466) 2022-01-19 22:04:13 +01: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
README.rst Update README.rst to avoid redirects (#44519) 2020-12-26 10:05:41 +01:00
build.yaml Update base image 2021.11.0 (#60227) 2021-11-24 09:48:34 +01:00
codecov.yml Add little slack to CodeCov project/config-flows threshold (#63379) 2022-01-04 16:26:22 +01:00
mypy.ini Add plugin option [hassfest] (#65024) 2022-01-26 20:52:09 -08:00
pyproject.toml Add pylint plugin to enforce type hints (#64313) 2022-01-24 13:38:56 +01:00
requirements.txt Bump httpx to 0.21.3 and pin requirements for httpcore, anyio, and h11 (#64822) 2022-01-24 10:43:39 +01:00
requirements_all.txt Bump flux_led to fix push updates on newer devices (#65011) 2022-01-26 20:50:20 -08:00
requirements_docs.txt Refactor API documentation (#33217) 2020-03-25 13:21:04 -07:00
requirements_test.txt Update pylint to 2.12.2 (#64896) 2022-01-25 10:20:20 +01:00
requirements_test_all.txt Bump flux_led to fix push updates on newer devices (#65011) 2022-01-26 20:50:20 -08:00
requirements_test_pre_commit.txt Update codespell to 2.1.0 (#64661) 2022-01-21 22:05:24 +01:00
setup.cfg Drop Python 3.8 support (#63883) 2022-01-11 12:00:53 +01:00
setup.py Bump httpx to 0.21.3 and pin requirements for httpcore, anyio, and h11 (#64822) 2022-01-24 10:43:39 +01:00
tox.ini Drop Python 3.8 support (#63883) 2022-01-11 12:00:53 +01:00

README.rst

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

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/