def saveEvent(type, ml, date): data = FILES.load(FILENAME) record = type + "|" + TIMES.stringFrom(date) + "|" + str(ml) + "\n" data.append(record) FILES.save(FILENAME, data)
def load_allEvents(): print("HISTORY - LOAD: ALL EVENTS") return FILES.load(FILENAME)
def loadHumidities(): return FILES.load(FILENAME_HUMIDITIES)
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)
def loadTemperatures(): return FILES.load(FILENAME_TEMPERATURES)
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)