Refactoring of updating the sensor + sensorgroup saving to cfg