epenet
2c210e4b58
Use root import for websocket_api ( #125834 )
2024-09-12 19:31:57 +02:00
Marc Mueller
2decf6c023
Use dict instead of MutableMapping [recorder] ( #115318 )
2024-04-09 15:08:31 -10:00
Marc Mueller
3c5089bc3f
Update import for EventStateChangedData [a-h] ( #114899 )
2024-04-04 11:48:36 -10: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
e74791083e
Fix duplicate events in live history ( #113896 )
2024-03-20 20:14:17 +01:00
J. Nick Koston
8b9a8a33f4
Start live history/logbook with eager tasks ( #113779 )
2024-03-18 21:00:51 -10:00
Marc Mueller
8f1e2f1a7b
Replace EventType with Event [h-i] ( #112740 )
2024-03-08 19:35:47 +01:00
Marc Mueller
8809d3aa88
Add empty line after module docstring [g-i] ( #112699 )
2024-03-08 08:52:48 -05:00
Marc Mueller
d7e7dc96cc
Make Event data generic ( #111955 )
2024-03-08 13:46:16 +01: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
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
50f2c41145
Avoid db hit and executor job for impossible history queries ( #104724 )
2023-11-29 11:20:22 -07:00
Marc Mueller
2618bfc073
Use EventType for state changed [core] ( #97115 )
2023-07-23 18:10:03 -05:00
Harvey
bf4559719a
History API entity_id validation ( #90067 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-14 09:41:54 -10:00
rlippmann
f5911bcad6
Add slots to dataclasses in default_config ( #91410 )
...
* add dataclass slots to default config items
* remove slots from sun mixing
2023-04-14 14:22:39 -04:00
J. Nick Koston
d0d4ab6056
Require a list of entity ids when fetching history ( #90992 )
2023-04-08 16:14:44 -10:00
J. Nick Koston
977a07de13
Generate large history responses in the executor ( #89606 )
2023-03-12 21:32:26 -04:00
J. Nick Koston
0b0e977ce9
Remove history use_include_order configuration option ( #86365 )
2023-01-22 17:43:05 +01:00
J. Nick Koston
5ff0479c16
Split history websocket API into its own file ( #86364 )
2023-01-21 18:45:00 -10:00