Added groups to config generation
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from typing import List
|
||||
from util import DeviceInfo
|
||||
from util import extent as extend_general
|
||||
import functools
|
||||
|
||||
__all__ = ['extent', 'import_ets5_csv_file', 'create_power_plug', 'create_lights', 'create_shutters', 'create_switches']
|
||||
|
||||
@@ -11,12 +13,15 @@ def first_lower(s):
|
||||
return s[0].lower() + s[1:]
|
||||
|
||||
|
||||
extend = functools.partial(extend_general, platform='knx')
|
||||
|
||||
|
||||
def extent(result_dict, input_dict):
|
||||
for k, v in input_dict.items():
|
||||
if k not in result_dict:
|
||||
result_dict[k] = []
|
||||
for entry in v:
|
||||
entry['platform'] = 'knx_data'
|
||||
entry['platform'] = 'knx'
|
||||
result_dict[k] += v
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user