Optical sensor device for measuring a filling height (h) and a refractive index (n) of a liquid in a container, comprising; - a housing, which is mountable on a bottom or a side wall of the container; - a laser light source, which is arranged in the housing and with which a laser beam can be generated and radiated into the liquid; - a deflection device for the laser beam, which is arranged in or on the housing and with which the laser beam can be radiated in the direction of a liquid level into the liquid and can be deflected substantially parallel to the liquid level and can be directed at a scatter element (StE) within the liquid, wherein the laser beam 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 and the housing can be at least in part penetrated or surrounded by the liquid; - a photo element, which is arranged on or in the laser light source and with which an intensity of the laser beam emitted by the laser light source can be captured; - an evaluation device 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 between the laser light source and a container top, wherein the container top is arranged above the liquid level, 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 emitted by the laser light source; and - a control device, by means of which the laser light source can be operated with a modulation signal. - a housing, which is mountable on a bottom or a side wall of the container; - a laser light source, which is arranged in the housing and with which a laser beam can be generated and radiated into the liquid; - a deflection device for the laser beam, which is arranged in or on the housing and with which the laser beam can be radiated in the direction of a liquid level into the liquid and can be deflected substantially parallel to the liquid level and can be directed at a scatter element (StE) within the liquid, wherein the laser beam 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 and the housing can be at least in part penetrated or surrounded by the liquid; - a photo element, which is arranged on or in the laser light source and with which an intensity of the laser beam emitted by the laser light source can be captured; - an evaluation device 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 between the laser light source and a container top, wherein the container top is arranged above the liquid level, 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 emitted by the laser light source; and - a control device, by means of which the laser light source can be operated with a modulation signal.