Commit Graph
144 Commits
Author SHA1 Message Date
J. Nick KostonandGitHub 5a609c34bb Fix blocking I/O in the event loop when loading timezones (#117721) 2024-05-20 11:06:03 +02:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <[email protected]>
Co-authored-by: Marc Mueller <[email protected]>
Co-authored-by: J. Nick Koston <[email protected]>
2024-03-26 00:02:16 +01:00
Erik MontnemeryandGitHub 426f73b1f4 Add State.last_reported (#113511)
* Add State.last_reported

* Update tests

* Update test snapshots

* Call state_reported listeners when firing state_changed event

* Add tests
2024-03-20 21:05:07 +01:00
J. Nick KostonandGitHub 32c64855b2 Fix duplicate events in live logbook (#113828) 2024-03-19 09:17:23 -10:00
Marc MuellerandGitHub 32f3f46542 Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc MuellerandGitHub 1722e23df8 Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
J. Nick KostonandGitHub 0d4c82b54d Convert Integration platforms processors where nothing is awaited to callbacks (#110825)
Convert Integration platforms processors where nothing is awaited callbacks
2024-02-17 20:49:47 -05:00
5dac5d5c7e Refactor logbook helpers to reduce splits and lookups (#108933)
Co-authored-by: Paulus Schoutsen <[email protected]>
2024-01-26 20:07:24 -10:00
J. Nick KostonandGitHub 0b9992260a Improve logbook context augment performance (#106926)
Makes LazyEventPartialState a bit lazier since almost all the
properties are never called.
2024-01-07 22:35:28 -05:00
J. Nick KostonandGitHub bf8f78c041 Fix flakey logbook tests (#105111) 2023-12-06 08:15:48 +01:00
706add4a57 Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <[email protected]>
2023-11-27 14:38:59 +01:00
J. Nick KostonandGitHub 8b30a901dd Remove unreachable code in logbook (#103309) 2023-11-04 10:54:22 -05:00
Ville SkyttäandGitHub e7b6037419 Remove unnnecessary pylint configs from components [e-l]* (#99004) 2023-08-25 09:46:34 +02:00
Franck NijhofandGitHub 3e85a29b86 Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
Jan BouwhuisandGitHub ec98e22330 Add type hints for stub_blueprint_populate fixture (#93568)
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Erik MontnemeryandGitHub 3cca338c6e Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00
J. Nick KostonandGitHub 5114a1400f Ensure logbook still responds if describe event throws (#91961)
* Ensure logbook still responds if describe event throws

If describe fails, the logbook stream should not collapse

* Ensure logbook still responds if describe event throws

If describe fails, the logbook stream should not collapse
2023-04-24 22:22:53 -04:00
J. Nick KostonandGitHub b76551cf35 Reduce number of columns selected for logbook (#91718) 2023-04-22 14:25:22 +02:00
J. Nick KostonandGitHub 56a6244d90 Remove legacy context lookup implementation from logbook (#91710)
* Remove legacy context lookup implemention from logbook

This object can now be replaced with a simple dict

* Remove legacy context lookup implemention from logbook

This object can now be replaced with a simple dict

* scope

* fix order issue
2023-04-19 21:54:34 -04:00
J. Nick KostonandGitHub 4080d68489 Fix logbook tests failing because time was not url encoded correctly (#89770) 2023-03-15 15:29:41 -10:00
J. Nick KostonandGitHub 01e1221443 Refactor logbook data to use a dataclass (#89534) 2023-03-11 12:45:27 +01:00
J. Nick KostonandGitHub 170a13302c Reduce overhead to store context ids in the database (#88942) 2023-03-08 14:51:45 -10:00
epenetandGitHub d65dff3f9e Adjust entity registry access in tests (2) (#88960) 2023-03-01 16:23:36 +01:00
J. Nick KostonandGitHub 93e37243f6 Fix logbook test that failed to exclude EVENT_HOMEASSISTANT_FINAL_WRITE (#88568) 2023-02-21 16:22:44 -06:00
Franck NijhofandGitHub f67ebcade1 Enable Ruff SIM201 (#88171) 2023-02-15 14:43:02 +01:00
4ca0a24f87 Increase test scope of MariaDB + PostgreSQL tests (#87019)
Co-authored-by: J. Nick Koston <[email protected]>
2023-02-13 15:58:13 -06:00
epenetandGitHub ea11a30a35 Add type hints to integration tests (part 13) (#87998) 2023-02-13 14:38:37 +01:00
J. Nick KostonandGitHub 00118a6f96 Speed up live history setup if there is no pending data to commit (#86942) 2023-01-30 19:00:34 +01:00
Franck NijhofandGitHub 62dcbe5258 Enable Ruff PT001 (#86730) 2023-01-26 18:05:05 +01:00
e50a531cd9 Code styling tweaks to the tests - Part 2 (#86662)
Co-authored-by: jjlawren <[email protected]>
2023-01-26 01:23:53 +01:00
epenetandGitHub b4dd1b8cb2 Rename logbook constant (#86464) 2023-01-23 18:00:25 +02:00
Marc MuellerandGitHub d7dda6bee5 Update python version used for pylint [Py310] (#86414)
* Update python version used for pylint linting [Py310]

* Import Callable from collections.abc [Py310]

* Use builtin anext [Py310]
2023-01-23 07:56:15 +01:00
epenetandGitHub 30bf0634fe Add per-file-ignore to pylint (#86289) 2023-01-22 17:26:24 +01:00
J. Nick KostonandGitHub 5279535046 Fix live logbook stalling when there are no historical events with a high commit interval (#86110)
* Force live logbook to send an empty message to indicate no results

Since the sync task can take a while if the recorder is
busy, the logbook will appear to hang if we do not send
the first partial message even if its empty.

This work is in preparation for a higher database
commit interval where this issue is most obvious.

The historical only path did not have this issue because
it never had to wait for the db sync.

* update tests
2023-01-17 21:06:37 -05:00
J. Nick KostonandGitHub b8a1537b58 Improve performance of fetching and storing history and events with the database (#84870) 2023-01-02 13:26:08 -10:00
Marc MuellerandGitHub 63d519c1a8 Spelling updates (#82867) 2022-11-28 16:51:43 +01:00
J. Nick KostonandGitHub 43745dbc6c Pass explict time in logbook tests (#81725)
The CI sets the timezone to US/Pacific and the logbook
uses start_of_local_day when called without a time.

We now call the logbook api with a specific time to
avoid them being out of sync since the test would
fail at CET 8:55am on Mon Nov 7th 2022 (and probably
other dates)
2022-11-07 16:26:38 +01:00
J. Nick KostonandGitHub 11a55d6d4c Fix flapping logbook tests (#81695) 2022-11-07 11:41:02 +01:00
Erik MontnemeryandGitHub 31a787558f Ensure recorder test fixture is setup before hass fixture (#80528)
* Ensure recorder test fixture is setup before hass fixture

* Adjust more tests
2022-10-19 07:58:47 +02:00
Erik MontnemeryandGitHub e852c9b012 Fix logbook tests (#80264)
* Fix logbook tests

* Correct tests

* Improve tests
2022-10-13 17:34:45 +02:00
J. Nick KostonandGitHub 14611f9b5c Fix race in logbook websocket test (#78390) 2022-09-13 16:40:08 -04:00
fcb6888f87 Start logbook stream faster (#77921)
Co-authored-by: Paulus Schoutsen <[email protected]>
2022-09-09 17:16:02 -05:00
Martin HjelmareandGitHub c05905ebda Remove callback decorator from coroutine functions (#75626)
* Remove callback decorator from coroutine functions

* Remove some more callback decorators
2022-07-22 19:09:02 +02:00
J. Nick KostonandGitHub a8349a4866 Adjust entity filters to make includes stronger than excludes (#74080)
* Adjust entity filters to make includes stronger than excludes

Fixes #59080

* adjust test for stronger entity glob includes

* sync with docs
2022-06-28 11:42:51 -05:00
J. Nick KostonandGitHub 720768560d Fix devices missing in logbook when all requested entities are filtered (#74073) 2022-06-28 08:44:06 +02:00
J. Nick KostonandGitHub f29cc33fa0 Fix selecting entity_ids and device_ids in events with MySQL and PostgreSQL with logbook (#73918)
* Fix selecting entity_ids and device_ids in events with MySQL and PostgreSQL

Fixes #73818

* add cover
2022-06-24 15:43:35 +02:00
J. Nick KostonandGitHub e4f354998d Filter out forced updates in live logbook when the state has not changed (#73335) 2022-06-10 14:04:43 -07:00
J. Nick KostonandGitHub 0b62944148 Mark counter domain as continuous to exclude it from logbook (#73101) 2022-06-05 21:25:26 -10:00
J. Nick KostonandGitHub 457c7a4ddc Fix incompatiblity with live logbook and google_assistant (#73063) 2022-06-05 19:06:49 -10:00
J. Nick KostonandGitHub 6b2e5858b3 Send an empty logbook response when all requested entity_ids are filtered away (#73046) 2022-06-05 21:14:47 -07:00