Fix BaseThingHandler.initialize() deprecations (#8553)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born 2020-09-23 13:32:46 +02:00 committed by GitHub
parent 613c2e1082
commit f156a80d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 2 deletions

View File

@ -48,4 +48,9 @@ public abstract class LutronHandler extends BaseThingHandler {
}
public abstract void handleFeedback(RadioRAFeedback feedback);
@Override
public void initialize() {
updateStatus(ThingStatus.ONLINE);
}
}

View File

@ -57,6 +57,11 @@ public class NeatoAccountHandler extends BaseBridgeHandler {
public void handleCommand(ChannelUID channelUID, Command command) {
}
@Override
public void initialize() {
updateStatus(ThingStatus.ONLINE);
}
private List<Robot> sendGetRobots(String accessToken) {
Properties headers = new Properties();
headers.setProperty("Accept", "application/vnd.neato.nucleo.v1");

View File

@ -27,6 +27,7 @@ import org.openhab.core.library.unit.SmartHomeUnits;
import org.openhab.core.thing.Channel;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;
import org.openhab.core.thing.binding.builder.ChannelBuilder;
import org.openhab.core.thing.binding.builder.ThingBuilder;
import org.openhab.core.thing.type.ChannelTypeUID;
@ -94,7 +95,7 @@ public class OpenSprinklerDeviceHandler extends OpenSprinklerBaseHandler {
logger.debug("Could not query current draw. Not removing channel as it could be temporary.", e);
}
}
super.initialize();
updateStatus(ThingStatus.ONLINE);
}
@Override

View File

@ -125,7 +125,7 @@ public final class SeneyeHandler extends BaseThingHandler implements ReadingsUpd
return; // critical error
}
super.initialize();
updateStatus(ThingStatus.ONLINE);
// contact Seneye API
scheduler.submit(() -> {