Skip to content

Commit

Permalink
feat: flexmeasures add sensor no longer requires setting a capacity…
Browse files Browse the repository at this point in the history
… in MW

Signed-off-by: F.N. Claessen <[email protected]>
  • Loading branch information
Flix6x committed Nov 6, 2024
1 parent 3da3560 commit c0ba16e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions flexmeasures/cli/data_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,6 @@ def add_sensor(**args):
click.secho("Attributes should be a dict.", **MsgStyle.ERROR)
raise click.Abort()
sensor.attributes = attributes
if sensor.measures_power:
if "capacity_in_mw" not in sensor.attributes:
click.secho(
"A sensor which measures power needs a capacity (see --attributes).",
**MsgStyle.ERROR,
)
raise click.Abort()
db.session.add(sensor)
db.session.commit()
click.secho(f"Successfully created sensor with ID {sensor.id}", **MsgStyle.SUCCESS)
Expand Down

0 comments on commit c0ba16e

Please sign in to comment.