Skip to content

Commit e13497f

Browse files
authored
Do not double convert SCHEMA (#50)
1 parent ab58a1b commit e13497f

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

zigpy_cli/radio.py

+8-11
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,18 @@ async def radio(ctx, radio, port, baudrate=None, database=None):
4949
radio_module = importlib.import_module(module)
5050

5151
# Start the radio
52-
app_cls = radio_module.ControllerApplication
53-
config = app_cls.SCHEMA(
54-
{
55-
"device": {"path": port},
56-
"backup_enabled": False,
57-
"startup_energy_scan": False,
58-
"database_path": database,
59-
"use_thread": False,
60-
}
61-
)
52+
config = {
53+
"device": {"path": port},
54+
"backup_enabled": False,
55+
"startup_energy_scan": False,
56+
"database_path": database,
57+
"use_thread": False,
58+
}
6259

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

66-
app = app_cls(config)
63+
app = radio_module.ControllerApplication(config)
6764

6865
ctx.obj = app
6966
ctx.call_on_close(radio_cleanup)

0 commit comments

Comments
 (0)