Skip to content

Commit

Permalink
Do not double convert SCHEMA (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly authored Aug 8, 2024
1 parent ab58a1b commit e13497f
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 @@ -49,21 +49,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 e13497f

Please sign in to comment.