From fb61429266b140c5dfb688c2ad9df20840c14e6b Mon Sep 17 00:00:00 2001 From: Manuel Fritsch Date: Sat, 6 Feb 2021 14:19:51 +0100 Subject: [PATCH] setup one wire added --- cbpi/cli.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cbpi/cli.py b/cbpi/cli.py index 2c3f75a..f4036ec 100644 --- a/cbpi/cli.py +++ b/cbpi/cli.py @@ -227,14 +227,16 @@ def setup(): @click.command() -@click.option('--list', is_flag=True) -def onewire(list): +@click.option('--list', is_flag=True, help="List all 1Wire Devices") +@click.option('--setup', is_flag=True, help="Setup 1Wire on Raspberry Pi") +def onewire(list, setup): '''Setup 1wire on Raspberry Pi''' + if setup is True: + setup_one_wire() if list is True: list_one_wire() - else: - print("Setting up 1Wire") - setup_one_wire() + + @click.command() def start():