Skip to content

Commit

Permalink
Drop schema conversion from the CLI (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly authored Aug 12, 2024
1 parent da8a0c3 commit c3c3f43
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions bellows/cli/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,13 @@ def channel_mask(channels):


async def setup(dev, baudrate, cbh=None, configure=True):
app_config = bellows.zigbee.application.ControllerApplication.SCHEMA(
{
zigpy_conf.CONF_DEVICE: {
zigpy_conf.CONF_DEVICE_PATH: dev,
zigpy_conf.CONF_DEVICE_BAUDRATE: baudrate,
zigpy_conf.CONF_DEVICE_FLOW_CONTROL: zigpy_conf.CONF_DEVICE_FLOW_CONTROL_DEFAULT,
}
app_config = {
zigpy_conf.CONF_DEVICE: {
zigpy_conf.CONF_DEVICE_PATH: dev,
zigpy_conf.CONF_DEVICE_BAUDRATE: baudrate,
zigpy_conf.CONF_DEVICE_FLOW_CONTROL: zigpy_conf.CONF_DEVICE_FLOW_CONTROL_DEFAULT,
}
)
}

app = bellows.zigbee.application.ControllerApplication(app_config)
await app.connect()
Expand All @@ -119,7 +117,6 @@ async def setup(dev, baudrate, cbh=None, configure=True):


async def setup_application(app_config, startup=True):
app_config = bellows.zigbee.application.ControllerApplication.SCHEMA(app_config)
app = await bellows.zigbee.application.ControllerApplication.new(
app_config, start_radio=startup
)
Expand Down

0 comments on commit c3c3f43

Please sign in to comment.