Skip to content

Commit

Permalink
Merge branch 'dev' into puddly/advanced-energy-scan
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Aug 12, 2024
2 parents d8bc230 + e13497f commit db2e486
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions zigpy_cli/radio.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,18 @@ async def radio(ctx, radio, port, baudrate=None, database=None):
radio_module = importlib.import_module(module)

# Start the radio
app_cls = radio_module.ControllerApplication
config = app_cls.SCHEMA(
{
"device": {"path": port},
"backup_enabled": False,
"startup_energy_scan": False,
"database_path": database,
"use_thread": False,
}
)
config = {
"device": {"path": port},
"backup_enabled": False,
"startup_energy_scan": False,
"database_path": database,
"use_thread": False,
}

if baudrate is not None:
config["device"]["baudrate"] = baudrate

app = app_cls(config)
app = radio_module.ControllerApplication(config)

ctx.obj = app
ctx.call_on_close(radio_cleanup)
Expand Down

0 comments on commit db2e486

Please sign in to comment.