Skip to content

Commit

Permalink
Only attemtp to find mac when device is online.
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Prehn <sebastian.prehn@gmx.de>
  • Loading branch information
sprehn committed Mar 8, 2020
1 parent 9a5ab33 commit ff39abe
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public void initialize() {

updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, "TV is off");
startReconnectJob();
findMacAddress(); // host config value could have changed
}

@Override
Expand Down Expand Up @@ -275,7 +274,7 @@ public void onStateChanged(LGWebOSTVSocket.State state) {
startKeepAliveJob();
updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE,
"Registering - You may need to confirm pairing on TV.");
findMacAddress(); // device is now online, so check mac
findMacAddress();
break;
case REGISTERED:
updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE, "Connected");
Expand Down

0 comments on commit ff39abe

Please sign in to comment.