$def with (index, name, stype, mtype, srecords, erecords) $var title: $_('Sensor Log') $var page: log $ type_list = [_(u'None'), _(u'Dry Contact'), _(u'Leak Detector'), _(u'Moisture'), _(u'Motion'), _(u'Temperature'), _(u'Multi')] $ multi_list = [_(u'Temperature DS1'), _(u'Temperature DS2'), _(u'Temperature DS3'), _(u'Temperature DS4'), _(u'Dry Contact'), _(u'Leak Detector'), _(u'Moisture'), _(u'Motion'), _(u'Ultrasonic'), _(u'Soil Moisture')] $_('Cancel') $_('Refresh') $_(u'View Graph') $_('Clear All')
$type_list[stype] ${multi_list[mtype] if stype == 6 else ''}
$_('Total number of records'): ${len(erecords)} (${_('no') if options.run_sensor_entries==0 else options.run_sensor_entries} $_('limit'))
$_('Download log') $_(u'event.csv')
$_('Date') | $_('Time') | $_('Event') |
---|---|---|
${event["date"]} | ${event["time"]} | $if "event" in event:${event["event"]} |
$_('Total number of records'): ${len(srecords)} (${_('no') if options.run_sensor_entries==0 else options.run_sensor_entries} $_('limit'))
$_('Download log') $_(u'sample.csv')
$_('Date') | $_('Time') | $if "list_0" in srecords[0]: $for t in range(0, 16):$_('U') ${int(t+1)} | $if "calcul_0" in srecords[0]: $for t in range(0, 16):$_('H') ${int(t+1)} | $_('Action') | $else:$_('Value') | $_('Action') | $_('Battery') | $_('Signal') | |
---|---|---|---|---|---|---|---|---|---|
${event["date"]} | ${event["time"]} | $if "list_0" in event: $for t in range(0, 16): $if "list_{}".format(t) in event:$if event["list_{}".format(t)] == "-127.0": $_('Error') $else: ${event["list_{}".format(t)]} $if stype == 6 and mtype == 9: $_('V') | $for t in range(0, 16): $if "calcul_{}".format(t) in event:$if event["list_{}".format(t)] != "-127.0": ${event["calcul_{}".format(t)]} $if stype == 6 and mtype == 9: $_('%') $else: $_('-') | $else: $if "value" in event:$if event["value"] == "-127.0": $_('Error') $else: ${event["value"]} $if stype == 3 or (stype == 6 and mtype == 6): $_('%') $elif stype == 5 or (stype == 6 and mtype == 0) or (stype == 6 and mtype == 1) or (stype == 6 and mtype == 2) or (stype == 6 and mtype == 3): $if options.temp_unit == 'F': °$_('F') $else: °$_('C') $elif stype == 6 and mtype == 8: $_('cm') | $if "action" in event:${event["action"]} | $else:$if "battery" in event: | ${event["battery"]} $_('V') | $else:$if "rssi" in event: | ${event["rssi"]} $_('%') |