mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[freeboxos] Fix creation of properties and dynamic channels at init (#17081)
This was bypassed in bridgeStatusChanged. Fix #17078 Fix #17079 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
8cf49ebee3
commit
8e570c5afa
@ -58,7 +58,7 @@ import org.slf4j.LoggerFactory;
|
||||
import inet.ipaddr.IPAddress;
|
||||
|
||||
/**
|
||||
* The {@link ServerHandler} is a base abstract class for all devices made available by the FreeboxOs bridge
|
||||
* The {@link ApiConsumerHandler} is a base abstract class for all devices made available by the FreeboxOs bridge
|
||||
*
|
||||
* @author Gaël L'hopital - Initial contribution
|
||||
*/
|
||||
@ -80,7 +80,10 @@ public abstract class ApiConsumerHandler extends BaseThingHandler implements Api
|
||||
if (bridgeHandler == null) {
|
||||
return;
|
||||
}
|
||||
initializeOnceBridgeOnline(bridgeHandler);
|
||||
}
|
||||
|
||||
private void initializeOnceBridgeOnline(FreeboxOsHandler bridgeHandler) {
|
||||
Map<String, String> properties = editProperties();
|
||||
if (properties.isEmpty()) {
|
||||
try {
|
||||
@ -132,8 +135,9 @@ public abstract class ApiConsumerHandler extends BaseThingHandler implements Api
|
||||
|
||||
@Override
|
||||
public void bridgeStatusChanged(ThingStatusInfo bridgeStatusInfo) {
|
||||
if (checkBridgeHandler() != null) {
|
||||
startRefreshJob();
|
||||
FreeboxOsHandler bridgeHandler = checkBridgeHandler();
|
||||
if (bridgeHandler != null) {
|
||||
initializeOnceBridgeOnline(bridgeHandler);
|
||||
} else {
|
||||
stopJobs();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user