Commit graph

108 commits

Author SHA1 Message Date
epenet
242ee04642
Improve type hints in tests (i-p) () 2024-05-30 08:47:08 +02:00
J. Nick Koston
5a609c34bb
Fix blocking I/O in the event loop when loading timezones () 2024-05-20 11:06:03 +02:00
Erik Montnemery
426f73b1f4
Add State.last_reported ()
* 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
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] () 2024-03-08 19:16:21 +01:00
J. Nick Koston
0d4c82b54d
Convert Integration platforms processors where nothing is awaited to callbacks ()
Convert Integration platforms processors where nothing is awaited callbacks
2024-02-17 20:49:47 -05:00
J. Nick Koston
bf8f78c041
Fix flakey logbook tests () 2023-12-06 08:15:48 +01:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Ville Skyttä
e7b6037419
Remove unnnecessary pylint configs from components [e-l]* () 2023-08-25 09:46:34 +02:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap () 2023-06-27 17:42:46 +02:00
J. Nick Koston
b76551cf35
Reduce number of columns selected for logbook () 2023-04-22 14:25:22 +02:00
J. Nick Koston
4080d68489
Fix logbook tests failing because time was not url encoded correctly () 2023-03-15 15:29:41 -10:00
J. Nick Koston
170a13302c
Reduce overhead to store context ids in the database () 2023-03-08 14:51:45 -10:00
epenet
d65dff3f9e
Adjust entity registry access in tests (2) () 2023-03-01 16:23:36 +01:00
epenet
ea11a30a35
Add type hints to integration tests (part 13) () 2023-02-13 14:38:37 +01:00
Franck Nijhof
62dcbe5258
Enable Ruff PT001 () 2023-01-26 18:05:05 +01:00
epenet
b4dd1b8cb2
Rename logbook constant () 2023-01-23 18:00:25 +02:00
Marc Mueller
d7dda6bee5
Update python version used for pylint [Py310] ()
* 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
epenet
30bf0634fe
Add per-file-ignore to pylint () 2023-01-22 17:26:24 +01:00
J. Nick Koston
b8a1537b58
Improve performance of fetching and storing history and events with the database () 2023-01-02 13:26:08 -10:00
J. Nick Koston
43745dbc6c
Pass explict time in logbook tests ()
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
Erik Montnemery
31a787558f
Ensure recorder test fixture is setup before hass fixture ()
* Ensure recorder test fixture is setup before hass fixture

* Adjust more tests
2022-10-19 07:58:47 +02:00
J. Nick Koston
a8349a4866
Adjust entity filters to make includes stronger than excludes ()
* Adjust entity filters to make includes stronger than excludes

Fixes 

* adjust test for stronger entity glob includes

* sync with docs
2022-06-28 11:42:51 -05:00
J. Nick Koston
0b62944148
Mark counter domain as continuous to exclude it from logbook () 2022-06-05 21:25:26 -10:00
J. Nick Koston
5b31414225
Fix misalignments between sql based filtering with the entityfilter based filtering () 2022-06-02 20:52:53 -07:00
J. Nick Koston
c6e56c26b3
Fix logbook not setting up with an recorder filter that has empty fields () 2022-06-01 22:12:00 -07:00
J. Nick Koston
bfa7693d18
Fixes for logbook filtering and add it to the live stream () 2022-05-25 15:17:08 -10:00
J. Nick Koston
9c3f949165
Add live streaming logbook websocket endpoint ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-22 14:57:54 -05:00
J. Nick Koston
d459a5c66e
Include context state in logbook responses to improve localization ()
* Include context state in logbook responses to improve localization

* reduce payload, dont send context_event_type if sending context_state
2022-05-20 07:46:01 -07:00
J. Nick Koston
f06f94ea85
Add coverage to ensure we reject 0 length logbook filters () 2022-05-19 08:59:06 -07:00
J. Nick Koston
272e65f56d
Fix device_ids being filtered when entities also specified in the logbook () 2022-05-18 23:27:31 -05:00
J. Nick Koston
c4fc84ec1e
Add support for selecting device_ids from the logbook ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-18 01:58:30 -05:00
Paulus Schoutsen
5433c0a535
Make sure empty get_events results is always a list () 2022-05-17 10:43:58 -07:00
J. Nick Koston
089eb9960a
Reduce logbook websocket payload size and parse json attributes via the DBM () 2022-05-15 20:48:57 -07:00
J. Nick Koston
663f6f8340
Complete refactoring of logbook humanify () 2022-05-13 14:56:16 -07:00
J. Nick Koston
2a2a7a62c5
Avoid matching entity_id/domain attributes in logbook when there is no entities_filter () 2022-05-13 13:16:33 -07:00
J. Nick Koston
24a0007785
Add additional context data to logbook events () 2022-05-12 17:21:14 -07:00
J. Nick Koston
04af9698d3
Add logbook/get_events websocket endpoint ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-11 22:28:06 -05:00
J. Nick Koston
81e8d2ab86
Significantly improve logbook performance when selecting entities () 2022-05-11 15:27:02 -07:00
J. Nick Koston
26177bd080
Convert logbook to use lambda_stmt () 2022-05-10 08:23:13 -05:00
J. Nick Koston
d8336a5216
Fix missing context_id in script logbook entries () 2022-05-09 15:22:27 -05:00
J. Nick Koston
2560d35f1c
Always show the start and stop event in logbook () 2022-05-09 15:21:21 -05:00
J. Nick Koston
24d7a464e1
Refactor logbook to reduce overhead and complexity () 2022-05-08 21:47:26 -07:00
Erik Montnemery
203bebe668
Include all non-numeric sensor events in logbook () 2022-05-05 13:16:36 -04:00
J. Nick Koston
b8442d9340
Add json decode caching to logbook () 2022-05-01 19:33:31 -05:00
Erik Montnemery
3016b5fbfc
Use recorder fixtures and helpers in tests () 2022-04-26 06:08:00 -10:00
Marc Mueller
9b9b553521
Disable no-self-use [pylint] ()
* Disable no-self-use

* Remove disable comments
2022-04-25 07:41:01 -07:00
Erik Montnemery
28ebab9c5a
Simplify waiting for recorder in tests () 2022-04-25 12:04:47 +02:00
Erik Montnemery
982e314de6
Use recorder_mock in tests ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-22 19:29:44 -10:00
J. Nick Koston
4f9df1fd0f
Fix logbook tests () 2022-03-20 20:34:02 -07:00
J. Nick Koston
9215702388
Separate attrs into another table (reduces database size) () 2022-03-18 00:23:13 -10:00