Esempio n. 1
0
def saveEvent(type, ml, date):
    data = FILES.load(FILENAME)
    record = type + "|" + TIMES.stringFrom(date) + "|" + str(ml) + "\n"
    data.append(record)
    FILES.save(FILENAME, data)
Esempio n. 2
0
def load_allEvents():
    print("HISTORY - LOAD: ALL EVENTS")
    return FILES.load(FILENAME)
Esempio n. 3
0
def loadHumidities():
	return FILES.load(FILENAME_HUMIDITIES)
Esempio n. 4
0
def saveHumidity(humidity):
    data = FILES.load(FILENAME_HUMIDITIES)
    tempAsString = str(humidity)
    record = TIMES.stringFrom(TIMES.now())+"|"+tempAsString+"\n"
    data.append(record)
    FILES.save(FILENAME_HUMIDITIES,data)
Esempio n. 5
0
def loadTemperatures():
	return FILES.load(FILENAME_TEMPERATURES)
Esempio n. 6
0
def saveTemperature(temperature):
    data = FILES.load(FILENAME_TEMPERATURES)
    tempAsString = str(temperature)
    record = TIMES.stringFrom(TIMES.now())+"|"+tempAsString+"\n"
    data.append(record)
    FILES.save(FILENAME_TEMPERATURES,data)