Commit Graph

81 Commits (bbb40fde849a3189125d83bfb07769ffb488d641)

Author SHA1 Message Date
Pascal Vizeli 7484152be1 Async speedup add_device callback (#3910)
* Speed up entities processing from add_device callback

* fix lint

* fix bug
2016-10-17 00:35:57 +02:00
Pascal Vizeli 0b8b9ecb94 Async EntitiesComponent (#3820)
* first version

* First draft component entities

* Change add_entities to callback from coroutine

* Fix bug add async_prepare_reload

* Group draft v1

* group async

* bugfix

* bugfix v2

* fix lint

* fix extract_entity_ids

* fix other things

* move get_component out of executor

* bugfix

* Address minor changes

* lint

* bugfix - should work now

* make group init async only

* change update handling to old stuff

* fix group handling, remove generator from init

* fix lint

* protect loop for spaming with updates

* fix lint

* update test_group

* fix

* update group handling

* fix __init__ async trouble

* move device_tracker to new layout

* lint

* fix group unittest

* Test with coroutine

* fix bug

* now it works 💯

* ups

* first part of suggestion

* add_entities to coroutine

* change group

* convert add async_add_entity to coroutine

* fix unit tests

* fix lint

* fix lint part 2

* fix wrong import delete

* change async_update_tracked_entity_ids to coroutine

* fix

* revert last change

* fix unittest entity id

* fix unittest

* fix unittest

* fix unittest entity_component

* fix group

* fix group_test

* try part 2 to fix test_group

* fix all entity_component

* rename _process_config

* Change Group to init with factory

* fix lint

* fix lint

* fix callback

* Tweak entity component and group

* More fixes

* Final fixes

* No longer needed blocks

* Address @bbangert comments

* Add test for group.stop

* More callbacks for automation
2016-10-16 09:35:46 -07:00
Paulus Schoutsen 35b388edce Reload groups (#3203)
* Allow reloading groups without restart

* Test to make sure automation listeners are removed.

* Remove unused imports for group tests

* Simplify group config validation

* Add prepare_reload function to entity component

* Migrate group to use entity_component.prepare_reload

* Migrate automation to use entity_component.prepare_reload

* Clean up group.get_entity_ids

* Use cv.boolean for group config validation
2016-09-07 06:59:16 -07:00
Paulus Schoutsen e9813b219e Allow reloading automation without restarting HA (#3002) 2016-09-04 17:15:52 +02:00
Paulus Schoutsen 30f74bb3ca Migrate to generic discovery method (#2271)
* Migrate to generic discovery method

* Add tests for discovery
2016-06-11 17:43:13 -07:00
Johann Kellerman fbe940139a Discovery listener on all EntityComponents (#2042) 2016-05-11 21:58:22 -07:00
Johann Kellerman ec9544b9c3 Add a load_platform mechanism (#2012)
* discovery.load_platform method

* rm grep
2016-05-09 22:48:03 -07:00
Paulus Schoutsen 1d8554359c Allow setting entity namespace (#1887) 2016-04-23 06:34:49 +02:00
Paulus Schoutsen c89e9d87e8 Catch platform setup error (#1847) 2016-04-17 22:07:53 -07:00
Paulus Schoutsen f6d584af09 Allow platforms to specify PLATFORM_SCHEMA 2016-04-02 20:10:57 -07:00
Paulus Schoutsen 5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Fabian Affolter 0d9b8a0d06 Fix docstring 2016-03-09 23:49:54 +01:00
Fabian Affolter 4f536ac63d Fix PEP257 issues 2016-03-07 23:39:52 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen fce8815ab4 Support custom interval for platforms 2016-01-31 01:01:23 -08:00
Paulus Schoutsen 90e17fc77f Add tests for entity component 2016-01-31 01:01:23 -08:00
Paulus Schoutsen 53484e46a3 Move generate_entity_id to entity helpers 2016-01-23 23:00:46 -08:00
Paulus Schoutsen de79a46d43 Move extract_entity_id to service helpers 2016-01-23 22:57:14 -08:00
Paulus Schoutsen 561a78bef3 Fix EntityComponent deadlock 2015-12-22 02:19:55 -08:00
Paulus Schoutsen 99aa4307ef Add locks to entity component 2015-11-28 15:55:01 -08:00
Paulus Schoutsen 12495c717e Fix script regression 2015-10-28 12:24:33 -07:00
Paulus Schoutsen f9b17ab026 Device tracker rewrite 2015-09-09 23:37:15 -07:00
Paulus Schoutsen 382c1de981 Built-in components no longer use deprecated methods 2015-08-03 17:08:13 +02:00
Paulus Schoutsen 7870e9a5e2 Minor cleanup core 2015-08-03 17:05:33 +02:00
Paulus Schoutsen a4e0a7f235 Fix platform discovery not working 2015-05-14 21:36:12 -07:00
Paulus Schoutsen 4eeaa16f16 Convert some double to single quotes. 2015-05-11 22:23:38 -07:00
Paulus Schoutsen e630476f9f Allow platforms to specify dependencies 2015-05-11 22:23:20 -07:00
Paulus Schoutsen 49d7901585 Tweaks to EntityComponent.setup_platform 2015-03-21 22:21:57 -07:00
Paulus Schoutsen cdd5d1196a Fix regression from refactoring EntityComponent 2015-03-21 22:14:30 -07:00
Paulus Schoutsen a9324ba9d4 Update components to use Entity instead of Device 2015-03-21 19:16:13 -07:00
Paulus Schoutsen d3f0210b1a Refactor helper.device to helper.entity
Introduces a minor backwards compatible change: device_component
function add_devices is renamed to add_entities.
2015-03-21 18:49:30 -07:00