Skip to content

Commit 5e3cfb8

Browse files
authored
Fix microgrid API URL in example (#1006)
Replace HOST/PORT with URL in example and actually use it to connect to the microgrid API.
2 parents d5db4e0 + a6c4d75 commit 5e3cfb8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/battery_pool.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
from frequenz.sdk import microgrid
1414
from frequenz.sdk.actor import ResamplerConfig
1515

16-
HOST = "microgrid.sandbox.api.frequenz.io" # it should be the host name.
17-
PORT = 62060
16+
MICROGRID_API_URL = "grpc://microgrid.sandbox.api.frequenz.io:62060"
1817

1918

2019
async def main() -> None:
@@ -26,7 +25,7 @@ async def main() -> None:
2625
logging.getLogger("hpack.hpack").setLevel(logging.INFO)
2726

2827
await microgrid.initialize(
29-
"grpc://microgrid.sandbox.api.frequenz.io:62060",
28+
MICROGRID_API_URL,
3029
resampler_config=ResamplerConfig(resampling_period=timedelta(seconds=1.0)),
3130
)
3231

0 commit comments

Comments
 (0)