added sensor history control, its saved in the db, but not used yet