Skip to content

Commit

Permalink
Fix config reload after changes.
Browse files Browse the repository at this point in the history
Fixes openhab#11407

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
  • Loading branch information
jlaur committed Oct 18, 2021
1 parent 6a33a3f commit 6d8795a
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -69,14 +69,14 @@ public UniFiClientThingHandler(Thing thing) {
@Override
protected synchronized void initialize(UniFiClientThingConfig config) {
// mgb: called when the config changes
logger.debug("Initializing the UniFi Client Handler with config = {}", config);
if (!config.isValid()) {
updateStatus(OFFLINE, CONFIGURATION_ERROR,
"You must define a MAC address, IP address, hostname or alias for this thing.");
return;
}
this.config = config;
if (thing.getStatus() == INITIALIZING) {
logger.debug("Initializing the UniFi Client Handler with config = {}", config);
if (!config.isValid()) {
updateStatus(OFFLINE, CONFIGURATION_ERROR,
"You must define a MAC address, IP address, hostname or alias for this thing.");
return;
}
this.config = config;
updateStatus(ONLINE);
}
}
Expand Down

0 comments on commit 6d8795a

Please sign in to comment.