MQTT discovery (#5724)

* Change implementation

* Re-write

* Remove unused consts

* Update discovery.py

* Add tests

* fix other tests

* Fix check_config script test

* Lint

* Lint
This commit is contained in:
Fabian Affolter 2017-02-07 18:13:24 +01:00 committed by Paulus Schoutsen
parent 45507cd9d1
commit c7fd28c10f
7 changed files with 213 additions and 11 deletions

View file

@ -101,7 +101,13 @@ class TestCheckConfig(unittest.TestCase):
res = check_config.check(get_test_config_dir('platform.yaml'))
change_yaml_files(res)
self.assertDictEqual(
{'mqtt': {'keepalive': 60, 'port': 1883, 'protocol': '3.1.1'},
{'mqtt': {
'keepalive': 60,
'port': 1883,
'protocol': '3.1.1',
'discovery': False,
'discovery_prefix': 'homeassistant',
},
'light': []},
res['components']
)