Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tellstick] Fix local bridge handler update #15596

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,21 @@ public String getType() {
public void setType(String 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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,21 @@ public void setSensorId(int sensorId) {
public String getUUId() {
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;
}
}