Adding missing where clause in the Sensors entity