parent
7ff1ded0b5
commit
1f4f2d7086
|
@ -454,10 +454,9 @@ def _identify_config_schema(module):
|
|||
except (AttributeError, KeyError):
|
||||
return (None, None)
|
||||
t_schema = str(schema)
|
||||
if (t_schema.startswith('<function ordered_dict') or
|
||||
t_schema.startswith('<Schema({<function slug')):
|
||||
if t_schema.startswith(('{', '<function ordered_dict')):
|
||||
return ('dict', schema)
|
||||
if t_schema.startswith('All(<function ensure_list'):
|
||||
if t_schema.startswith(('[', 'All(<function ensure_list')):
|
||||
return ('list', schema)
|
||||
return '', schema
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ pyyaml>=3.11,<4
|
|||
pytz>=2017.02
|
||||
pip>=7.1.0
|
||||
jinja2>=2.9.5
|
||||
voluptuous==0.9.3
|
||||
voluptuous==0.10.5
|
||||
typing>=3,<4
|
||||
aiohttp==2.0.7
|
||||
async_timeout==1.2.0
|
||||
|
|
|
@ -4,7 +4,7 @@ pyyaml>=3.11,<4
|
|||
pytz>=2017.02
|
||||
pip>=7.1.0
|
||||
jinja2>=2.9.5
|
||||
voluptuous==0.9.3
|
||||
voluptuous==0.10.5
|
||||
typing>=3,<4
|
||||
aiohttp==2.0.7
|
||||
async_timeout==1.2.0
|
||||
|
|
2
setup.py
2
setup.py
|
@ -20,7 +20,7 @@ REQUIRES = [
|
|||
'pytz>=2017.02',
|
||||
'pip>=7.1.0',
|
||||
'jinja2>=2.9.5',
|
||||
'voluptuous==0.9.3',
|
||||
'voluptuous==0.10.5',
|
||||
'typing>=3,<4',
|
||||
'aiohttp==2.0.7',
|
||||
'async_timeout==1.2.0',
|
||||
|
|
|
@ -509,7 +509,7 @@ def test_merge_once_only(merge_log_err):
|
|||
'mqtt': {}, 'api': {}
|
||||
}
|
||||
config_util.merge_packages_config(config, packages)
|
||||
assert merge_log_err.call_count == 2
|
||||
assert merge_log_err.call_count == 1
|
||||
assert len(config) == 3
|
||||
|
||||
|
||||
|
@ -521,7 +521,7 @@ def test_merge_id_schema(hass):
|
|||
'script': 'dict',
|
||||
'input_boolean': 'dict',
|
||||
'shell_command': 'dict',
|
||||
'qwikswitch': '',
|
||||
'qwikswitch': 'dict',
|
||||
}
|
||||
for name, expected_type in types.items():
|
||||
module = config_util.get_component(name)
|
||||
|
|
Loading…
Reference in New Issue