switch case added for update sensors