Skip to content

Commit

Permalink
Merge pull request #49 from dvdgeisler/feature/default-device
Browse files Browse the repository at this point in the history
skip unknown device warning if device type is null
  • Loading branch information
dvdgeisler authored Nov 29, 2022
2 parents c8bedf1 + a2e3f03 commit 0f9a32a
Showing 1 changed file with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,25 @@ private UnknownDeviceCollector() {

private boolean add(final UnknownDeviceEntry unknownDeviceEntry) {
if (this.entries.add(unknownDeviceEntry)) {
log.warn("""
Unknown device found:
type={}, category={},
manufacturer={}, model={},
customName={}, id={}
Help us to support additional devices and create an issue on
{} with the following content:
{}
""",
getDeviceCategory(unknownDeviceEntry.device),
getDeviceType(unknownDeviceEntry.device),
getDeviceManufacturer(unknownDeviceEntry.device),
getDeviceModel(unknownDeviceEntry.device),
getDeviceCustomName(unknownDeviceEntry.device),
getDeviceId(unknownDeviceEntry.device),
"https://github.com/dvdgeisler/DirigeraClient",
unknownDeviceEntry.jsonNode);
if (getDeviceType(unknownDeviceEntry.device) != null)
log.warn("""
Unknown device found:
type={}, category={},
manufacturer={}, model={},
customName={}, id={}
Help us to support additional devices and create an issue on
{} with the following content:
{}
""",
getDeviceCategory(unknownDeviceEntry.device),
getDeviceType(unknownDeviceEntry.device),
getDeviceManufacturer(unknownDeviceEntry.device),
getDeviceModel(unknownDeviceEntry.device),
getDeviceCustomName(unknownDeviceEntry.device),
getDeviceId(unknownDeviceEntry.device),
"https://github.com/dvdgeisler/DirigeraClient",
unknownDeviceEntry.jsonNode);
return true;
}
return false;
Expand Down

0 comments on commit 0f9a32a

Please sign in to comment.