Added default aggregation intervall.

This commit is contained in:
Ziver Koc 2021-09-16 21:58:48 +02:00
parent af39f2c94b
commit 940016f44a
4 changed files with 3 additions and 16 deletions

View file

@ -13,7 +13,9 @@ public interface HalSensorConfig extends HalDeviceConfig {
/** /**
* @return the intended data reporting interval in milliseconds. * @return the intended data reporting interval in milliseconds.
*/ */
long getDataInterval(); default long getDataInterval() {
return 60 * 60 * 1000; // 1 hour
}
/** /**
* @return which aggregation method that should be used to aggregate the reported data. * @return which aggregation method that should be used to aggregate the reported data.

View file

@ -35,11 +35,6 @@ public class ZigbeeHumidityConfig extends ZigbeeHalDeviceConfig implements HalSe
// Hal Methods // Hal Methods
// -------------------------- // --------------------------
@Override
public long getDataInterval() {
return 0;
}
@Override @Override
public AggregationMethod getAggregationMethod() { public AggregationMethod getAggregationMethod() {
return AggregationMethod.AVERAGE; return AggregationMethod.AVERAGE;

View file

@ -36,11 +36,6 @@ public class ZigbeePressureConfig extends ZigbeeHalDeviceConfig implements HalSe
// Hal Methods // Hal Methods
// -------------------------- // --------------------------
@Override
public long getDataInterval() {
return 0;
}
@Override @Override
public AggregationMethod getAggregationMethod() { public AggregationMethod getAggregationMethod() {
return AggregationMethod.AVERAGE; return AggregationMethod.AVERAGE;

View file

@ -35,11 +35,6 @@ public class ZigbeeTemperatureConfig extends ZigbeeHalDeviceConfig implements Ha
// Hal Methods // Hal Methods
// -------------------------- // --------------------------
@Override
public long getDataInterval() {
return 0;
}
@Override @Override
public AggregationMethod getAggregationMethod() { public AggregationMethod getAggregationMethod() {
return AggregationMethod.AVERAGE; return AggregationMethod.AVERAGE;