bugfix, fixed retrieval of sensors

This commit is contained in:
Ziver Koc 2016-08-25 22:57:24 +02:00
parent 68265759ba
commit 439be77a8b

View file

@ -113,8 +113,9 @@ public class PCOverviewHttpPage extends HalHttpPage implements HalHttpPage.HalJs
private List<Sensor> getSensorList(DBConnection db) throws SQLException {
List<Sensor> sensors = new ArrayList<>();
for (Sensor sensor : Sensor.getSensors(db)) {
if (sensor.getDeviceConfig() != null &&
sensor.getDeviceConfig() instanceof PowerConsumptionSensorData)
if (sensor.getDeviceConfig() != null) // Show all sensors for now
// if (sensor.getDeviceConfig() != null &&
// sensor.getDeviceConfig().getSensorDataClass() == PowerConsumptionSensorData.class)
sensors.add(sensor);
}
return sensors;