Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cli command for adding a toy account #368

Merged
merged 13 commits into from Feb 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions flexmeasures/cli/data_add.py
Expand Up @@ -848,12 +848,12 @@ def add_toy_account(kind: str, name: str):
generic_asset=asset,
unit="kW",
timezone="Europe/Amsterdam",
event_resolution=timedelta(minutes=5),
event_resolution=timedelta(minutes=15),
)
db.session.add(charging_sensor)

# add public day-ahead market (as sensor of transmission zone asset?)
nhoening marked this conversation as resolved.
Show resolved Hide resolved
nl_zone = add_transmission_zone_asset("nl", db=db)
nl_zone = add_transmission_zone_asset("NL", db=db)
day_ahead_sensor = Sensor.query.filter(
Sensor.generic_asset == nl_zone, Sensor.name == "Day ahead prices"
).one_or_none()
Expand All @@ -863,7 +863,7 @@ def add_toy_account(kind: str, name: str):
generic_asset=nl_zone,
unit="EUR/MWh",
timezone="Europe/Amsterdam",
event_resolution=timedelta(minutes=15),
event_resolution=timedelta(minutes=60),
)
db.session.add(day_ahead_sensor)

Expand All @@ -872,6 +872,7 @@ def add_toy_account(kind: str, name: str):
click.echo(
f"Toy account {name} with user {user.email} created successfully. You might want to run `flexmeasures show account --id {user.account.id}`"
)
click.echo(f"The sensor for Day ahead prices is {day_ahead_sensor}.")


@fm_add_data.command("external-weather-forecasts")
Expand Down