Temperature

class knut.services.temperature.Temperature(location, uid, **kwargs)

Base class for temperature services.

check_history()

Checks if the history is from the current day and clears the history if not.

condition = None

A string with the code point for the Weather Icon font which represents the current weather condition.

history = None

A nested list where history[0] is a list of the temperature values and history[1] the UNIX timestamps.

load_data()

Load temperature history from file.

If history data of the back-end are found, the temperature history will be set from the file.

location = None

The location where the temperature is measured.

make_user_dir()

Makes a user data directory if it does not exists.

save_data()

Appends the current temperature to the history and writes the pickled representation of history to a file.

temperature = None

Temperature in Kelvin.

uid = None

The identifier of the temperature service.