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
This commit is contained in:
Pascal Vizeli 2016-10-16 18:35:46 +02:00 committed by Paulus Schoutsen
parent a0fdb2778d
commit 0b8b9ecb94
14 changed files with 503 additions and 266 deletions

View file

@ -402,7 +402,8 @@ class TestHelpersTemplate(unittest.TestCase):
'longitude': self.hass.config.longitude,
})
group.Group(self.hass, 'location group', ['test_domain.object'])
group.Group.create_group(
self.hass, 'location group', ['test_domain.object'])
self.assertEqual(
'test_domain.object',
@ -422,7 +423,8 @@ class TestHelpersTemplate(unittest.TestCase):
'longitude': self.hass.config.longitude,
})
group.Group(self.hass, 'location group', ['test_domain.object'])
group.Group.create_group(
self.hass, 'location group', ['test_domain.object'])
self.assertEqual(
'test_domain.object',