fixes - ui stuff
This commit is contained in:
@@ -100,6 +100,17 @@ def add_fhem_devices(devices, groups):
|
||||
devices[device_type].append(device)
|
||||
|
||||
|
||||
def add_light_groups(groups):
|
||||
light_groups = {
|
||||
f"light_{group_id}": {
|
||||
'name': content['name'] + " Lichter",
|
||||
'entities': [e for e in content['entities'] if e.startswith('light.')],
|
||||
}
|
||||
for group_id, content in groups.items() if 'name' in content
|
||||
}
|
||||
groups.update(light_groups)
|
||||
|
||||
|
||||
def main():
|
||||
group_dict = yaml.load(open('groups.yaml'))
|
||||
|
||||
@@ -110,6 +121,7 @@ def main():
|
||||
with open('output/configuration.yaml', 'w') as output:
|
||||
output.write(open('manual_config.yaml', 'r').read())
|
||||
yaml.dump(all_devices, output)
|
||||
add_light_groups(group_dict)
|
||||
yaml.dump(group_dict, open('output/groups.yaml', 'w'))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user