🏡 Open source home automation that puts local control and privacy first.
Go to file
J. Nick Koston 4e6937d20f
Avoid multiple round trips to the database for history API calls (#91193)
* delete more code

* tweak

* tweak

* wrappers

* restore lost performance

* restore lost performance

* restore lost performance

* compact

* reduce

* fix refactor

* DRY

* tweak

* delete the start time state injector

* move away the legacy code

* tweak

* adjust

* adjust

* tweak

* ignore impossible

* fix a bug where the first start was changed to the start time when there was no previous history recorded before

* avoid the empty scan most cases

* postgresql

* fixes

* workaround for mariadb < 10.4

* remove unused

* remove unused

* adjust

* bail early

* tweak

* tweak

* fix more tests

* fix recorderrun being init in the future in the test

* run history tests on schema 30 as well

* Revert "run history tests on schema 30 as well"

This reverts commit d798b100ac.

* reduce

* cleanup

* tweak

* reduce

* prune

* adjust

* adjust

* adjust

* reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code

* Revert "reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code"

This reverts commit bf974e103e.

* fix test

* Revert "Revert "reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code""

This reverts commit 119354499e.

* more coverage

* adjust

* fix for table order

* impossible for it to be missing

* remove some more legacy from the all states
2023-04-11 22:38:23 -04:00
.devcontainer Drop flake8 in favor of Ruff (#89863) 2023-03-17 13:30:06 +01:00
.github Add mysql 8.0.32 to the CI (#90898) 2023-04-06 09:33:08 -10:00
.vscode Drop flake8 in favor of Ruff (#89863) 2023-03-17 13:30:06 +01:00
docs Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
homeassistant Avoid multiple round trips to the database for history API calls (#91193) 2023-04-11 22:38:23 -04:00
machine Add Hardkernel ODROID-M1 (#89431) 2023-03-09 14:18:19 +01:00
pylint/plugins Add ComponentProtocol to improve type checking (#90586) 2023-03-31 14:19:58 -04:00
rootfs Fix logging & exit code reporting to S6 on HA shutdown (#72921) 2022-06-02 19:49:08 +02:00
script Bump `aioambient` to 2023.04.0 (#90991) 2023-04-06 19:22:27 -10:00
tests Avoid multiple round trips to the database for history API calls (#91193) 2023-04-11 22:38:23 -04:00
.core_files.yaml Adjust IntFlag handling in syrupy (#90223) 2023-03-26 14:20:05 +02:00
.coveragerc Move dwd_weather_warnings constants to separate file (#90810) 2023-04-05 09:16:17 +02:00
.dockerignore Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
.gitattributes highlight Dockerfile.dev as Dockerfile in github ui (#36933) 2020-06-22 14:45:57 +02:00
.gitignore Remove translations from Core (#87543) 2023-02-06 15:06:43 +01:00
.hadolint.yaml
.pre-commit-config.yaml Update black to 23.3.0 (#90569) 2023-03-31 12:20:08 +02:00
.prettierignore Add tests to Lidarr (#79610) 2023-03-28 16:49:32 +02:00
.readthedocs.yml Update readthedocs config (#65230) 2022-01-30 20:15:32 -08:00
.strict-typing Refactor handling of exposed entities for cloud Alexa and Google (#89877) 2023-04-06 13:09:45 -04:00
.yamllint Add filters to climate and light service descriptions (#86162) 2023-03-16 15:59:51 +01:00
CLA.md
CODEOWNERS Voip integration (#90945) 2023-04-11 20:25:05 -04:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md (#73468) 2022-06-23 01:41:22 +02:00
CONTRIBUTING.md Use core GitHub URL in contributing guidelines (#41083) 2020-10-02 20:42:33 +02:00
Dockerfile 75142 Added QEMU_CPU ARG to the dockerfile (#86178) 2023-01-19 10:22:23 +01:00
Dockerfile.dev Drop flake8 in favor of Ruff (#89863) 2023-03-17 13:30:06 +01:00
LICENSE.md
MANIFEST.in Move remaining keys to `setup.cfg` (#65154) 2022-01-28 20:18:09 -08:00
README.rst Change README demo to demo.home-assistant.io subdomain (#89921) 2023-03-19 07:52:42 +01:00
build.yaml Bump docker base to 2023.02.0 (#88084) 2023-02-14 20:34:54 -05:00
codecov.yml Add recorder platform to required test category (#86704) 2023-01-26 11:03:56 +01:00
mypy.ini Refactor handling of exposed entities for cloud Alexa and Google (#89877) 2023-04-06 13:09:45 -04:00
pyproject.toml Bump orjson to 3.8.10 (#91132) 2023-04-10 12:23:19 -04:00
requirements.txt Bump orjson to 3.8.10 (#91132) 2023-04-10 12:23:19 -04:00
requirements_all.txt Voip integration (#90945) 2023-04-11 20:25:05 -04:00
requirements_docs.txt
requirements_test.txt Update mypy to 1.2.0 (#90947) 2023-04-06 12:51:16 -04:00
requirements_test_all.txt Voip integration (#90945) 2023-04-11 20:25:05 -04:00
requirements_test_pre_commit.txt Update black to 23.3.0 (#90569) 2023-03-31 12:20:08 +02:00
setup.cfg Drop flake8 in favor of Ruff (#89863) 2023-03-17 13:30:06 +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://demo.home-assistant.io>`__, `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-integrations|

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.githubusercontent.com/home-assistant/core/master/docs/screenshots.png
   :target: https://demo.home-assistant.io
.. |screenshot-integrations| image:: https://raw.githubusercontent.com/home-assistant/core/dev/docs/screenshot-integrations.png
   :target: https://home-assistant.io/integrations/