Commit Graph
100 Commits
Author SHA1 Message Date
J. Nick KostonandGitHub 5ca4b4cd0f Set the translations cache under the lock (#42470) 2020-10-27 22:02:38 +01:00
J. Nick KostonandGitHub df25feab37 Convert somfy to use DataUpdateCoordinator (#42434) 2020-10-26 23:42:12 -05:00
J. Nick KostonandGitHub 9e3d9af8e9 Set device class for lutron_caseta cover (#42436)
Since only shades are supported by the current code
always set to DEVICE_CLASS_SHADE
2020-10-26 20:43:04 -05:00
J. Nick KostonandGitHub 325b66c41c Restore somfy state in optimistic mode on restart (#42426) 2020-10-26 17:15:39 -05:00
J. Nick KostonandGitHub 935c2df7cb Add a test for template entities that reuse the template (#42404) 2020-10-26 16:08:57 +01:00
J. Nick KostonandGitHub ce2c388c09 Ensure config entry platforms are excluded from reload (#42367) 2020-10-25 23:53:31 +01:00
J. Nick KostonandGitHub 221bb5ad52 Upgrade to aiohttp 3.7.1 (#42305) 2020-10-25 14:44:39 +01:00
J. Nick KostonandGitHub 3f18cdc75e Refactor august to use self.async_on_remove (#42333) 2020-10-25 07:27:51 -05:00
J. Nick KostonandGitHub 6822190772 Fix unmocked https in the test suite (#42316) 2020-10-25 07:16:23 -05:00
J. Nick KostonandGitHub c1a7896a40 Minimize sense writes to the state machine (#42310)
Sense was generating hundred state updates when most
of the time the state was not changing
2020-10-24 23:35:21 +02:00
J. Nick KostonandGitHub 4bf9ce6fca Add support for homekit garage obstruction sensors (#42243) 2020-10-23 12:18:02 -05:00
J. Nick KostonandGitHub 5bba299e8f Ensure event listener integrations do the queue insert as a callback (#42265) 2020-10-23 17:38:46 +02:00
J. Nick KostonandGitHub 4a3b40a3ef Ensure websocket event serializer cache is effective if subscription iden differs (#42226)
Since someone websocket subscriptions will use an iden of 2 for
state_changed event (most comment), and some will use another
number for all events, the cache would not be used because the
iden number was different.  We now cache only the event and
use a fast replace to insert the iden number into the serailized
response.
2020-10-23 01:28:22 +02:00
J. Nick KostonandGitHub 4a0d18ccd8 Avoid overloading the executor with service.yaml loads (#42172) 2020-10-21 22:24:50 +02:00
J. Nick KostonandGitHub df2ede6522 Fix state overwrite race condition where two platforms request the same entity_id (#42151)
* Fix state overwrite race condition where two platforms request the same entity id

* fix test

* create reservations instead

* revert

* cannot use __slots__ because we patch async_all
2020-10-21 17:01:51 +02:00
J. Nick KostonandGitHub 023268df38 Update nuheat exception handling (#42127)
* Update nuheat exception handling

* remove unneeded exception handler
2020-10-20 20:22:10 +02:00
J. Nick KostonandGitHub 5a907095e5 Remove logging from state in flume (#42126) 2020-10-20 16:41:06 +02:00
31c21126a8 Implement time tracking in templates (#41147)
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
2020-10-19 11:02:43 +02:00
J. Nick KostonandGitHub 77b95ae8a1 Reduce domain states rate limit to 1 per second (#42004) 2020-10-19 10:18:25 +02:00
J. Nick KostonandGitHub 3a9b2392f8 Suppress domain and all listeners during template rate limit (#42005) 2020-10-19 10:17:51 +02:00
J. Nick KostonandGitHub 9649525fe6 Increase coverage and optimize history skip_initial_state (#42014)
Avoids a database query when all states have not
changed in the time window when skip_initial_state
is set.
2020-10-19 09:53:47 +02:00
J. Nick KostonandGitHub c86dfeb6e2 Remove double timeout from gogogate2 (#42052) 2020-10-18 15:46:13 -05:00
J. Nick KostonandGitHub 8c27a99386 Convert nuheat to use DataUpdateCoordinator (#42034)
* Convert nuheat to use DataUpdateCoordinator

* coverage

* Update homeassistant/components/nuheat/climate.py
2020-10-18 13:45:47 -05:00
J. Nick KostonandGitHub 37df7bf4c5 Convert flume to use DataUpdateCoordinator (#42017)
* Convert flume to use DataUpdateCoordinator

* pylint

* Update homeassistant/components/flume/sensor.py

* Update homeassistant/components/flume/sensor.py
2020-10-18 13:44:36 -05:00
J. Nick KostonandGitHub 6c1078d1ca Reduce ssdp context switches into the executor (#42045)
* Reduce ssdp context switches into the executor

* no self use
2020-10-18 13:44:01 -05:00
J. Nick KostonandGitHub 183f94364a Parse html in the executor for scrape sensors (#41987) 2020-10-17 18:57:59 +02:00
J. Nick KostonandGitHub c0845a3650 Prevent ios sensor updates from running in the executor (#41986)
The update was only checking an existing dict
2020-10-17 15:38:42 +02:00
J. Nick KostonandGitHub d9fbde4f6c Prevent doorbird from creating many executor jobs (#41985) 2020-10-17 15:35:24 +02:00
J. Nick KostonandGitHub 5580b21260 Decouple RestData from rest.sensor (#41980) 2020-10-17 04:56:45 +02:00
J. Nick KostonandGitHub ad6ce5fa83 Convert rest sensors to async using httpx (#41973) 2020-10-16 19:21:13 -05:00
J. Nick KostonandGitHub 1e256e6122 Remove unneeded async_add_job from homematic (#41855) 2020-10-16 09:24:12 -05:00
J. Nick KostonandGitHub 965bb2c8df Update nest to use async_add_executor_job (#41926) 2020-10-16 13:31:16 +02:00
J. Nick KostonandGitHub 9c719beded Update telegram_bot to use async_add_executor_job (#41924) 2020-10-16 13:29:28 +02:00
J. Nick KostonandGitHub 83af805522 Update google_translate to use async_add_executor_job (#41925) 2020-10-16 13:15:01 +02:00
J. Nick KostonandGitHub 6f113e981b Update litejet and zwave tests to use async_add_executor_job (#41927)
* Update litejet and zwave tests to use async_add_executor_job

* await
2020-10-16 13:08:04 +02:00
J. Nick KostonandGitHub 9f5e3bfbd5 Update homekit camera resolutions for tvOS 14 (#41914) 2020-10-16 05:42:38 -05:00
J. Nick KostonandGitHub a220e74154 Update zhong_hong to use async_add_executor_job (#41846) 2020-10-15 15:39:48 -05:00
3ffa050905 Support HomeKit accessory mode (#41679)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-15 11:59:50 -05:00
J. Nick KostonandGitHub 41872341f5 Update mysensors to use async_add_executor_job (#41849) 2020-10-15 09:22:50 -05:00
J. Nick KostonandGitHub 3ee4f43b20 Update kira to use async_add_executor_job (#41847) 2020-10-15 09:22:37 -05:00
J. Nick KostonandGitHub 2e05592039 Update remaining i2c sensors to use async_add_executor_job (#41860) 2020-10-15 09:22:17 -05:00
J. Nick KostonandGitHub c5ae801bcb Allow HomeKit to be configured in include mode from the UI (#41662) 2020-10-15 15:33:01 +02:00
J. Nick KostonandGitHub 21cc23244d Improve template ratelimit performance (#41741) 2020-10-15 12:02:05 +02:00
J. Nick KostonandPaulus Schoutsen 99010bab18 Permit event trackers to accept an empty list of entities or domains (#41857) 2020-10-15 08:42:05 +00:00
J. Nick KostonandPaulus Schoutsen b541b08d2d Ensure all template errors are caught and the websocket api reports them (#41719) 2020-10-15 08:42:00 +00:00
J. Nick KostonandGitHub 53a1d92f2b Permit event trackers to accept an empty list of entities or domains (#41857) 2020-10-15 09:26:51 +02:00
J. Nick KostonandGitHub e0df91ef9f Update mqtt to use HassJob (#41796)
Avoids the overhead of checking the callable type at run time
2020-10-14 22:04:48 +02:00
J. Nick KostonandGitHub 9d9520b2f9 Switch sabnzbd to use async_add_executor_job (#41835) 2020-10-14 20:27:34 +02:00
J. Nick KostonandGitHub afc602595b Only validate entity id if it did not exist on state change (#41820) 2020-10-14 11:06:51 +02:00
J. Nick KostonandGitHub 6d05729e48 Update image_processing to use async_add_executor_job (#41810) 2020-10-14 08:19:39 +02:00
J. Nick KostonandGitHub 6c0d5fa1d6 Switch legacy async_add_job to async_add_executor_job in wemo (#41807)
These calls were already using async_add_executor_job in some of the
other platforms
2020-10-14 08:19:09 +02:00
J. Nick KostonandGitHub cdd17b4215 Update caldav to use async_add_executor_job (#41808)
self.calendar.date_search was already being run in the executor in
other places so this should be safe
2020-10-14 08:18:23 +02:00
J. Nick KostonandGitHub 6c3e450117 Update shopping_list to use async_add_executor_job (#41795) 2020-10-13 17:22:17 -05:00
J. Nick KostonandGitHub 3748c3c985 Fix canary test doing IO and failing when the cloud is offline (#41799) 2020-10-13 15:57:00 -05:00
J. Nick KostonandGitHub ff2872e376 Remove unneeded context switch in dyson (#41793)
dyson was running the add_message_listener code in the
executor even though all it did was append to an array

https://github.com/etheralm/libpurecool/blob/master/libpurecool/dyson_device.py#L213
2020-10-13 15:45:00 -05:00
J. Nick KostonandGitHub 5c540dcfcf Update cast to use async_add_executor_job (#41794) 2020-10-13 15:39:43 -05:00
J. Nick KostonandGitHub af74e36d16 Update html5 to use async_add_executor_job (#41788) 2020-10-13 22:26:14 +02:00
J. Nick KostonandGitHub e791946f00 Update generic camera to use async_add_executor_job (#41787) 2020-10-13 21:59:39 +02:00
J. Nick KostonandGitHub b58ef6ae92 Convert remaining async_add_job to async_add_executor_job in media_player (#41790) 2020-10-13 21:57:36 +02:00
J. Nick KostonandGitHub aefd4908df Update mjpeg camera to use async_add_executor_job (#41791) 2020-10-13 21:56:57 +02:00
J. Nick KostonandGitHub 1bcedd15b3 Update sun listeners to use HassJob (#41695)
Avoids checking the callable type every time sun events trigger
2020-10-13 21:37:10 +02:00
J. Nick KostonandGitHub ef9cd485fd Update to zeroconf 0.28.6 to accomodate devices that are not strictly name compliant (#41784) 2020-10-13 14:02:52 -05:00
J. Nick KostonandGitHub 33b548e247 Reduce ORM overhead when the old state was already written to the database (#41736)
We can avoid processing the relationship when the old state was already
written to the database which will common case with a commit interval
of 1s. Since we already know the value for old_state_id we can use it
instead of asking sqlalchemy to process the relationship at flush/commit
time which can significantly speed up sqlalchemy's _emit_insert_statements
implementation.
2020-10-13 15:34:46 +02:00
J. Nick KostonandGitHub a9de9c62f1 Use native utc timezone for utcnow() (#41727)
This allows timezone operations to happen in C code instead
of the pure-python code of pytz
2020-10-12 17:43:21 -05:00
J. Nick KostonandGitHub b897ca7260 Ensure all template errors are caught and the websocket api reports them (#41719) 2020-10-12 16:38:24 +02:00
J. Nick KostonandGitHub c7bbba9d48 Reduce icmplib ping timeout to match ping binary behavior (#41620) 2020-10-11 11:12:27 -05:00
J. Nick KostonandGitHub 00b338002a Update icmplib to 1.2.2 (#41608)
Fixes IPv6 lookups
2020-10-10 17:28:13 +02:00
J. Nick KostonandGitHub da2f9db62e Fix async functions accidentally marked as callbacks (#41607) 2020-10-10 16:54:36 +02:00
J. Nick KostonandGitHub 3bb0e00abe Update python_script tests to use async_add_executor_job (#41553) 2020-10-09 15:58:36 +02:00
J. Nick KostonandGitHub 49e5b665cf Convert final async_add_job to async_add_executor_job in logbook tests (#41552) 2020-10-09 15:52:06 +02:00
J. Nick KostonandGitHub 61262222aa Remove async_add_job from system_log tests (#41551) 2020-10-09 15:50:43 +02:00
J. Nick KostonandPaulus Schoutsen 56436e6387 Restore group support to plant entities (#41519) 2020-10-09 13:42:52 +00:00
f268378f0f Fix plant doing IO in the event loop. (#41527)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-09 09:57:46 +02:00
J. Nick KostonandGitHub 852d1b2e67 Update discovery to use HassJob (#41511)
Predetermine the listener types for discovery
2020-10-09 09:35:28 +02:00
J. Nick KostonandGitHub 3a863c4a0f Fully convert async_track_time_interval to use HassJob (#41513)
The callback type for interval_listener was being determined
each time the interval hit.

This was missed in the original conversion.
2020-10-09 09:35:09 +02:00
J. Nick KostonandGitHub a8a2109cef Convert last remaining async_add_job in light to async_add_executor_job (#41518) 2020-10-09 09:32:55 +02:00
J. Nick KostonandGitHub 1c431aa7bd Set created field when creating db events and states (#41523)
Avoids thousands of utcnow calls when the session
is commited on busy systems to fill in the field
default.
2020-10-09 09:31:17 +02:00
J. Nick KostonandGitHub 617509413c Update wake_on_lan to use async_add_executor_job (#41528) 2020-10-09 09:29:16 +02:00
J. Nick KostonandGitHub 3267823165 Update http to use async_add_executor_job (#41529) 2020-10-09 09:29:07 +02:00
J. Nick KostonandGitHub 822ad0ae9c Update arcam_fmj device trigger to use async_run_hass_job (#41530) 2020-10-09 09:28:55 +02:00
J. Nick KostonandGitHub fef2700351 Update kodi device trigger to use async_run_hass_job (#41531) 2020-10-09 09:27:47 +02:00
J. Nick KostonandGitHub 5ebf5996f1 Predetermine listener type for script change listeners (#41510) 2020-10-09 08:41:12 +02:00
J. Nick KostonandGitHub 0b3bea0282 Use async_add_hass_job for debouncer (#41449) 2020-10-09 08:40:36 +02:00
J. Nick KostonandGitHub e03b3e2310 Restore group support to plant entities (#41519) 2020-10-09 08:37:27 +02:00
J. Nick KostonandGitHub 68e1c70b14 Update history tests to use async_add_executor_job (#41526) 2020-10-09 08:36:59 +02:00
J. Nick KostonandGitHub 480b8165d7 Update notify to use async_add_executor_job (#41516) 2020-10-08 23:58:33 +02:00
J. Nick KostonandGitHub 5b8ecc26a4 Update device_tracker to use async_add_executor_job (#41515) 2020-10-08 23:56:32 +02:00
J. Nick KostonandPaulus Schoutsen 3a1ee2f654 Add missing on states to media player groups (#41496) 2020-10-08 15:59:09 +00:00
J. Nick KostonandGitHub 2aee72981c Add missing on states to media player groups (#41496) 2020-10-08 17:58:52 +02:00
J. Nick KostonandPaulus Schoutsen 60fe64d119 Ensure recorder commit can retry after encountering invalid data (#41426) 2020-10-08 15:46:40 +00:00
b51a160cce Update triggers to use HassJob (#41450)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-08 09:44:34 +02:00
J. Nick KostonandGitHub 7537a3a7c8 Update filter to use async_add_executor_job (#41455) 2020-10-08 09:22:51 +02:00
J. Nick KostonandGitHub 740d15e41d Update media_player to use async_add_executor_job (#41459) 2020-10-08 09:22:37 +02:00
J. Nick KostonandGitHub dfc656a2c6 Update lock to use async_add_executor_job (#41458) 2020-10-08 09:22:16 +02:00
J. Nick KostonandGitHub aa250c2b61 Update cover to use async_add_executor_job (#41456) 2020-10-08 09:21:47 +02:00
J. Nick KostonandGitHub 1bf6166817 Update fan to use async_add_executor_job (#41457) 2020-10-08 09:21:29 +02:00
J. Nick KostonandGitHub e10413fa4c Update trend to use async_add_executor_job (#41454) 2020-10-08 09:20:58 +02:00
J. Nick KostonandGitHub ad5273ded1 Update config to use async_add_executor_job (#41452) 2020-10-08 09:20:39 +02:00
J. Nick KostonandGitHub 8a374590e8 Update discovery to use async_add_executor_job (#41453) 2020-10-08 09:20:07 +02:00
J. Nick KostonandGitHub 52e8366ce7 Update roomba to use async_add_executor_job (#41448) 2020-10-08 09:15:47 +02:00