Skip to content

Commit

Permalink
fix: support incase of channels attribute is missing in component object
Browse files Browse the repository at this point in the history
  • Loading branch information
miettal committed Nov 4, 2024
1 parent f3298af commit 5453414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openems/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_channel_list(ctx, edge_id, component_id):
edge_config = ctx.obj['client'].get_edge_config(edge_id)

component = [v for (k, v) in edge_config['components'].items() if k == component_id][0]
for channel in component['channels']:
for channel in component.get('channels', []):
click.echo(click.style(f'{component_id}/{channel}', fg='green'))


Expand Down

0 comments on commit 5453414

Please sign in to comment.