refactor
save current thermostat data in db
get and store history
task and management command to fill in device history for a user