Group service / dynamic handling (#7971)

* Add Service to group

* Finish service

* Add service functions

* fix lint

* Address paulus comments

* fix lint & cleanup

* fix lint

* fix lint

* fix lint p3

* add test for check group

* add more tests

* fix lint

* Update service.yaml

* Fix order for tests

* Fix comment

* Fix test

* Fix tests

* Fix name in tests

* Fix view

* Fix default value

* Fix lint

* Fix key error

* add name

* migrate component entity

* fix tests

* fix import

* migrate device tracker

* fix lint

* fix bug

* fix logic

* fix lint

* fix tests

* fix generator

* fix group

* fix other tests.

* Not need to load group on first stage anymore.

* fix service

* add more group depency

* fix tests

* Revert "fix tests"

This reverts commit 35a922b3a8d00821a00d153997b7be57117de328.

* Real fix

* fix test p2

* fix test p3

* fix test p4

* fix test p5

* fix test p6

* fix lint

* fix test p7

* Rename attribute

* fix group test

* fix bug

* fix flagy tests

* fix service.yaml

* fix lint
This commit is contained in:
Pascal Vizeli 2017-06-16 00:52:28 +02:00 committed by GitHub
parent 46f3088a70
commit 814834512a
27 changed files with 444 additions and 168 deletions

View file

@ -68,7 +68,7 @@ class TestCheckConfig(unittest.TestCase):
res = check_config.check(get_test_config_dir('light.yaml'))
change_yaml_files(res)
self.assertDictEqual({
'components': {'light': [{'platform': 'demo'}]},
'components': {'light': [{'platform': 'demo'}], 'group': None},
'except': {},
'secret_cache': {},
'secrets': {},
@ -110,7 +110,8 @@ class TestCheckConfig(unittest.TestCase):
'discovery_prefix': 'homeassistant',
'tls_version': 'auto',
},
'light': []},
'light': [],
'group': None},
res['components']
)
self.assertDictEqual(
@ -142,7 +143,7 @@ class TestCheckConfig(unittest.TestCase):
res = check_config.check(get_test_config_dir('badplatform.yaml'))
change_yaml_files(res)
assert res['components'] == {'light': []}
assert res['components'] == {'light': [], 'group': None}
assert res['except'] == {
check_config.ERROR_STR: [
'Platform not found: light.beer',