Fix sensor and device update (#15596)
Signed-off-by: AndreasV <andreas.viborg@gmail.com>
This commit is contained in:
parent
4359c732a4
commit
9c22b7b9ed
|
@ -112,4 +112,21 @@ public class TellstickLocalDeviceDTO implements Device {
|
||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
// used to test if device exist
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof TellstickLocalDeviceDTO other)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return deviceId == other.deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,4 +127,21 @@ public class TellstickLocalSensorDTO implements Device {
|
||||||
public String getUUId() {
|
public String getUUId() {
|
||||||
return Integer.toString(deviceId);
|
return Integer.toString(deviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
// used to test if sensor exist
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof TellstickLocalSensorDTO other)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return deviceId == other.deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue