Optical sensor device for measuring a filling height (h) and a refractive index (n) of a liquid (F) in a container , comprising; - a housing (G), which is mountable on a bottom or a side wall of the container ; - a laser light source , which is arranged in the housing (G) and with which a laser beam (L) can be generated and radiated into the liquid (F); - a deflection device for the laser beam (L), which is arranged in or on the housing (G) and with which the laser beam (L) can be radiated in the direction of a liquid level (FS) into the liquid (F) and can be deflected substantially parallel to the liquid level (FS) and can be directed at a scatter element (StE) within the liquid (F), wherein the laser beam (L) can be reflected by the scatter element (StE) and by a container top at least in part back into the laser light source and be coupled into it, wherein the scatter element (StE) is arranged in or on the housing (G) and the housing (G) can be at least in part penetrated or surrounded by the liquid (F) ; - a photo element (FE), which is arranged on or in the laser light source and with which an intensity of the laser beam (L) emitted by the laser light source can be captured; - an evaluation device (AE) for ascertaining the filling height (h) and the refractive index (n), wherein the filling height (h) can be ascertained from an optical path length of the laser beam (L) between the laser light source and a container top , wherein the container top is arranged above the liquid level (FS), and the refractive index (n) can be ascertained from an optical path length between the laser light source and the scatter element (StE), and the optical path length can be ascertained in each case from a variation in an intensity of the laser beam (L) emitted by the laser light source ; and - a control device (SE), by means of which the laser light source can be operated with a modulation signal. - a housing (G), which is mountable on a bottom or a side wall of the container ; - a laser light source , which is arranged in the housing (G) and with which a laser beam (L) can be generated and radiated into the liquid (F); - a deflection device for the laser beam (L), which is arranged in or on the housing (G) and with which the laser beam (L) can be radiated in the direction of a liquid level (FS) into the liquid (F) and can be deflected substantially parallel to the liquid level (FS) and can be directed at a scatter element (StE) within the liquid (F), wherein the laser beam (L) can be reflected by the scatter element (StE) and by a container top at least in part back into the laser light source and be coupled into it, wherein the scatter element (StE) is arranged in or on the housing (G) and the housing (G) can be at least in part penetrated or surrounded by the liquid (F) ; - a photo element (FE), which is arranged on or in the laser light source and with which an intensity of the laser beam (L) emitted by the laser light source can be captured; - an evaluation device (AE) for ascertaining the filling height (h) and the refractive index (n), wherein the filling height (h) can be ascertained from an optical path length of the laser beam (L) between the laser light source and a container top , wherein the container top is arranged above the liquid level (FS), and the refractive index (n) can be ascertained from an optical path length between the laser light source and the scatter element (StE), and the optical path length can be ascertained in each case from a variation in an intensity of the laser beam (L) emitted by the laser light source ; and - a control device (SE), by means of which the laser light source can be operated with a modulation signal. <EOS>