epenet
2c210e4b58
Use root import for websocket_api ( #125834 )
2024-09-12 19:31:57 +02:00
Erik Montnemery
cffa8b4feb
Update icons.json to new service schema part 2 ( #124769 )
2024-08-28 13:47:41 +02:00
Erik Montnemery
11fd1086af
Remove unnecessary assignment of Template.hass from logbook ( #123677 )
2024-08-12 15:39:18 +02:00
J. Nick Koston
5b7fd29797
Improve performance of logbook processor humanify ( #123157 )
2024-08-05 11:33:37 +02:00
J. Nick Koston
4fd92c17f0
Optimize logbook row matching ( #123127 )
2024-08-04 17:06:32 -05:00
J. Nick Koston
6b7307df81
Speed up logbook timestamp processing ( #123126 )
2024-08-04 16:43:43 -05:00
J. Nick Koston
b09dd95dbd
Improve alignment of live logbook and historical logbook models ( #123070 )
...
* Improve alignment of live logbook and historical logbook models
- Make EventAsRow as NamedType which is better aligned with
sqlalchemy Row
- Use getitem to fetch results for both Row and EventAsRow
since its an order of magnitude faster fetching sqlalchemy
Row object values.
* final
* fix
* unused
* fix more tests
* cleanup
* reduce
* tweak
2024-08-04 23:09:10 +02:00
J. Nick Koston
3353c3c205
Remove unneeded formatter argument from logbook websocket_api ( #123095 )
2024-08-04 23:05:56 +02:00
J. Nick Koston
cdec43ec06
Remove unreachable suppress in logbook ( #123096 )
2024-08-03 08:03:28 -05:00
J. Nick Koston
0fe23c82a4
Remove unused variables in logbook LazyEventPartialState ( #123097 )
2024-08-03 06:26:54 -05:00
J. Nick Koston
61cbb77042
Remove unneeded cast in logbook rest api ( #123098 )
2024-08-03 06:26:32 -05:00
Marc Mueller
ca55986057
Import Generator from collections.abc (1) ( #120914 )
2024-07-01 11:51:51 +02:00
Erik Montnemery
9bbeb5d608
Add primary_config_entry attribute to device registry entries ( #119959 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-26 12:26:24 +02:00
Marc Mueller
0bc597f8c7
Improve vol.Invalid handling ( #120480 )
2024-06-26 02:13:09 +02:00
Paulus Schoutsen
eb89ce47ea
Inline primary integration ( #119860 )
2024-06-18 08:08:08 +02:00
Marc Mueller
fe21e2b8ba
Import Generator from typing_extensions (1) ( #118986 )
2024-06-06 17:02:13 +02:00
J. Nick Koston
0112c7fcfd
Small speed up to logbook humanify ( #117854 )
2024-05-21 09:10:20 -04:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 ( #116250 )
2024-05-07 14:00:27 +02:00
J. Nick Koston
ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately ( #115169 )
2024-04-08 10:07:54 -10:00
Marc Mueller
a0e6fd6ec5
Add improved typing for event fire and listen methods ( #114906 )
...
* Add EventType implementation
* Update integrations for EventType
* Change state_changed to EventType
* Fix tests
* Remove runtime impact
* Add tests
* Move to stub file
* Apply pre-commit to stub files
* Fix ruff PYI checks
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-07 13:28:24 -10:00
Sid
0d66d298ec
Enable Ruff RET504 ( #114528 )
...
* Enable Ruff RET504
* fix test
* Use noqa instead of cast
* fix sonos RET504
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Marc Mueller
0f03079065
Update import for EventStateChangedData [i-z] ( #114900 )
2024-04-04 11:48:29 -10:00
Marc Mueller
816ce116bf
Remove unnecessary functools.cached_property backport ( #114239 )
2024-04-04 11:24:26 +02:00
J. Nick Koston
1e54595084
Use faster time compare in history and live logbook ( #113897 )
2024-03-20 19:40:23 -04:00
J. Nick Koston
32c64855b2
Fix duplicate events in live logbook ( #113828 )
2024-03-19 09:17:23 -10:00
J. Nick Koston
8b9a8a33f4
Start live history/logbook with eager tasks ( #113779 )
2024-03-18 21:00:51 -10:00
Sid
6ee273a548
Clean up unneeded ruff noqa directives ( #113616 )
2024-03-16 09:48:37 -10:00
Joost Lekkerkerker
a3a1647256
Add service icons to Logbook ( #113324 )
2024-03-14 13:52:27 +01:00
Joost Lekkerkerker
595d07f1c6
Improve lists in integrations [L-M] ( #113227 )
...
* Improve lists in integrations [L-M]
* Update homeassistant/components/mailbox/__init__.py
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* Fix
---------
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-03-13 21:28:21 +01:00
Marc Mueller
de886d8c49
Update EventBus listen type signatures ( #112760 )
2024-03-08 21:57:23 +01:00
Marc Mueller
84c44c1835
Replace EventType with Event [l-s] ( #112741 )
2024-03-08 19:37:18 +01:00
Paulus Schoutsen
f416d67d21
Remove built-in support for import_executor in manifest ( #112725 )
2024-03-08 12:02:32 -05:00
Marc Mueller
59a6035d3f
Add empty line after module docstring [j-m] ( #112700 )
2024-03-08 09:01:29 -05:00
Marc Mueller
d7e7dc96cc
Make Event data generic ( #111955 )
2024-03-08 13:46:16 +01:00
Marc Mueller
8ca127df2a
Use KEY_HASS [h-z] ( #112610 )
2024-03-07 18:03:44 +01:00
J. Nick Koston
581a4f82b2
Avoid importing counter and proximity integrations in logbook ( #112528 )
2024-03-06 11:46:38 -10:00
J. Nick Koston
94224c4c73
Import logbook in the executor to avoid blocking the event loop ( #111807 )
...
This one is likely because of all the sqlalchemy object construction
for the queries
`Component logbook import took 0.245 seconds (loaded_executor=False)`
2024-02-29 10:36:54 -05:00
Franck Nijhof
1c55ba0cb2
Use covariant for fire event data type ( #110843 )
2024-02-18 13:21:55 +01:00
J. Nick Koston
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
J. Nick Koston
f73431ac06
Switch utc_to_timestamp to .timestamp() where possible ( #109729 )
...
* Switch utc_to_timestamp to .timestamp()
.timestamp() is faster now in newer cpython
```
from homeassistant.util.dt import utc_to_timestamp, utcnow
import timeit
now = utcnow()
print(timeit.timeit('utc_to_timestamp(now)',globals={"now":now,"utc_to_timestamp":utc_to_timestamp}))
print(timeit.timeit('now.timestamp()',globals={"now":now}))
```
utc_to_timestamp = 0.18721245788037777
timestamp = 0.11421508435159922
* compat
* revert
* revert
* revert
* revert
* revert
2024-02-05 23:04:52 +01:00
J. Nick Koston
5dac5d5c7e
Refactor logbook helpers to reduce splits and lookups ( #108933 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-01-26 20:07:24 -10:00
J. Nick Koston
60ab360fe7
Avoid bytes to string to bytes conversion in websocket api ( #108139 )
2024-01-16 21:37:34 +01:00
J. Nick Koston
3d595fff13
Avoid duplicate timestamp conversions for websocket api and recorder ( #108144 )
...
* Avoid duplicate timestamp conversions for websocket api and recorder
We convert the time from datetime to timestamps one per
open websocket connection and the recorder for every
state update. Only do the conversion once since its
~30% of the cost of building the state diff
* more
* two more
* two more in live history
2024-01-16 14:05:01 +01:00
J. Nick Koston
bc2738c3a1
Avoid entity registry check in live logbook on each state update ( #107622 )
...
Avoid entity registry fetch in live logbook
There is no need to check the entity registry for the
state class since we already have the state
2024-01-13 21:04:04 -05:00
J. Nick Koston
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
steffenrapp
0b9242f809
Add translatable title to logbook ( #106810 )
2024-01-02 13:30:04 +01:00
Marc Mueller
a70ec64408
Update mypy to 1.7.0 ( #103800 )
2023-11-11 23:31:04 +01:00
J. Nick Koston
8b30a901dd
Remove unreachable code in logbook ( #103309 )
2023-11-04 10:54:22 -05:00
Ville Skyttä
3094991236
Upgrade ruff to 0.0.285 ( #98647 )
2023-08-19 08:17:17 -04:00
Marc Mueller
2618bfc073
Use EventType for state changed [core] ( #97115 )
2023-07-23 18:10:03 -05:00