Commit Graph
100 Commits
Author SHA1 Message Date
9ccebdb8d5 Refactor group to extend domains that can be grouped (#40607)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-30 09:13:53 -05:00
J. Nick KostonandGitHub d9ba32dc3f Setup recorder model relationships to avoid calling flush (#40467) 2020-09-30 13:11:43 +02:00
J. Nick KostonandGitHub aada6a1d88 Fix logbook with empty filter and remove unused code (#40565) 2020-09-30 13:10:11 +02:00
J. Nick KostonandGitHub 205cf57a77 Code cleanups for async_track_template_result (#40737) 2020-09-30 13:00:21 +02:00
e564af0b5b Improve performance of accessing template state (#40323)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-28 10:35:12 -05:00
J. Nick KostonandGitHub a19e10c57a Add entity glob matching support to history (#40387) 2020-09-28 15:58:55 +02:00
J. Nick KostonandGitHub e08ee282ab Abort execution of template renders that overwhelm the system (#40647) 2020-09-28 14:43:22 +02:00
57b7559832 Ensure all jinja2 errors are trapped and displayed in the developer tools (#40624)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-26 17:03:32 -05:00
J. Nick KostonandGitHub 3261a904da Reduce the number of template re-renders when we are only counting states (#40272) 2020-09-26 16:29:49 -05:00
35533407fe Improve performance of counting and iterating states in templates (#40250)
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
2020-09-26 11:36:47 -05:00
J. Nick KostonandGitHub 35cfc80dd7 Log the remote ip address for incoming websocket connections when debug is on (#40581) 2020-09-26 09:32:50 +02:00
J. Nick KostonandGitHub b3b9c52df2 Add device info to gogogate2 (#40538) 2020-09-25 22:28:59 -05:00
J. Nick KostonandGitHub 3880ac0b0d Ensure group state is recalculated when re-adding on reload (#40497) 2020-09-23 20:55:32 +02:00
J. Nick KostonandGitHub f837da6fe3 Defer template tracking setup until template entity start (#40388) 2020-09-22 09:28:02 -05:00
J. Nick KostonandGitHub 7029345b9d Add support for selecting multiple entity ids from logbook (#40075) 2020-09-22 09:27:04 -05:00
J. Nick KostonandGitHub f0f817c361 Serialize websocket event message once (#40453)
Since most of the json serialize work for the websocket was done
multiple times for the same message, we can avoid the overhead
of serializing the same message many times (once per websocket
client) with a cache.
2020-09-22 08:47:04 -05:00
J. Nick KostonandGitHub e9abb357e4 Log template listeners when debug logging is on (#40180) 2020-09-17 14:45:30 -05:00
J. Nick KostonandGitHub 44952a94cf Add missing conext preservation to bayesian and universal (#40178)
We already do this for template sensors, but it was
missing for bayesian and universal
2020-09-17 16:47:23 +02:00
5ea04d64f6 Prompt to reauth when the august password is changed or token expires (#40103)
* Prompt to reauth when the august password is changed or token expires

* augment missing config flow coverage

* augment test coverage

* Adjust test

* Update homeassistant/components/august/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* block until patch complete

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-16 17:35:01 +02:00
J. Nick KostonandGitHub 2ea604cc2a Convert color temperature to hue and saturation for HomeKit (#40089)
The HomeKit spec does not permit the color temp characteristic
being exposed when color (hue, sat) is present.  Since
Home Assistant will still send color temp values, we need to
convert them to hue, sat values for HomeKit
2020-09-15 09:27:30 +02:00
J. Nick KostonandGitHub 8d687c951a Update gogogate2-api to 2.0.2 (#40010)
* Update gogogate2-api to 2.0.2

Resolves a timeout issue: https://github.com/vangorra/python_gogogate2_api/pull/11

* mock voltage
2020-09-15 08:48:30 +02:00
J. Nick KostonandGitHub 938e06c00e Fix homekit error when the bridge has been ignored. (#40082) 2020-09-14 19:39:44 -05:00
J. Nick KostonandGitHub 949bd8d738 Reduce listener cancelation code in template tracker (#40040) 2020-09-14 21:43:00 +02:00
J. Nick KostonandGitHub 15281f468e Extract the icon and state for logbook state changed events (#40039) 2020-09-14 09:35:19 -05:00
J. Nick KostonandGitHub 2e1dbe51a4 Make system_log test reliable (#40049) 2020-09-14 08:48:59 +02:00
J. Nick KostonandGitHub c19b5c5ac3 Make recorder block_till_done reliable (#40043) 2020-09-14 08:48:29 +02:00
J. Nick KostonandGitHub 2ff3c74fab Fix intermittently failing dyson test (#40051) 2020-09-13 21:37:52 -05:00
J. Nick KostonandGitHub 7b016063ca Refactor zeroconf setup to be async (#39955)
* Refactor zeroconf setup to be async

Most of the setup was calling back to async because
we were setting up listeners.  Since we only need
to jump into the executor to create the zeroconf
instance, its much faster to setup in async.

In testing this cut the setup time in half
or better.

* partial revert to after_deps
2020-09-13 18:06:19 -05:00
J. Nick KostonandGitHub 46f9c0fb8a Update phrasing and pin validation for homekit_controller (#40006) 2020-09-13 15:26:04 -05:00
J. Nick KostonandGitHub 36ce8ba79e Ensure homekit_controller traps exceptions from find_ip_by_device_id (#40030) 2020-09-13 21:55:49 +02:00
J. Nick KostonandGitHub f3d50e2104 Do not log an error when a host is unreachable while pinging (#40024) 2020-09-13 16:44:37 +02:00
J. Nick KostonandGitHub ff4bb962c4 Cleanup and reduce duplicate code from recent template changes (#40012)
As a result of refactoring, there is duplicate code
we can now reduce.

Additionally `_wrap_state` can be removed because
it had unreachable checks for `None`
2020-09-13 09:21:11 -05:00
J. Nick KostonandGitHub 84578f515d Suppress homekit bridge discovery by homekit controller (#39990) 2020-09-13 09:12:10 -05:00
J. Nick KostonandGitHub aaa8083d49 Change template loop detection strategy to allow self-referencing updates when there are multiple templates (#39943) 2020-09-12 14:20:21 +02:00
J. Nick KostonandGitHub 741487a1fc Return the listeners with the template result for the websocket api (#39925) 2020-09-11 13:18:40 -05:00
J. Nick KostonandGitHub e208aac834 Add async_track_state_removed_domain to allow tracking when a state is removed from a domain (#39859)
when a state is removed from a domain
2020-09-11 13:03:31 +02:00
9389a7c9be Limit zeroconf discovery to name/macaddress when provided (#39877)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-11 12:19:21 +02:00
J. Nick KostonandGitHub 487a74ba5d Update zeroconf to 0.28.5 (#39923) 2020-09-11 07:15:13 +02:00
J. Nick KostonandGitHub bf1ad0a757 Prevent missing integration from failing HomeKit startup (#39918) 2020-09-10 23:19:11 +02:00
J. Nick KostonandGitHub fd8a4182d9 Detect self-referencing loops in template entities and log a warning (#39897) 2020-09-10 20:50:11 +02:00
J. Nick KostonandGitHub 047dc19351 Add zeroconf discovery to homekit (#39907)
Ensures HomeKit Bridge is offered for onboarding if
homekit is detected on the network.
2020-09-10 20:44:11 +02:00
J. Nick KostonandGitHub fb31b04c08 Increase template test coverage. (#39908) 2020-09-10 20:43:45 +02:00
J. Nick KostonandGitHub b5005430be Fix ping log level to be debug instead of warning (#39900) 2020-09-10 12:10:43 -04:00
J. Nick KostonandGitHub b7ad83c655 Use a unique id for each icmplib ping to avoid mixing unrelated responses (#39830) 2020-09-09 22:19:14 +02:00
J. Nick KostonandGitHub 8adfcf23f0 Fix isy994 send_node_command (#39806) 2020-09-08 17:31:08 +02:00
J. Nick KostonandGitHub 4bbd69955b Restore missing device_class to template binary_sensor (#39805) 2020-09-08 17:12:23 +02:00
J. Nick KostonandGitHub 0507ec9d8b Fix cover template entities honoring titlecase True/False (#39803) 2020-09-08 17:08:31 +02:00
J. Nick KostonandGitHub a495946eeb Add the ability to reload bayesian platforms from yaml (#39771) 2020-09-08 09:41:17 +02:00
J. Nick KostonandGitHub 5e83feeabf Increase test coverage for template sandbox (#39750) 2020-09-07 17:33:22 +02:00
J. Nick KostonandGitHub 90d574e521 Ensure static templates are still called back on first refresh (#39753) 2020-09-07 17:19:39 +02:00
J. Nick KostonandGitHub 8c96eb7c56 Retry tado setup later when cloud service is unavailable (#39748) 2020-09-07 16:16:29 +02:00
J. Nick KostonandGitHub 2e6cd4f12b Optimize template sandbox for Home Assistant (#39731) 2020-09-07 09:17:41 +02:00
J. Nick KostonandGitHub 4779916ac4 Set DEVICE_CLASS_GATE for iSmartGate gates (#39703) 2020-09-06 18:55:20 -05:00
J. Nick KostonandGitHub 251d8919ea Add domain filter support to async_all to match async_entity_ids (#39725)
This avoids copying all the states before applying
the filter
2020-09-06 23:20:32 +02:00
J. Nick KostonandGitHub e649e27d4d Bump zeroconf to resolve a performance issue with the cache reaper (#39713)
https://github.com/jstasiak/python-zeroconf/pull/297
2020-09-06 22:40:27 +02:00
J. Nick KostonandGitHub d7e471e244 Add HomeKit discovery for iSmartGate (#39702) 2020-09-06 12:56:38 -05:00
J. Nick KostonandGitHub 9b23d7c2fd Use the shared Zeroconf instance in esphome (#38747) 2020-09-04 21:01:41 +02:00
ebc31c0f08 Do not treat nexia http not found as invalid auth (#39484)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-04 16:54:27 +02:00
J. Nick KostonandGitHub a096c20930 Fix missing assert in template test (#39648) 2020-09-04 16:28:56 +02:00
J. Nick KostonandGitHub 1034e4ec50 Bump nexia to 0.9.4 (#39634)
Fix for type missing in the json response
2020-09-03 20:54:48 -04:00
J. Nick KostonandGitHub 35e84d0427 Add as_local convenience function to jinja templates (#39618) 2020-09-03 14:35:16 -05:00
J. Nick KostonandGitHub 65e53b8251 Support reloading mqtt yaml configuration (#39531) 2020-09-02 20:16:21 -05:00
J. Nick KostonandGitHub 56e76a3265 Support reloading the smtp notify platform (#39530)
* Support reloading the smtp notify platform

* patch test
2020-09-02 19:43:07 -05:00
J. Nick KostonandGitHub 93555fed75 Support reloading the telegram notify platform (#39529)
* Support reloading the telegram notify platform

* services.yaml
2020-09-02 19:08:47 -05:00
J. Nick KostonandGitHub 661b593db3 Support reloading the rest notify platform (#39527)
* Support reloading the rest notify platform

* update services.yaml

* fix conflict
2020-09-02 18:25:43 -05:00
J. Nick KostonandGitHub a778690b64 Support reloading the group notify platform (#39511) 2020-09-03 00:12:07 +02:00
45c28dd9c5 Provide a logbook option entity_matches_only to optimize for single entity lookup (#39555)
* Provide a logbook option entity_matches_only to optimize for single entity id lookup

When entity_matches_only is provided, contexts and events that do not
contain the entity_id are not included in the logbook response.

* Update homeassistant/components/logbook/__init__.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* api only takes a single entity

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-02 10:32:08 -05:00
J. Nick KostonandGitHub e55a014e94 Undecorate RenderInfo result property (#39108) 2020-09-02 10:35:15 +02:00
J. Nick KostonandGitHub 3e9963a216 Overcome group concurrent setup limitation (#39483)
With a lot of groups the limitation that groups
had to be setup one at a time could account for
the bulk of startup time.
2020-09-02 10:14:16 +02:00
J. Nick KostonandGitHub 557684c3ce Add ability to disable the sqlite3 quick_check (#39479) 2020-09-02 10:12:56 +02:00
J. Nick KostonandGitHub 762537d82d Deprecate manually passing entity ids to template entities (#39382)
It is no longer necessary to provide a list of entities to monitor
to the template platforms.

The template is now re-evaluated whenever
a referenced entity changes state, and new entities are automaticlly
discovered.

Automatic analysis can now determine the entities for all templates
without the need for manual setup.
2020-09-01 08:53:50 -05:00
J. Nick KostonandGitHub a77e09b2c2 Make async_track_template_result track multiple templates (#39371)
* Make async_track_template_result track multiple templates

Combine template entity updates to only write ha
state once per template group update

* Make async_track_template_result use dataclasses for input/output

* black versions

* naming
2020-08-31 19:07:40 -05:00
J. Nick KostonandGitHub 60d1606049 Fix kodi codeowners (#39532) 2020-08-31 16:18:12 -05:00
J. Nick KostonandGitHub 11e4ad2272 Bump zeroconf to 0.28.3 (#39471)
Changes:
https://github.com/jstasiak/python-zeroconf/pull/287

Hopefully this will fix the last round of HomeKit issues
2020-08-31 13:11:26 -05:00
J. Nick KostonandGitHub 4d637e5f30 Skip setup of dependencies if they are already setup (#39482)
after_dependencies were checking hass.config.components
to see if something was already setup.  We did not do
the same for dependencies which resulted in trying
to set them up more then once.

Noticed when `homeassistant.setup` was set to debug
logging and many integrations were announcing
waiting on http when it was already setup.
2020-08-31 07:54:15 -04:00
J. Nick KostonandGitHub 4bbc737954 Fix light device trigger test flapping (#39470) 2020-08-30 14:34:16 -05:00
J. Nick KostonandGitHub 25f9560fb6 Update schluter to use CoordinatorEntity (#39454) 2020-08-30 14:19:48 -05:00
J. Nick KostonandGitHub 705b253a99 Update awair to use CoordinatorEntity (#39469) 2020-08-30 14:05:22 -05:00
J. Nick KostonandGitHub 56ddbd87b2 Fix recorder test intermittently failing (#39468) 2020-08-30 13:58:00 -05:00
J. Nick KostonandGitHub 9ec870c750 Update hunterdouglas_powerview to use CoordinatorEntity (#39463) 2020-08-30 13:28:09 -05:00
J. Nick KostonandGitHub b57f33c41a Update control4 to use CoordinatorEntity (#39466) 2020-08-30 13:27:46 -05:00
J. Nick KostonandGitHub ab0b0dc51c Update ovo_energy to use CoordinatorEntity (#39459) 2020-08-30 13:20:45 -05:00
J. Nick KostonandGitHub 1fbb158211 Update dexcom to use CoordinatorEntity (#39464) 2020-08-30 13:20:01 -05:00
J. Nick KostonandGitHub c4f5a05b27 Update coolmaster to use CoordinatorEntity (#39465) 2020-08-30 13:18:19 -05:00
J. Nick KostonandGitHub 9d1045dd7a Update met to use CoordinatorEntity (#39462) 2020-08-30 20:14:09 +02:00
J. Nick KostonandGitHub 2b78d5235d Update risco to use CoordinatorEntity (#39456) 2020-08-30 13:04:30 -05:00
J. Nick KostonandGitHub 692ed8c639 Update notion to use CoordinatorEntity (#39460) 2020-08-30 13:02:56 -05:00
J. Nick KostonandGitHub 773860ca5c Update plugwise to use CoordinatorEntity (#39457) 2020-08-30 13:02:27 -05:00
J. Nick KostonandGitHub 8b893173fd Prevent CoordinatorEntity from requesting updates on disabled entities (#39452) 2020-08-30 12:10:22 -05:00
J. Nick KostonandGitHub d9c9adbc91 Update tankerkoenig to use CoordinatorEntity (#39440) 2020-08-30 18:27:06 +02:00
J. Nick KostonandGitHub 225743a620 Update upnp to use CoordinatorEntity (#39434) 2020-08-30 18:17:41 +02:00
J. Nick KostonandGitHub 0a389a4651 Update sharkiq to use CoordinatorEntity (#39427)
* Update sharkiq to use CoordinatorEntity

Fix pylint

* revert
2020-08-30 09:52:48 -05:00
J. Nick KostonandGitHub 4a21b1f589 Update smart_meter_texas to use CoordinatorEntity (#39426) 2020-08-30 16:43:30 +02:00
854e33025b Update nexia to use CoordinatorEntity (#39391)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-30 14:57:02 +02:00
J. Nick KostonandGitHub 0f5733ac59 Update cert_expiry to use CoordinatorEntity (#39397) 2020-08-30 14:41:18 +02:00
J. Nick KostonandGitHub 21f1875816 Update updater to use CoordinatorEntity (#39396) 2020-08-30 14:40:55 +02:00
J. Nick KostonandGitHub 2525d319a3 Update nut to use CoordinatorEntity (#39394) 2020-08-30 14:40:26 +02:00
J. Nick KostonandGitHub 4e876cb473 Update myq to use CoordinatorEntity (#39393) 2020-08-30 14:40:00 +02:00
J. Nick KostonandGitHub a4f475245c Update griddy to use CoordinatorEntity (#39392) 2020-08-30 14:39:07 +02:00
J. Nick KostonandGitHub f7d1cfb625 Update powerwall to use CoordinatorEntity (#39389) 2020-08-30 14:37:11 +02:00