First implementation of get_temperature and get_threshold