Skip to content

Commit

Permalink
Update mm-latest.py
Browse files Browse the repository at this point in the history
add --status-out to options get a clean file of status data like basals-out etc.
  • Loading branch information
kenstack committed Oct 28, 2015
1 parent 65db7b7 commit 9848271
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/mm-latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ def customize_parser (self, parser):
type=argparse.FileType('w'),
help="Put basal schedules json in this file"
)
parser.add_argument('--status-out',
dest="status",
default='-',
type=argparse.FileType('w'),
help="Put status json in this file"
)
parser.add_argument('--timezone',
default=gettz( ),
type=gettz,
Expand Down Expand Up @@ -121,6 +127,7 @@ def report_clock (self, args):
def report_status (self, args):
status = self.exec_request(self.pump, commands.ReadPumpStatus)
self.status = status.getData( )
args.status.write(json.dumps(self.status, indent=2))

def report_temp (self, args):
temp = self.exec_request(self.pump, commands.ReadBasalTemp)
Expand Down

0 comments on commit 9848271

Please sign in to comment.