From e13497f5234dc736dc36695a69f59f8e634fe5c0 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:58:24 -0400 Subject: [PATCH] Do not double convert `SCHEMA` (#50) --- 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)