A smoke alarm which was only recently installed alerted a family and their dog to a fire started by an air fryer being left on their hob.