Commit Graph

45583 Commits (efef915fc7ec5a687752010407d337419cd39dd5)

Author SHA1 Message Date
Assaf Inbal d8ec259e9a
Add mjpeg camera stream_source (#86908)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-13 16:12:12 -06:00
J. Nick Koston 026b4f5307
Bump aiohttp to 3.8.4 (#88032) 2023-02-13 15:52:20 -06:00
J. Nick Koston ae06d9fd5c
Bump aioesphomeapi to 13.3.1 (#87969)
* Bump aioesphomeapi to 13.3.0

We probably need to include https://github.com/esphome/aioesphomeapi/pull/382
as well in another bump

* bump
2023-02-13 09:07:56 -05:00
J. Nick Koston 03eea7bd3f
Avoid subprocess memory copy when c library supports posix_spawn (#87958)
* use posix spawn on alpine

* Avoid subprocess memory copy when c library supports posix_spawn

By default python 3.10 will use the fork() which has to
copy all the memory of the parent process (in our case
this can be huge since Home Assistant core can use
hundreds of megabytes of RAM). By using posix_spawn
this is avoided.

In python 3.11 vfork will also be available
https://github.com/python/cpython/issues/80004#issuecomment-1093810689
https://github.com/python/cpython/pull/11671 but we won't
always be able to use it and posix_spawn is considered safer
https://bugzilla.kernel.org/show_bug.cgi?id=215813#c14

The subprocess library doesn't know about musl though
even though it supports posix_spawn https://git.musl-libc.org/cgit/musl/log/src/process/posix_spawn.c
so we have to teach it since it only has checks for glibc
1b736838e6/Lib/subprocess.py (L745)

The constant is documented as being able to be flipped here:
https://docs.python.org/3/library/subprocess.html#disabling-use-of-vfork-or-posix-spawn

* Avoid subprocess memory copy when c library supports posix_spawn

By default python 3.10 will use the fork() which has to
copy memory of the parent process (in our case
this can be huge since Home Assistant core can use
hundreds of megabytes of RAM). By using posix_spawn
this is avoided and subprocess creation does not
get discernibly slow the larger the Home Assistant
python process grows.

In python 3.11 vfork will also be available
https://github.com/python/cpython/issues/80004#issuecomment-1093810689
https://github.com/python/cpython/pull/11671 but we won't
always be able to use it and posix_spawn is considered safer
https://bugzilla.kernel.org/show_bug.cgi?id=215813#c14

The subprocess library doesn't know about musl though
even though it supports posix_spawn https://git.musl-libc.org/cgit/musl/log/src/process/posix_spawn.c
so we have to teach it since it only has checks for glibc
1b736838e6/Lib/subprocess.py (L745)

The constant is documented as being able to be flipped here:
https://docs.python.org/3/library/subprocess.html#disabling-use-of-vfork-or-posix-spawn

* missed some

* adjust more tests

* coverage
2023-02-13 09:02:51 -05:00
Erik Montnemery 8f2a764a43
Adjust suggested_display_precision according to unit conversion (#87614) 2023-02-13 13:55:12 +01:00
G Johansson 896dd1a36b
Change name to entity_id Text platform error messages (#87963) 2023-02-13 12:51:38 +01:00
mletenay ea94a2fbfd
Add support for 4 MPTT inverter (#86901) 2023-02-13 12:49:11 +01:00
David Bonnes dc8ceaf4bf
Change geniushub codeowner (#87918) 2023-02-13 12:11:38 +01:00
Franck Nijhof f1daeabff0
Add homeassistant.reload_all service (#87769) 2023-02-13 12:09:29 +01:00
Franck Nijhof 6359775cfc
Add more entities for Elgato Key Light Mini (#87793)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-13 11:54:50 +01:00
starkillerOG 3a9caeffe5
Reolink late review comments (#87991)
late review comments
2023-02-13 11:47:39 +01:00
Erik Montnemery 575f7c4205
Add dormakaba_dkey battery sensor (#87975)
* Add dormakaba_dkey battery sensor

* Update .coveragerc

* Apply suggestion from code review

* Update .coveragerc
2023-02-13 11:09:23 +01:00
Erik Montnemery 3f910b49ae
Fix sensor unit conversion (#87978) 2023-02-13 10:08:07 +01:00
Joakim Sørensen e842f90767
Add recorder engine name and version to analytics (#87784)
* Add recorder to analytics

* Add test

* Add recorder to after_dependencies

* Add version

* dialect can not be None
2023-02-13 09:18:12 +01:00
G Johansson 9008556457
Change name to entity_id Select platform error messages (#87962) 2023-02-12 22:54:04 +01:00
G Johansson 824a0475ae
Change name to entity_id Number platform error messages (#87961) 2023-02-12 22:26:25 +01:00
racsa1 6ca4c5cfe7
Bump pydaikin 2.9.0 (#87067)
Co-authored-by: rsa <>
2023-02-12 22:23:56 +01:00
G Johansson 8c00f435a6
Change name to entity_id update platform error messages (#87960) 2023-02-12 22:18:09 +01:00
Raman Gupta 65d7242c22
Bump zwave-js-server-python to 0.45.2 (#87822) 2023-02-12 22:01:37 +01:00
J. Nick Koston 7b9293941e
The recorder/statistic(s)_during_period websocket API now require the statistic_id(s) field (#87937) 2023-02-12 14:51:10 -06:00
rappenze 5f4a2a713c
Remove deprecated fibaro yaml config (#87939) 2023-02-12 21:50:50 +01:00
Jan Bouwhuis 666aace8a2
Complete partly implemented type hints for `dict` on MQTT platforms (#87839) 2023-02-12 21:47:38 +01:00
starkillerOG 168d307762
Netgear allow to remove old devices (#87849) 2023-02-12 21:45:54 +01:00
Ernst Klamer f96e8c82e8
Bump bthome-ble to 2.5.2 (#87862) 2023-02-12 21:44:08 +01:00
J. Nick Koston d1e1734fc7
Use PidfdChildWatcher by default when available (#87951)
This is a backport from cpython 3.12

https://docs.python.org/3/library/asyncio-policy.html
> PidfdChildWatcher is a “Goldilocks” child watcher implementation. It doesn’t require signals or threads, doesn’t interfere with any processes launched outside the event loop, and scales linearly with the number of subprocesses launched by the event loop. The main disadvantage is that pidfds are specific to Linux, and only work on recent (5.3+) kernels.

https://github.com/python/cpython/pull/98024
There are some additional fixes in cpython 3.12
in https://github.com/python/cpython/pull/94184
when there is no event loop running in the main thread
but this is not a problem we have
2023-02-12 15:41:55 -05:00
Jan Bouwhuis 71b67e20e4
Improve MQTT `Callable` type hints (#87838) 2023-02-12 21:24:59 +01:00
J. Nick Koston 1a35c2d805
Avoid creating a task when waiting for the MQTT mid (#87887) 2023-02-12 14:24:55 -06:00
J. Nick Koston f2fb6a9a60
Optimize mqtt matchers (#87853) 2023-02-12 14:24:35 -06:00
Ernst Klamer 18d3e4dca8
Fix kegtron state class for volume sensors (#87950) 2023-02-12 21:22:21 +01:00
J. Nick Koston 753c7abaf4
Make mqtt websocket subscribe use callback functions (#87885)
Nothing was being awaited so this was needlessly generating tasks when the callbacks fired
2023-02-12 21:05:37 +01:00
J. Nick Koston 1d4d688af3
Make mqtt discovery use callback functions (#87883) 2023-02-12 20:41:03 +01:00
Steffen Zimmermann 87a8a3c166
Bump wiffi to 1.1.2 (#87798) 2023-02-12 20:25:03 +01:00
jan iversen a88676384a
Bump pymodbus to v3.1.3 (#87841) 2023-02-12 20:21:59 +01:00
J. Nick Koston ac97097167
Speed up template lru_caches (#87942)
By avoiding the argument unpacking these functions are faster
and reduce stack overhead
2023-02-12 14:13:13 -05:00
Chris Straffon 132bc5a4f2
Update growatt_server owners (#87804) 2023-02-12 20:12:05 +01:00
J. Nick Koston e19f8595fa
Small cleanups to template helper (#87944)
- reduce dict lookups
- avoid split_entity_id
2023-02-12 14:11:48 -05:00
rappenze 69dc50c917
Small code improvements fibaro integration (#87949) 2023-02-12 19:56:02 +01:00
Klaas Schoute 60bcbd0473
Bump gridnet to v4.2.0 (#87903) 2023-02-12 18:53:05 +01:00
J. Nick Koston aa8927c98c
Speed up loops with jinja templates (#87945) 2023-02-12 18:40:55 +01:00
Allen Porter 4d186366bd
Improve Google Calendar config flow error message when API disabled (#87889) 2023-02-12 18:28:44 +01:00
David Bonnes ffc60d9091
Bump incomfort client library to 0.5.0 (#87877) 2023-02-12 18:27:08 +01:00
J. Nick Koston b054296c42
Speed up selecting which statistics to compile (#87938) 2023-02-12 18:15:27 +01:00
Erik Montnemery 10b7c273b1
Bump py-dormakaba-dkey to 1.0.2 (#87935) 2023-02-12 09:12:33 -06:00
starkillerOG 97699d1e9d
Bump reolink-aio to 0.4.1 (#87933) 2023-02-12 09:12:20 -06:00
Erik Montnemery 4db40810dd
Add support for dormakaba dKey locks (#87501)
* Add support for dormakaba dKey locks

* Pylint

* Address review comments

* Add test for already configured entry

* Add user flow

* Address review comments

* Simplify config flow

* Add tests

* Sort manifest

* Remove useless _abort_if_unique_id_configured

* Remove config entry update listener

* Simplify user flow

* Remove startup event

* Revert "Simplify user flow"

This reverts commit 0ef9d1c6bb.
2023-02-12 13:46:31 +01:00
J. Nick Koston 7aa1359c4a
Cache try_parse_enum (#87911) 2023-02-12 03:57:36 -06:00
Florent Thoumie 6680e819e5
Fix iaqualink exception handling after switch to httpx (#87898)
Fix exception handling after switch to httpx
2023-02-12 09:04:59 +01:00
J. Nick Koston 32a6280139
Optimize _sorted_statistics_to_dict to avoid checking which types each loop (#87901)
* Optimize _sorted_statistics_to_dict to avoid checking which types each loop

* tweak

* avoid some more dict lookups
2023-02-11 23:21:40 -05:00
J. Nick Koston 85649ec589
Reduce overhead to see if an entity is recorded (#87912)
A significant chunk of list_statistic_ids was checking if the entity
was recorded because it had to get the recorder instance over and
over
2023-02-11 23:21:16 -05:00
J. Nick Koston e899754919
Bump sqlalchemy to 2.0.3 (#87913)
changes: https://docs.sqlalchemy.org/en/20/changelog/changelog_20.html#change-2.0.3
2023-02-11 23:20:22 -05:00