From 31396973d1c21b06ad8a2db99b965c7cc4fa936b Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:28:36 -0400 Subject: [PATCH] Do not double convert `SCHEMA` --- zigpy_cli/radio.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/zigpy_cli/radio.py b/zigpy_cli/radio.py index 089069f..7926480 100644 --- a/zigpy_cli/radio.py +++ b/zigpy_cli/radio.py @@ -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)